{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "extends": "none",
  "name": "grid-list-controlled-example",
  "title": "Grid List Controlled",
  "description": "grid-list-controlled-example",
  "dependencies": [
    "react-aria-components"
  ],
  "registryDependencies": [
    "https://intentui.com/r/field",
    "https://intentui.com/r/grid-list"
  ],
  "files": [
    {
      "path": "src/components/examples/collections/grid-list/grid-list-controlled-example.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport type { Selection } from \"react-aria-components/GridList\"\nimport { Description } from \"@/components/ui/field\"\nimport { GridList, GridListItem } from \"@/components/ui/grid-list\"\n\nexport default function GridListControlledDemo() {\n  const [selectedKeys, setSelectedKeys] = useState<Selection>(new Set([]))\n  return (\n    <div>\n      <GridList\n        selectedKeys={selectedKeys}\n        onSelectionChange={setSelectedKeys}\n        items={items}\n        aria-label=\"Select items\"\n        selectionMode=\"multiple\"\n        className=\"min-w-64\"\n      >\n        {(item) => <GridListItem id={item.id}>{item.name}</GridListItem>}\n      </GridList>\n      <Description className=\"mt-2 block text-muted-foreground [&>strong]:text-foreground\">\n        You have selected: <strong>{Array.from(selectedKeys).join(\", \")}</strong>\n      </Description>\n    </div>\n  )\n}\n\nconst items = [\n  { id: \"1\", name: \"The Beatles\" },\n  { id: \"2\", name: \"Led Zeppelin\" },\n  { id: \"3\", name: \"Pink Floyd\" },\n  { id: \"4\", name: \"Queen\" },\n  { id: \"5\", name: \"The Rolling Stones\" },\n]\n",
      "type": "registry:page",
      "target": "app/grid-list-controlled-example/page.tsx"
    }
  ],
  "type": "registry:page"
}