Skip to content
On this page

Select

Select an item in a dropdown list. Use with Field to access all functionalities

Examples

Base

Something went wrong with this field

Show code

Variants

Show code

Class props

'Classes applied to the element'
How does the Class props inspector work?
Class propDescriptionPropsSuffixes
arrowClassClass of the select arrow.
👉 It applies the arrow icon using background-image and background-position on select element. An alternative to override it is iconRight prop (globally or not)
expandedClassClass of select when expanded.expanded
iconLeftClassClass of the left icon.icon
iconLeftSpaceClassClass of the left icon space inside the select.icon
iconRightClassClass of the right icon.iconRight
iconRightSpaceClassClass of the right icon space inside the select.iconRight
multipleClassClass of the select when multiple mode is active.multiple
placeholderClassClass of the select placeholder.
rootClassClass of the root element.
roundedClassClass of select when rounded.rounded
selectClassClass of the native select element.
sizeClassClass of the select size.sizesmall
medium
large
variantClassClass of the select variant.variantprimary
info
warning
danger

Select component

html
<o-select></o-select>

Props

Prop nameDescriptionTypeValuesDefault
autocompleteNative options to use in HTML5 validationstring-
expandedMakes input full width when inside a grouped or addon fieldboolean-
iconIcon name to be addedstring-
iconPackIcon pack to usestringmdi, fa, fas and any other custom icon pack
From config:
select: {
  iconPack: undefined
}
iconRightIcon name to be added on the right sidestring-
From config:
select: {
  iconRight: undefined
}
maxlengthSame as native maxlength, plus character counternumber|string-
multipleboolean-
nativeSizeSame as native sizestring|number-
overrideboolean-
placeholderText when nothing is selectedstring-
roundedMakes the element roundedboolean-
sizeVertical size of input, optionalstringsmall, medium, large
statusIconShow status icon using field and variant propboolean-
From config:
{
   "statusIcon": true
}
useHtml5ValidationEnable html 5 native validationboolean-
From config:
{
   "useHtml5Validation": true
}
v-modelstring|number|boolean|object|array-null
validationMessageThe message which is shown when a validation error occursstring-
variantColor of the control, optionalstringprimary, info, success, warning, danger, and any other custom color

Events

Event namePropertiesDescription
blur
focus
invalid
update:modelValue

Slots

NameDescriptionBindings
default

Sass variables

Current theme ➜ Oruga Base

SASS VariableDefault
$select-background-color#fff
$select-border-color$grey-lighter
$select-border-width1px
$select-border-stylesolid
$select-border-radius$base-border-radius
$select-rounded-border-radius$base-rounded-border-radius
$select-box-shadownone
$select-color#363636
$select-icon-zindex4
$select-height$control-height
$select-arrow-size1rem
$select-line-height$base-line-height
$select-margin0
$select-max-width100%
$select-width100%
$select-placeholder-opacity$base-disabled-opacity
$select-padding$control-padding-vertical $control-padding-horizontal

See ➜ 📄 Full scss file

Current theme ➜ Oruga Full

SASS VariableDefault
$select-background-color#fff
$select-border-color$grey-lighter
$select-border-width1px
$select-border-stylesolid
$select-border-radius$base-border-radius
$select-rounded-border-radius$base-rounded-border-radius
$select-box-shadownone
$select-color#363636
$select-icon-zindex4
$select-height$control-height
$select-arrow-size1rem
$select-line-height$base-line-height
$select-margin0
$select-max-width100%
$select-width100%
$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.

Released under the MIT License.