Select
Overview
Root of a Select widget. Wrap with SelectTrigger and SelectContent.
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. | |
| by | string|func | undefined | Field for object comparison, or a custom comparison function. | |
| dir | string | undefined | Reading direction. | |
| multiple | boolean | undefined | Whether multiple options can be selected. | |
| autocomplete | string | undefined | Native autocomplete attribute. | |
| disabled | boolean | undefined | When true, prevents user interaction. | |
| name | string | undefined | Name for form submission. | |
| required | boolean | undefined | Whether the field is required. |
Slots
default
Scoped slot.
Events
| Name | Description |
|---|---|
update:modelValue | Emitted when the value changes. |
update:open | Emitted when the open state changes. |
Source
client/lib/controls/select/Select.vue