A searchable list of actions, opened with a shortcut.
Type to filter, use the arrow keys to move and Enter to run the action.
Open it with Cmd+K, or Ctrl+K on Windows and Linux, using useKeyboard.
List the actions people reach for most, with a short hint of the shortcut on the right.
| Attribute | Description | Type | Accepted values | Default |
|---|---|---|---|---|
| visible | show the palette | boolean | - | - |
| onClose | called on Esc, backdrop or selection | () => void | - | - |
| items | actions to list | CommandItem[] | - | - |
| placeholder | placeholder of the search field | string | - | Type a command or search |
| emptyText | shown when nothing matches | string | - | No results. Try another word. |
interface CommandItem {
value: string
label: string
icon?: React.ReactNode
hint?: React.ReactNode
onSelect?: () => void
}