Founding sponsorYour name here

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…

the command k menuthe searchable list of app actionsthe quick launcher in the middle of the screenthe keyboard popup for jumping anywherethe vscode style command searchthe cmd k popup

…you meant a command palette.

Anatomy — every part, named

  1. 1
    Command inputCommandInput

    “The search field at the top of the ⌘K menu” is the command input.

  2. 2
    Command groupCommandGroup

    “The labeled section grouping similar actions” is a command group.

  3. 3
    Active commandCommandItem

    “The result with the highlight that Enter will run” is the active command.

  4. 4
    Command shortcutCommandShortcut

    “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/uiCommand
ARIArole="dialog"
ARIArole="combobox"
RadixDialog

See also

Search

Describe the UI element you're thinking of