Select
Code:
<!--
Copyright IBM Corp. 2016, 2018
This source code is licensed under the Apache-2.0 license found in the
LICENSE file in the root directory of this source tree.
-->
<div class="bx--form-item">
<div
class="bx--select">
<label for="select-id" class="bx--label">Select label</label>
<div class="bx--select-input__wrapper" >
<select id="select-id" class="bx--select-input">
<option class="bx--select-option" value="" disabled selected hidden>
Choose an option
</option>
<option class="bx--select-option" value="solong" >
A much longer option that is worth having around to check how text flows
</option>
<optgroup class="bx--select-optgroup" label="Category 1">
<option class="bx--select-option" value="option1" >
Option 1
</option>
<option class="bx--select-option" value="option2" >
Option 2
</option>
</optgroup>
<optgroup class="bx--select-optgroup" label="Category 2">
<option class="bx--select-option" value="option1" >
Option 1
</option>
<option class="bx--select-option" value="option2" >
Option 2
</option>
</optgroup>
</select>
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="bx--select__arrow" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"></path></svg>
</div>
</div>
</div>
</div>
<div class="bx--form-item">
<div
class="bx--select bx--select--disabled">
<label for="select-id-disabled" class="bx--label bx--label--disabled">Select
label</label>
<div class="bx--select-input__wrapper" >
<select id="select-id-disabled" class="bx--select-input" disabled>
<option class="bx--select-option" value="" disabled selected hidden>Choose an option </option>
<option class="bx--select-option" value="solong" >A much longer option that is worth having around to check how text flows </option> <optgroup class="bx--select-optgroup" label="Category 1">
<option class="bx--select-option" value="option1" >Option 1 </option> <option class="bx--select-option" value="option2" >Option 2 </option> </optgroup> <optgroup class="bx--select-optgroup" label="Category 2">
<option class="bx--select-option" value="option1" >Option 1 </option> <option class="bx--select-option" value="option2" >Option 2 </option> </optgroup> </select>
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="bx--select__arrow" width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"></path></svg>
</div>
</div>
</div>
</div>