Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/directory-tree.json
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 | undefined |
maxDepth | number | 2 |
showHidden | boolean | false |
label | string | undefined |