Select
Select an item in a dropdown list. Use with Field to access all functionalities
The select class is a simple wrapper around the <select> HTML element, which gives the styling more flexibility and support for icons.
Several modifiers are supported which affect:
-
the color is available in all the different colors defined by the
$colorsSass map. -
the size:
is-small,is-medium,is-large - the state
<div class="select">
<select>
<option>Select dropdown</option>
<option>With options</option>
</select>
</div>
Multiple select
You can style a multiple select dropdown, by using the is-multiple modifier, and by using the multiple HTML attribute.
<div class="select is-multiple">
<select multiple size="8">
<option value="Argentina">Argentina</option>
<option value="Bolivia">Bolivia</option>
<option value="Brazil">Brazil</option>
<option value="Chile">Chile</option>
<option value="Colombia">Colombia</option>
<option value="Ecuador">Ecuador</option>
<option value="Guyana">Guyana</option>
<option value="Paraguay">Paraguay</option>
<option value="Peru">Peru</option>
<option value="Suriname">Suriname</option>
<option value="Uruguay">Uruguay</option>
<option value="Venezuela">Venezuela</option>
</select>
</div>
With icons
You can append the modifier on a control:
has-icons-left
You also need to add a modifier on the icon:
icon is-leftsincehas-icons-leftis used
The size of the select will define the size of the icon container.
<div class="field">
<div class="control has-icons-left">
<div class="select">
<select>
<option selected>Country</option>
<option>Select dropdown</option>
<option>With options</option>
</select>
</div>
<div class="icon is-small is-left">
<i class="fas fa-globe"></i>
</div>
</div>
</div>