Command Deck
A command palette. Cmd or Ctrl plus a key opens it from anywhere; fuzzy search highlights the match, commands can open nested pages, prefixes limit results to a group, async results join in, and a highlight slides between rows.
pixikit.com/docs/app-ui/navigation/command-deck
Customize
Default open
Debounce200ms
Show preview
Show footer
Width720px
Portal
Close on select
Props
18| Name | Type | Default | Description |
|---|---|---|---|
open | boolean | None | Whether the palette is open, when you hold the state. |
defaultOpen | boolean | None | Whether the palette is open at first, when it holds the state. |
onOpenChange | (open: boolean) => void | None | Called with the next open state. |
hotkey | string | "k" | With Cmd or Ctrl, this key toggles the palette from anywhere; an empty string turns it off. |
items | CommandItem[] | [] | The commands, grouped by their `group`. |
onSearch | (query: string, signal: AbortSignal) => Promise<CommandItem[]> | None | Fetches more commands as the user types; results join the groups they name. |
debounce | number | 200 | Milliseconds to wait after typing before `onSearch` runs. |
recentKey | string | None | Stores the last chosen commands under this name and lists them while the query is empty. |
modes | CommandMode[] | [] | Prefix characters that limit the results to one group. |
placeholder | string | "Type a command or search" | Text in the empty input. |
emptyText | string | "No results" | Text when nothing matches. |
showPreview | boolean | false | Shows a side pane with the highlighted command's preview when the palette is wide. |
showFooter | boolean | true | Shows the key hints under the list. |
width | number | 640 | Width of the palette in px. |
trigger | ReactNode | None | What the button that opens the palette shows; the button also shows the hotkey. |
portal | boolean | true | Renders the palette in a portal on the page body; turn off to keep it inline. |
closeOnSelect | boolean | true | Closes the palette after a command is chosen. |
className | string | None |