FileTree
File tree view with expand/collapse.
Preview
src
components
Button.tsx
Card.tsx
lib
utils.ts
app.tsx
package.json
Installation
bash
npx auralix-ui add file-treeUsage
File Tree
tsx
import { FileTree } from "@/components/ui/FileTree";
<FileTree data={[
{ name: "src", type: "folder", children: [
{ name: "index.ts", type: "file" },
]},
]} />Props
| Name | Type | Default | Description |
|---|---|---|---|
data | FileTreeNode[] | - | Tree structure data. |
onSelect | (node: FileTreeNode) => void | - | Callback on node select. |
On this page