Command Palette
⌘K command palette with fuzzy search, groups, shortcut hints and full keyboard control.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
CommandMenuProps
Also accepts all props of Omit<React.ComponentProps<"div">, "onSelect">
| Prop | Type | Default | Description |
|---|---|---|---|
| groups* required | CommandGroup[] | — | — |
| placeholder | string | "Type a command or search…" | — |
| emptyText | string | "No results found." | — |
| onSelect | (item: CommandItem) => void | — | Called after an item's own onSelect |
| autoFocusSearch | boolean | false | Focus the search field on mount |
| showFooter | boolean | true | — |
CommandPaletteProps
Also accepts all props of CommandMenuProps
| Prop | Type | Default | Description |
|---|---|---|---|
| open* required | boolean | — | — |
| onOpenChange* required | (open: boolean) => void | — | — |
| hotkey | boolean | true | Toggle with ⌘K / Ctrl+K |
Install
$ npx shadcn@latest add https://chromotion.dev/r/command-palette.jsonThe CLI installs the base component; your customizations live in the code generated on the Customize tab.