Suggestions
Every action searchable in one box — ↵ runs the highlighted command
Command Palette
/ Command · role="dialog" /
also called command menu, quick actions, launcher, command bar
A command palette is a keyboard-first overlay that searches actions, pages, and objects from one place. It commonly opens with ⌘K or Ctrl+K, highlights one result at a time, and executes the selected command with Enter. It is broader than a combobox because it launches heterogeneous commands rather than choosing one field value.
If you called it…
…you meant a command palette.
Anatomy — every part, named
- 1Command input
CommandInput“The search field at the top of the ⌘K menu” is the command input.
- 2Command group
CommandGroup“The labeled section grouping similar actions” is a command group.
- 3Active command
CommandItem“The result with the highlight that Enter will run” is the active command.
- 4Command shortcut
CommandShortcut“The ⌘ letters aligned on the right of an action” are the command shortcut.
Prompt — paste into your agent
Add a Command Palette using the shadcn/ui Command component inside a role="dialog", opened by ⌘K or Ctrl+K. Filter actions as the user types, support arrow-key selection and Enter, and restore focus to the invoking control on dismissal.
Debug prompt — when it misbehaves
Paste this, then describe what you’re seeing — it hands your agent the classic failure modes to rule out first.
Debug my command palette (cmdk, Dialog + Command). Rule out: the cmd/ctrl-K listener attached to the wrong scope or eaten by the browser; the filter state persisting from the previous open — reset on open; focus escaping the dialog because the trap ignores portaled content; keydown firing during IME composition (check isComposing); the palette rendered under a higher stacking context. The symptom:
In code
The exact names this thing goes by in code — each row is one framework’s word for it. Use the row that matches your project (or paste it into your prompt).
| shadcn/ui | Command | |
| ARIA | role="dialog" | |
| ARIA | role="combobox" | |
| Radix | Dialog |