Cmd+K style command palette with lexical search, sectioned results and full keyboard navigation.

npx slipstream-ui@latest add command-palette
Playground

Props

PropTypeDefaultDescription
openbooleanrequiredControlled visibility
onOpenChange(open: boolean) => voidrequiredOpen/close requests
commandsCommand[]required{ id, label, section?, keywords?, shortcut? }
onSelect(command: Command) => voidrequiredChosen command handler
placeholderstringType a command…Input placeholder

Accessibility

  • Combobox pattern with aria-expanded, aria-controls and aria-activedescendant
  • Arrow keys cycle options, Enter selects, Escape closes; focus stays in the input
  • Options are role=option with aria-selected marking the active item