Select
Select an item in a dropdown list. Use with Field to access all functionalities
Class props
Select component
Select an item in a dropdown list. Use with Field to access all functionalities
html
<o-select></o-select>
Props
Prop name | Description | Type | Values | Default |
---|---|---|---|---|
autocomplete | Same as native autocomplete options to use in HTML5 validation | string | - | From config: select: { |
disabled | Same as native disabled | boolean | - | false |
expanded | Makes input full width when inside a grouped or addon field | boolean | - | false |
icon | Icon to be shown | string | - | From config: select: { |
iconClickable | Makes the icon clickable | boolean | - | false |
iconPack | Icon pack to use | string | mdi , fa , fas and any other custom icon pack | From config: select: { |
iconRight | Icon to be added on the right side | string | - | From config: select: { |
iconRightClickable | Make the icon right clickable | boolean | - | false |
iconRightVariant | Variant of right icon | string | - | |
id | Same as native id. Also set the for label for o-field wrapper. | string | - | Default function (see source code) |
multiple | Allow multiple selection | boolean | - | false |
nativeSize | Same as native size | string|number | - | |
options | Select options, unnecessary when default slot is used | string[] | OptionsItem[] | - | |
override | Override existing theme classes completely | boolean | - | |
placeholder | Text when nothing is selected | string | - | |
rounded | Makes the element rounded | boolean | - | false |
size | Vertical size of input | string | small , medium , large | From config: select: { |
statusIcon | Show status icon using field and variant prop | boolean | - | From config: { |
useHtml5Validation | Enable html 5 native validation | boolean | - | From config: { |
v-model | string|number|boolean|object|array | - | null | |
validationMessage | The message which is shown when a validation error occurs | string | - | |
variant | Color of the control | string | primary , info , success , warning , danger , and any other custom color | From config: select: { |
Events
Event name | Properties | Description |
---|---|---|
update:modelValue | value string | number | boolean | object | Array<any> - updated modelValue prop | modelValue prop two-way binding |
focus | event Event - native event | on input focus event |
blur | event Event - native event | on input blur event |
invalid | event Event - native event | on input invalid event |
icon-click | event Event - native event | on icon click event |
icon-right-click | event Event - native event | on icon right click event |
Slots
Name | Description | Bindings |
---|---|---|
placeholder | Override the placeholder | |
default | Override the options, default is options prop |
Sass variables
Current theme ➜ Oruga Base
SASS Variable | Default |
---|---|
$select-background-color | #fff |
$select-border-color | $grey-lighter |
$select-border-width | 1px |
$select-border-style | solid |
$select-border-radius | $base-border-radius |
$select-rounded-border-radius | $base-rounded-border-radius |
$select-box-shadow | none |
$select-color | #363636 |
$select-icon-zindex | 4 |
$select-height | $control-height |
$select-arrow-size | 1rem |
$select-line-height | $base-line-height |
$select-margin | 0 |
$select-max-width | 100% |
$select-width | 100% |
$select-placeholder-opacity | $base-disabled-opacity |
$select-padding | $control-padding-vertical $control-padding-horizontal |
See ➜ 📄 Full scss file
Current theme ➜ Oruga Full
SASS Variable | Default |
---|---|
$select-background-color | #fff |
$select-border-color | $grey-lighter |
$select-border-width | 1px |
$select-border-style | solid |
$select-border-radius | $base-border-radius |
$select-rounded-border-radius | $base-rounded-border-radius |
$select-box-shadow | none |
$select-color | #363636 |
$select-icon-zindex | 4 |
$select-height | $control-height |
$select-arrow-size | 1rem |
$select-line-height | $base-line-height |
$select-margin | 0 |
$select-max-width | 100% |
$select-width | 100% |
$select-placeholder-opacity | $base-disabled-opacity |
$select-padding | $control-padding-vertical $control-padding-horizontal |
See ➜ 📄 Full scss file
Current theme ➜ Bulma
The theme does not have any custom variables for this component.
Current theme ➜ Bootstrap
The theme does not have any custom variables for this component.