Utility
Terminal
█
directory-tree-demo █
Loading preview... █
█
█
█
█
█
█
█
█
█
█
█
█
█
█
█Installation
$ pnpm dlx shadcn@latest add @termcn/opentui/directory-tree
Usage
import { DirectoryTree } from "@/components/ui/directory-tree";<DirectoryTree
rootPath="/home/user/project"
maxDepth={3}
label="Project Files"
/>API Reference
DirectoryTree
| Prop | Type | Default |
|---|---|---|
rootPath | string | process.cwd() |
onSelect | (path: string) => void | - |
maxDepth | number | 2 |
showHidden | boolean | false |
label | string | - |