Command
Overview
Root of a command palette with built-in filtering, providing context to child components.
Theme entry: Command
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| themeOverride | String|Object|Array | null | A partial theme object merged with the component's default theme; accepts a class string, class array, or theme object. | |
| class | import('vue').HTMLAttributes['class'] | undefined | Additional CSS classes to apply to the root element. | |
| modelValue | string|number|boolean|object|array | "" | The controlled value. Can be bound with v-model. | |
| defaultValue | string|number|boolean|object|array | undefined | The initial value when uncontrolled. | |
| multiple | boolean | undefined | Whether multiple options can be selected. | |
| orientation | string | undefined | The orientation of the listbox for arrow navigation. | |
| dir | string | undefined | The reading direction. | |
| disabled | boolean | undefined | When true, prevents user interaction. | |
| selectionBehavior | string | undefined | How multiple selection behaves in the collection. | |
| highlightOnHover | boolean | undefined | When true, hovering an item triggers highlight. | |
| by | string|func | undefined | Field for object comparison, or a custom comparison function. | |
| name | string | undefined | The name submitted with the form. | |
| required | boolean | undefined | When true, the field is required. | |
| as | string|object | undefined | The HTML element or component to render as. | |
| asChild | boolean | undefined | Whether to render as a child element. |
Slots
default
Slot.
Events
| Name | Description |
|---|---|
update:modelValue | Emitted when the value changes. |
highlight | Emitted when an item is highlighted. |
Source
client/lib/controls/command/Command.vue