Skip to content
PixiKit

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
NameTypeDefaultDescription
openbooleanNoneWhether the palette is open, when you hold the state.
defaultOpenbooleanNoneWhether the palette is open at first, when it holds the state.
onOpenChange(open: boolean) => voidNoneCalled with the next open state.
hotkeystring"k"With Cmd or Ctrl, this key toggles the palette from anywhere; an empty string turns it off.
itemsCommandItem[][]The commands, grouped by their `group`.
onSearch(query: string, signal: AbortSignal) => Promise<CommandItem[]>NoneFetches more commands as the user types; results join the groups they name.
debouncenumber200Milliseconds to wait after typing before `onSearch` runs.
recentKeystringNoneStores the last chosen commands under this name and lists them while the query is empty.
modesCommandMode[][]Prefix characters that limit the results to one group.
placeholderstring"Type a command or search"Text in the empty input.
emptyTextstring"No results"Text when nothing matches.
showPreviewbooleanfalseShows a side pane with the highlighted command's preview when the palette is wide.
showFooterbooleantrueShows the key hints under the list.
widthnumber640Width of the palette in px.
triggerReactNodeNoneWhat the button that opens the palette shows; the button also shows the hotkey.
portalbooleantrueRenders the palette in a portal on the page body; turn off to keep it inline.
closeOnSelectbooleantrueCloses the palette after a command is chosen.
classNamestringNone

Related