Select Vue Bootstrap 5 Select Vue Select fields components are used for collecting user provided information from a list of options.
Note: Read the API tab to find all available options and advanced customization
Basic example Select options are added using v-model with the options argument. You can get selected values in two ways. The first is to filter the data given in v-model:options by a selected key. The second method is to use v-model:selected which is read-only and stores the currently selected options as a string (single select) or as an array (multiple select).
Basic select behaves like a native one and by default marks the first available option as selected. To change this setting, easily set the preselect property to false.
One Two Three Four Five Six Seven Eight
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Multiselect Add multiple property to the select component to activate multiple mode.
One Two Three Four Five Six Seven Eight Example label
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Select with label It is possible to add select label by setting the label property.
One Two Three Four Five Example label
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Select with placeholder Use placeholder property to set placeholder for select input. The placeholder will be displayed when input is focused and no option is selected.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Disabled select Add disabled attribute to the select component to disable select input.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Disabled options Use disabled key on option element to disable specific option.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Custom content Custom content will be displayed at the end of the select dropdown.
One Two Three Four Five Save
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Visible options Use visibleOptions property to change the number of options that will be displayed in the select dropdown without scrolling.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Secondary text Add secondary-text key to the specific options to display secondary text.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Search Set filter property to enable options filtering.
One Two Three Four Five Six Seven Eight Nine Ten
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Select with search inside a modal This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Option groups It is possible to group options by using optgroup key.
One Two Three Four Five Six
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Select with icons Add icon property to the specific options to display the option icon.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Validation Set isValidated and isValid properties to enable component validation. The validFeedback and invalidFeedback options allow to modify the validation messages. Validate method can be set on select's change event.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
You can create custom rules and show the validation results via isValidated and isValid properties.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Set value The setValue method allows to programatically set the component selections.
Single selection Add single value string to the arguments list to correctly select option with corresponding value in single selection mode.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Multi selection Add array of string values to the arguments list to correctly select options with corresponding values in multi selection mode.
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Select with toggle element If you want to toggle Select via button, you have to add toggle / open / close function from MDBSelect ref and pin her to this button.
One Two Three Four Five Toggle Select
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Auto select Set autoSelect option to true to enable selecting on Tab press.
One Two Three Four Five Six Seven Eight
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.
Hidden selected option Add the first option with the hidden and selected attributes and an empty value to leave select with no selection.
One Two Three Four Five Six Seven Eight Example label
This is a mobile version of the documentation. View this website on the desktop to copy & edit the source code of the component.