{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "command-palette",
  "title": "Command palette",
  "description": "A searchable ⌘K command palette with grouped actions, recent items, and keyboard shortcuts.",
  "registryDependencies": [
    "command",
    "https://www.quilldesignsystem.com/r/icon.json"
  ],
  "files": [
    {
      "path": "registry/blocks/command-palette.tsx",
      "content": "import {\n  Command,\n  CommandInput,\n  CommandList,\n  CommandGroup,\n  CommandItem,\n  CommandSeparator,\n  CommandShortcut,\n} from '@/components/ui/command'\nimport { Icon, type IconName } from '@/components/ui/icon'\n\nconst actions: { icon: IconName; label: string; shortcut?: string }[] = [\n  { icon: 'add', label: 'New project', shortcut: '⌘N' },\n  { icon: 'search', label: 'Search docs' },\n  { icon: 'settings', label: 'Open settings', shortcut: '⌘,' },\n]\nconst recent: { icon: IconName; label: string }[] = [\n  { icon: 'description', label: 'Design tokens guide' },\n  { icon: 'folder_open', label: 'Acme site' },\n]\n\n/** A searchable ⌘K command palette with grouped actions, recent items, and keyboard shortcuts. */\nexport function CommandPalette() {\n  return (\n    <Command className=\"w-card-lg rounded-xl shadow-md ring-1 ring-foreground/10\">\n      <CommandInput placeholder=\"Type a command or search…\" />\n      <CommandList>\n        <CommandGroup heading=\"Actions\">\n          {actions.map((a) => (\n            <CommandItem key={a.label}>\n              <Icon name={a.icon} />\n              <span>{a.label}</span>\n              {a.shortcut && <CommandShortcut>{a.shortcut}</CommandShortcut>}\n            </CommandItem>\n          ))}\n        </CommandGroup>\n        <CommandSeparator />\n        <CommandGroup heading=\"Recent\">\n          {recent.map((r) => (\n            <CommandItem key={r.label}>\n              <Icon name={r.icon} />\n              <span>{r.label}</span>\n            </CommandItem>\n          ))}\n        </CommandGroup>\n      </CommandList>\n    </Command>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/quill/command-palette.tsx"
    }
  ],
  "meta": {
    "intent": [
      "navigation"
    ],
    "use_when": "You need a searchable ⌘K launcher for actions and quick navigation.",
    "not_for": "the list is embedded in the page (settings search) or needs groups and behaviour the finished launcher does not have, so you build it from Command parts. Use command-palette for the ready-made ⌘K overlay → command; search results should live inline on the page, not in a global keyboard-triggered overlay → search-results; the list of options is small and tied to a specific trigger element, not a global searchable launcher → dropdown-menu"
  },
  "docs": "A searchable ⌘K command palette with grouped actions, recent items, and keyboard shortcuts. Do: Group items into labeled sections (Actions, Recent) so a long list stays scannable. Don't: Dump every possible command into one flat, unlabeled list. Use command when the list is embedded in the page (settings search) or needs groups and behaviour the finished launcher does not have, so you build it from Command parts. Use command-palette for the ready-made ⌘K overlay. Use search-results when search results should live inline on the page, not in a global keyboard-triggered overlay. Use dropdown-menu when the list of options is small and tied to a specific trigger element, not a global searchable launcher.",
  "categories": [
    "navigation"
  ],
  "type": "registry:block"
}