Command

A searchable list of actions, opened with a shortcut.

General

Type to filter, use the arrow keys to move and Enter to run the action.

With Shortcut

Open it with Cmd+K, or Ctrl+K on Windows and Linux, using useKeyboard.

App command palette

List the actions people reach for most, with a short hint of the shortcut on the right.

APIs

Command.Props

AttributeDescriptionTypeAccepted valuesDefault
visibleshow the paletteboolean--
onClosecalled on Esc, backdrop or selection() => void--
itemsactions to listCommandItem[]--
placeholderplaceholder of the search fieldstring-Type a command or search
emptyTextshown when nothing matchesstring-No results. Try another word.

CommandItem

interface CommandItem {
  value: string
  label: string
  icon?: React.ReactNode
  hint?: React.ReactNode
  onSelect?: () => void
}
Edit this page on GitHub