Combobox
Overview
Root of a Combobox widget. Combines a searchable input with a filtered option list.
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| modelValue | string|number|boolean|object|array | undefined | The controlled value. Can be bound with v-model. | |
| defaultValue | string|number|boolean|object|array | undefined | Initial value when uncontrolled. | |
| open | boolean | undefined | The controlled open state. Can be bound with v-model:open. | |
| defaultOpen | boolean | undefined | Initial open state when uncontrolled. | |
| multiple | boolean | undefined | Whether multiple options can be selected. | |
| dir | string | undefined | Reading direction. | |
| disabled | boolean | undefined | When true, prevents user interaction. | |
| highlightOnHover | boolean | undefined | Whether hovering an item triggers highlight. | |
| by | string|func | undefined | Field for object comparison, or a custom comparison function. | |
| name | string | undefined | Name for form submission. | |
| required | boolean | undefined | Whether the field is required. | |
| resetSearchTermOnBlur | boolean | undefined | Whether to reset the search term when the input blurs. | |
| resetSearchTermOnSelect | boolean | undefined | Whether to reset the search term when a value is selected. | |
| as | string|object | undefined | The HTML element or component to render as. | |
| asChild | boolean | undefined | Whether to render as a child element. |
Slots
default
Scoped slot.
Events
| Name | Description |
|---|---|
update:modelValue | Emitted when the value changes. |
update:open | Emitted when the open state changes. |
highlight | Emitted when an item is highlighted. |
Source
client/lib/controls/combobox/Combobox.vue