Skip to content

Command palette

A ⌘K palette to jump anywhere and run any command. Opens instantly, no animation.

npx dtheo@latest add command

When to use

  • Power-user navigation across a suite of tools
  • Running actions by name
  • The only way to reach a feature: everything in the palette must also be reachable on screen
  • Small tools with a handful of actions

API

items
value, label, group, optional hint, shortcut, icon and onSelect.CommandItemData[]
shortcut= true
Toggle with ⌘K / Ctrl+K. Pass false when another palette on the page owns it.boolean

Other props pass through to Base UI’s Autocomplete.

Keyboard

⌘KCtrl K
Opens or closes the palette
Arrow keys
Move the highlight
Enter
Runs the highlighted command
Escape
Closes

Used in