file-tree-expandable-demo
jolyui-ui/file-tree-expandable-demoFreeExample
jolyui/ui publishes no description for this item.
Install it
npx shadcn@latest add https://jolyui.dev/r/file-tree-expandable-demo.jsonSource
1import { FileTree } from "@/registry/default/ui/file-tree";23const expandableTreeData = [4 {5 id: "src",6 name: "src",7 type: "folder" as const,8 children: [9 {10 id: "components",11 name: "components",12 type: "folder" as const,13 children: [14 { id: "button", name: "Button.tsx", type: "file" as const },15 { id: "input", name: "Input.tsx", type: "file" as const },16 { id: "card", name: "Card.tsx", type: "file" as const },17 ],18 },19 {20 id: "hooks",21 name: "hooks",22 type: "folder" as const,23 children: [24 { id: "use-theme", name: "use-theme.ts", type: "file" as const },25 { id: "use-mobile", name: "use-mobile.ts", type: "file" as const },26 ],27 },28 { id: "utils", name: "utils.ts", type: "file" as const },29 ],30 },31 {32 id: "public",33 name: "public",34 type: "folder" as const,35 children: [36 { id: "favicon", name: "favicon.ico", type: "file" as const },37 { id: "logo", name: "logo.svg", type: "file" as const },38 ],39 },40 { id: "package", name: "package.json", type: "file" as const },41 { id: "readme", name: "README.md", type: "file" as const },42];4344export default function FileTreeExpandableDemo() {45 return (46 <div className="flex flex-col gap-3">47 <h3 className="font-medium text-sm">Expandable File Tree</h3>48 <FileTree49 data={expandableTreeData}50 defaultExpandedIds={["src", "components"]}51 />52 </div>53 );54}
What it pulls in
Other registry items
Files it writes
More from jolyui/ui
All 199 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| ai-prompt-box-demoai-prompt-box-demo | jolyui/ui | Examples | Free | no deps | |
| ai-prompt-box-loading-demoai-prompt-box-loading-demo | jolyui/ui | Examples | Free | no deps | |
| animated-beam-bidirectional-demoanimated-beam-bidirectional-demo | jolyui/ui | Examples | Free | 1 dep | |
| animated-beam-curved-demoanimated-beam-curved-demo | jolyui/ui | Examples | Free | 1 dep | |
| animated-beam-demoanimated-beam-demo | jolyui/ui | Examples | Free | 1 dep | |
| animated-beam-multiple-demoanimated-beam-multiple-demo | jolyui/ui | Examples | Free | 1 dep | |
| animated-table-basic-demoanimated-table-basic-demo | jolyui/ui | Examples | Free | no deps | |
| animated-table-column-demoanimated-table-column-demo | jolyui/ui | Examples | Free | no deps |
