{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select14",
  "title": "Select",
  "description": "Select built with shadcn/ui.",
  "dependencies": [
    "lucide-react@0"
  ],
  "registryDependencies": [
    "button",
    "command",
    "label",
    "popover"
  ],
  "files": [
    {
      "path": "contents/components/select/14/index.tsx",
      "content": "\"use client\";\n\nimport { CheckIcon, ChevronDownIcon } from \"lucide-react\";\nimport { useId, useState } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList\n} from \"@/components/ui/command\";\nimport { Label } from \"@/components/ui/label\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\n\nconst frameworks = [\n  {\n    label: \"Next.js\",\n    value: \"next.js\"\n  },\n  {\n    label: \"SvelteKit\",\n    value: \"sveltekit\"\n  },\n  {\n    label: \"Nuxt.js\",\n    value: \"nuxt.js\"\n  },\n  {\n    label: \"Remix\",\n    value: \"remix\"\n  },\n  {\n    label: \"Astro\",\n    value: \"astro\"\n  },\n  {\n    label: \"Angular\",\n    value: \"angular\"\n  },\n  {\n    label: \"Vue.js\",\n    value: \"vue\"\n  },\n  {\n    label: \"React\",\n    value: \"react\"\n  },\n  {\n    label: \"Ember.js\",\n    value: \"ember\"\n  },\n  {\n    label: \"Gatsby\",\n    value: \"gatsby\"\n  },\n  {\n    label: \"Eleventy\",\n    value: \"eleventy\"\n  },\n  {\n    label: \"SolidJS\",\n    value: \"solid\"\n  },\n  {\n    label: \"Preact\",\n    value: \"preact\"\n  },\n  {\n    label: \"Qwik\",\n    value: \"qwik\"\n  },\n  {\n    label: \"Alpine.js\",\n    value: \"alpine\"\n  },\n  {\n    label: \"Lit\",\n    value: \"lit\"\n  }\n];\n\nexport default function Component() {\n  const id = useId();\n  const [open, setOpen] = useState<boolean>(false);\n  const [value, setValue] = useState<string>(\"\");\n\n  return (\n    <div className=\"w-full max-w-xs\">\n      <Popover onOpenChange={setOpen} open={open}>\n        <PopoverTrigger asChild>\n          <Button\n            aria-expanded={open}\n            className=\"border-input bg-background hover:bg-background w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]\"\n            id={id}\n            role=\"combobox\"\n            variant=\"outline\">\n            <span className={cn(\"truncate\", !value && \"text-muted-foreground\")}>\n              {value\n                ? frameworks.find((framework) => framework.value === value)?.label\n                : \"Select framework\"}\n            </span>\n            <ChevronDownIcon\n              aria-hidden=\"true\"\n              className=\"text-muted-foreground/80 shrink-0\"\n              size={16}\n            />\n          </Button>\n        </PopoverTrigger>\n        <PopoverContent\n          align=\"start\"\n          className=\"border-input w-full min-w-(--radix-popper-anchor-width) p-0\">\n          <Command>\n            <CommandInput placeholder=\"Search framework...\" />\n            <CommandList>\n              <CommandEmpty>No framework found.</CommandEmpty>\n              <CommandGroup>\n                {frameworks.map((framework) => (\n                  <CommandItem\n                    key={framework.value}\n                    onSelect={(currentValue) => {\n                      setValue(currentValue === value ? \"\" : currentValue);\n                      setOpen(false);\n                    }}\n                    value={framework.value}>\n                    {framework.label}\n                    {value === framework.value && <CheckIcon className=\"ml-auto\" size={16} />}\n                  </CommandItem>\n                ))}\n              </CommandGroup>\n            </CommandList>\n          </Command>\n        </PopoverContent>\n      </Popover>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/select14.tsx"
    }
  ],
  "type": "registry:component"
}