{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "extends": "none",
  "name": "tag-group-controlled-example",
  "title": "Tag Group Controlled",
  "description": "tag-group-controlled-example",
  "dependencies": [
    "react-aria-components"
  ],
  "registryDependencies": [
    "https://intentui.com/r/field",
    "https://intentui.com/r/tag-group"
  ],
  "files": [
    {
      "path": "src/components/examples/collections/tag-group/tag-group-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 { Tag, TagGroup, TagList } from '@/components/ui/tag-group'\n\nconst fruitList = [\n  { id: '1', name: 'Apple', available: false },\n  { id: '2', name: 'Banana', available: true },\n  { id: '3', name: 'Cherry', available: true },\n  { id: '4', name: 'Date', available: false },\n]\n\nexport default function TagGroupControlledDemo() {\n  const [selected, setSelected] = useState<Selection>(new Set([]))\n  return (\n    <div>\n      <TagGroup\n        aria-label=\"Fruite\"\n        selectionMode=\"multiple\"\n        selectedKeys={selected}\n        onSelectionChange={setSelected}\n      >\n        <TagList items={fruitList}>{(item) => <Tag>{item.name}</Tag>}</TagList>\n      </TagGroup>\n\n      <Description className=\"mt-2 block text-muted-fg [&>strong]:text-fg\">\n        You have selected: <strong>{Array.from(selected).join(', ')}</strong>\n      </Description>\n    </div>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/tag-group-controlled-example/page.tsx"
    }
  ],
  "type": "registry:page"
}