{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "file-tree-demo",
  "title": "File Tree Demo",
  "description": "A worked example of File Tree: An expandable tree of folders and files with full keyboard navigation and correct tree semantics.",
  "registryDependencies": [
    "https://ui.tinkererslabs.com/r/file-tree.json"
  ],
  "files": [
    {
      "path": "components/demos/file-tree-demo.tsx",
      "content": "\"use client\"\n\nimport { FileTree } from \"@/registry/default/file-tree/file-tree\"\n\nconst nodes = [\n  {\n    id: \"contracts\",\n    name: \"contracts\",\n    kind: \"folder\" as const,\n    children: [\n      {\n        id: \"2026\",\n        name: \"2026\",\n        kind: \"folder\" as const,\n        children: [\n          { id: \"acme\", name: \"acme-msa.pdf\", meta: \"1.2 MB\" },\n          { id: \"northwind\", name: \"northwind-sow.pdf\", meta: \"840 KB\" },\n        ],\n      },\n      { id: \"archive\", name: \"archive\", kind: \"folder\" as const, children: [] },\n    ],\n  },\n  {\n    id: \"invoices\",\n    name: \"invoices\",\n    kind: \"folder\" as const,\n    children: [{ id: \"jan\", name: \"january.pdf\", meta: \"94 KB\" }],\n  },\n  { id: \"readme\", name: \"readme.md\", meta: \"2 KB\" },\n]\n\nexport function FileTreeDemo() {\n  return (\n    <FileTree\n      className=\"w-full max-w-sm\"\n      nodes={nodes}\n      defaultExpandedIds={[\"contracts\", \"2026\"]}\n      defaultSelectedId=\"acme\"\n    />\n  )\n}\n",
      "type": "registry:example"
    }
  ],
  "type": "registry:example"
}