{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "command", "title": "Command", "description": "A searchable command menu for quick actions, navigation, and filtering.", "dependencies": [ "cmdk", "lucide-react" ], "registryDependencies": [ "modal", "input-group" ], "files": [ { "path": "packages/ui/src/command.tsx", "content": "\"use client\";\n\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Check as CheckIcon, Search as SearchIcon } from \"lucide-react\";\nimport type * as React from \"react\";\nimport { InputGroup, InputGroupAddon } from \"./input-group\";\nimport {\n Modal,\n ModalContent,\n ModalDescription,\n ModalHeader,\n ModalTitle,\n} from \"./modal\";\nimport { cn, POPUP_ITEM_HEIGHT } from \"./utils\";\n\n// =============================================================================\n// Command (Root)\n// =============================================================================\nfunction Command({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n );\n}\n\n// =============================================================================\n// CommandDialog\n// =============================================================================\nexport interface CommandDialogProps\n extends Omit, \"children\"> {\n children: React.ReactNode;\n className?: string;\n description?: string;\n showCloseButton?: boolean;\n title?: string;\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = false,\n ...props\n}: CommandDialogProps) {\n return (\n \n \n \n {title}\n {description}\n \n {children}\n \n \n );\n}\n\n// =============================================================================\n// CommandInput\n// =============================================================================\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n
\n \n \n \n \n \n \n
\n );\n}\n\n// =============================================================================\n// CommandList\n// =============================================================================\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n );\n}\n\n// =============================================================================\n// CommandEmpty\n// =============================================================================\nfunction CommandEmpty({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n );\n}\n\n// =============================================================================\n// CommandGroup\n// =============================================================================\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n );\n}\n\n// =============================================================================\n// CommandSeparator\n// =============================================================================\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps) {\n return (\n \n );\n}\n\n// =============================================================================\n// CommandItem\n// =============================================================================\nfunction CommandItem({\n className,\n children,\n ...props\n}: React.ComponentProps) {\n return (\n \n {children}\n \n \n );\n}\n\n// =============================================================================\n// CommandShortcut\n// =============================================================================\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n \n );\n}\n\n// =============================================================================\n// Exports\n// =============================================================================\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n", "type": "registry:ui" } ], "type": "registry:ui" }