CommandPalette
Searchable command dialog with grouped results.
Use CommandPalette for searchable application commands when the available actions span several groups. Give duplicate titles distinct `id` values; titles remain searchable.
Interactive example
Loading interactive example
API
| Member | Type | Kind | Required | Default |
|---|---|---|---|---|
empty | Snippet | snippet | No | undefined |
filter | boolean | ((item: CommandPaletteItem, query: string) => boolean) | callback | No | true |
hotkey | string | false | prop | No | 'k' |
items | CommandPaletteItem[] | CommandPaletteGroup[] | prop | No | [] |
label | string | prop | No | 'Search' |
onSelect | (item: CommandPaletteItem) => void | callback | No | undefined |
onSubmit | (query: string) => void | callback | No | undefined |
open | boolean | binding | No | false |
placeholder | string | prop | No | 'Search…' |
query | string | binding | No | '' |
row | Snippet<[CommandPaletteItem, boolean]> | snippet | No | undefined |
Source
Loading source