Components

BaseCommandDialog

A command palette or search dialog: a search field, grouped results and keyboard navigation.

components/ui/BaseCommandDialog.vue
View in the demo

Example

The dialog only draws the results: filter them yourself with the query model and pass them as groups. Arrow keys move the active row, Enter emits select with the item and closes the dialog, and Escape closes it. Items with child are indented under the row above them, as the sections of a page in the documentation search. AppCommandPalette and the documentation search are built on it.

API

Props

Name
Type
Default
Description
groups
required
BaseCommandGroup<T>[]—Each { key, title?, items }; an item is { key, title, subtitle?, icon, child? } plus any data you need back in select.
labelstring—The accessible name of the dialog and its field.
placeholderstring—The placeholder of the search field.
highlightbooleanfalseMarks the query in titles and subtitles with BaseTextMatch.
max-widthnumber640The width of the dialog in pixels.
results-heightnumber420The maximum height of the results before they scroll.
v-modelbooleanfalse—
querystring""—

Slots

Name
Slot props
Description
#empty—Shown when there are no groups, such as a BaseEmptyState.

Events

Name
Payload
Description
@select[item: T]An item was chosen with a click or Enter.
@update:modelValue[value: boolean]—
@update:query[value: string]—
© 2026 melsami UI.
Developer documentation for melsami UI.