Select
The form-control component that provides a menu of options.
The form-control component that provides a menu of options.
npm install @vrembem/select@use "@vrembem/select";Select uses design token CSS variables in a reference and fallback pattern. Variables are referenced in the component's styles but are not directly defined; instead, they are provided with sensible fallbacks.
| Variable | Fallback |
|---|---|
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
Copied! | Copied! |
There are no variables that match your search.
The most basic implementation of the select component consists of the .select class applied to a <select> form-control element.
<select class="select">
<option value="">Select one</option>
...
</select>Adding the boolean disabled attribute to the select will provide visual indication that the form-control is not available for use.
<select class="select" disabled>
...
</select>Adding the is-invalid class or aria-invalid="true" attribute to the select will provide visual indication that the form-control value is invalid. Invalid state is also triggered by the native :user-invalid state.
<select class="select is-invalid">
<option value="">Select one</option>
...
</select>