{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcn-studio/combobox-03","type":"registry:component","title":"Combobox 3","description":"Grouped combobox with disabled options and category-based selection","registryDependencies":["combobox","label"],"files":[{"path":"src/registry/new-york/components/combobox/combobox-03.tsx","content":"'use client'\n\nimport { useId } from 'react'\n\nimport {\n  Combobox,\n  ComboboxCollection,\n  ComboboxContent,\n  ComboboxEmpty,\n  ComboboxGroup,\n  ComboboxInput,\n  ComboboxItem,\n  ComboboxLabel,\n  ComboboxList\n} from '@/registry/new-york/ui/combobox'\nimport { Label } from '@/registry/new-york/ui/label'\n\nconst items = [\n  {\n    value: 'Fruits',\n    items: ['Apples', 'Bananas', 'Cherries']\n  },\n  {\n    value: 'Vegetables',\n    items: ['Carrots', 'Broccoli', 'Spinach'],\n    disabled: ['Broccoli']\n  },\n  {\n    value: 'Beverages',\n    items: ['Tea', 'Coffee', 'Juice'],\n    disabled: ['Coffee']\n  }\n]\n\nconst ComboboxOptionDisabledDemo = () => {\n  const id = useId()\n\n  return (\n    <div className='w-full max-w-xs space-y-2'>\n      <Label htmlFor={id}>Combobox disabled option </Label>\n      <Combobox id={id} items={items}>\n        <ComboboxInput placeholder='Select a timezone' />\n        <ComboboxContent>\n          <ComboboxEmpty>No timezones found.</ComboboxEmpty>\n          <ComboboxList>\n            {group => (\n              <ComboboxGroup key={group.value} items={group.items}>\n                <ComboboxLabel>{group.value}</ComboboxLabel>\n                <ComboboxCollection>\n                  {item => (\n                    <ComboboxItem key={item} value={item} disabled={group.disabled?.includes(item)}>\n                      {item}\n                    </ComboboxItem>\n                  )}\n                </ComboboxCollection>\n              </ComboboxGroup>\n            )}\n          </ComboboxList>\n        </ComboboxContent>\n      </Combobox>\n    </div>\n  )\n}\n\nexport default ComboboxOptionDisabledDemo\n","type":"registry:component","target":"components/shadcn-studio/combobox/combobox-03.tsx"}]}