Command Palette
A search-first dialog on ⌘K / Ctrl+K. Type to filter grouped commands, then run one with Enter.
import { CommandPalette } from "pleate/command-palette";Trips and actions
Try "portugal" or "booking" to match keywords.
Or press the shortcut anywhere on this page
Props
- open / defaultOpen / onOpenChange
Controlled or uncontrolled state.
boolean- shortcut
Global shortcut that toggles the palette.
string | falsedefault "mod+k"- groups
Commands. Item shortcuts are display only.
{ heading, items: { id, label, icon?, shortcut?, keywords?, onSelect }[] }[]- placeholder / emptyLabel
Field placeholder and the empty state.
string / ReactNodedefault "Search" / "No results"- label
Accessible name of the dialog.
stringdefault "Command palette"
Accessibility
- The input is a combobox; the active option is set with aria-activedescendant, so focus stays in the field.
- Arrow keys move, Enter runs and closes, Escape closes and returns focus.
- listbox / option / group roles, with groups labelled by their heading.