TreeView
navigationCollapsible hierarchical tree with expand/collapse chevrons, selection state, depth indentation, branch connector lines, and keyboard navigation. Token-driven styling.
Import
typescript
import { TreeView } from "packages/ui/src";Props
TreeViewProps
| Prop | Type | Required |
|---|---|---|
nodes | TreeNode[] | Yes |
selected | string | No |
onSelect | (id) => void, defaultExpanded?: string[] | No |
Examples
Tree View
Collapsible hierarchical tree with expand/collapse, selection, and depth indentation.
File Explorer
- src
- components
- styles
- index.ts
- tests
- README.md
- package.json
Fully Expanded
- src
- components
- Button.tsx
- Card.tsx
- Tabs.tsx
- styles
- globals.css
- tokens.css
- index.ts
- tests
- components.test.tsx
- README.md
- package.json