Sortable data table
Compare structured records with sortable columns.
Navigate nested folders and structured content.
npx shadcn@latest add @silicon-ui/tree-viewnpx shadcn@latest add @silicon-ui/tree-viewInstall the dependencies.
npm install lucide-react motionCopy these files into your project. Shared files are skipped if you already have them.
components/silicon-ui/tree-view/tree-view.tsxcomponents/silicon-ui/tree-view/tree-view.module.cssInstall the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation
| Prop | Type | Default |
|---|---|---|
nodes* | TreeNode[] | — |
defaultExpandedIds | string[] | [] |
expandedIds | string[] | — |
onExpandedChange | (expandedIds: string[]) => void | — |
onSelect | (node: TreeNode) => void | — |
aria-label | string | — |