Tree
display
Tree: a collapsible tree widget for displaying hierarchical data
Terminal
$termuijs render tree
Installation
$ bunx termuijs add tree
Copies the source into src/components/tree/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Tree } from '@termuijs/widgets'ts
new Tree(options: TreeOptions, style: Partial<Style> = {})API Reference
Tree
| Prop | Type | Required | Description |
|---|---|---|---|
nodes | TreeNode[] | required | — |
onSelect | (node: TreeNode, path: number[]) => void | optional | — |
indent | number | optional | — |