Appearance
Select
Single choice from dropdown.
Demo
Default
Loading
Empty
Invalid
API
Props
| Name | Type | Default |
|---|---|---|
| modelValue | type X =any | null |
| options | type X =T[] | null |
| mapLabel | type X =((option: T) => string) | keyof T | String(T) |
| mapValue | type X =((option: T) => unknown) | keyof T | T |
| hasSearch | type X =boolean | false |
| isMultiple | type X =boolean | false |
| isLoading | type X =boolean | false |
Events
| Name | Type |
|---|---|
| update:modelValue | type X =(value: any) => any |
Slots
| Name | Type |
|---|---|
| optionLabel | type X =scope: {option: T} |
Code examples
js
<Select
v-model="modelValue"
:options="products"
map-label="name"
map-value="(product) => product.id"
has-search
/>