{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "combobox-dropdown-menu", "type": "registry:example", "author": "shadcn (https://ui.shadcn.com)", "registryDependencies": [ "command", "dropdown-menu", "button" ], "files": [ { "path": "examples/combobox-dropdown-menu.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Calendar, MoreHorizontal, Tags, Trash, User } from \"lucide-react\"\n\nimport { Button } from \"@/registry/default/ui/button\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/registry/default/ui/command\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/registry/default/ui/dropdown-menu\"\n\nconst labels = [\n \"feature\",\n \"bug\",\n \"enhancement\",\n \"documentation\",\n \"design\",\n \"question\",\n \"maintenance\",\n]\n\nexport default function ComboboxDropdownMenu() {\n const [label, setLabel] = React.useState(\"feature\")\n const [open, setOpen] = React.useState(false)\n\n return (\n
\n

\n \n {label}\n \n Create a new project\n

\n \n \n \n \n \n Actions\n \n \n \n Assign to...\n \n \n \n Set due date...\n \n \n \n \n \n Apply label\n \n \n \n \n \n No label found.\n \n {labels.map((label) => (\n {\n setLabel(value)\n setOpen(false)\n }}\n >\n {label}\n \n ))}\n \n \n \n \n \n \n \n \n Delete\n ⌘⌫\n \n \n \n \n
\n )\n}\n", "type": "registry:example", "target": "" } ] }