Select menu (web component)
Select menus allow users to make a single selection from a list of options.
Also known as: combobox, dropdown, dropdown list, listbox, picker, select box, select input, select menu, super select
Looking for the HTML version? See Select (HTML)
Select menus let users select one option from a number of options.
<bolt-select label="Select menu name">
<option value="item1">Select menu item one</option>
<option value="item2">Select menu item two</option>
<option value="item3">Select menu item three</option>
</bolt-select>
<bolt-select label="Select menu name" required error="You must select an option">
<option value="item1">Select menu item one</option>
<option value="item2">Select menu item two</option>
<option value="item3">Select menu item three</option>
</bolt-select>
<bolt-select label="Field Name" required invalid>
<option value="item1">Select menu item one</option>
<option value="item2">Select menu item two</option>
<option value="item3">Select menu item three</option>
</bolt-select>
<bolt-select label="Select menu name" disabled>
<option value="item1">Select menu item one</option>
<option value="item2">Select menu item two</option>
<option value="item3">Select menu item three</option>
</bolt-select>
<bolt-select label="Non-required select menu" optionaltext="hide">
<option value="item1">Select menu item one</option>
<option value="item2">Select menu item two</option>
<option value="item3">Select menu item three</option>
</bolt-select>
<bolt-select label="Fund name" width="20">
<option value="item1">Nationwide AllianzGI International Growth Fund</option>
<option value="item2">Nationwide Bailard International Equities Fund Equity Funds</option>
<option value="item3">Nationwide Global Sustainable Equity Fund</option>
</bolt-select>
<bolt-select label="Fund name" width="fit-content">
<option value="item1">Nationwide AllianzGI International Growth Fund</option>
<option value="item2">Nationwide Bailard International Equities Fund Equity Funds</option>
<option value="item3">Nationwide Global Sustainable Equity Fund</option>
</bolt-select>
<bolt-select label="Fund name" placeholder="Choose one">
<option value="item1">Nationwide AllianzGI International Growth Fund</option>
<option value="item2">Nationwide Bailard International Equities Fund Equity Funds</option>
<option value="item3">Nationwide Global Sustainable Equity Fund</option>
</bolt-select>
Help text body content
<bolt-select label="Select menu name">
<bolt-contextual-help slot="help" heading="Help text heading">
<p>Help text body content</p>
</bolt-contextual-help>
<option value="item1">Select menu item one</option>
<option value="item2">Select menu item two</option>
<option value="item3">Select menu item three</option>
</bolt-select>
The web component implementation reduces the need for explicitly-defined behavioral logic. However, it provides limited control over the underlying HTML markup.
If you require maximum control over the HTML markup, check out the HTML implementation.
The <bolt-select> custom element creates a select menu with a label and optional error and hint text. The "Select" option text is present as part of the custom element; it should not be passed as an option.
<bolt-select label="Choose an option">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</bolt-select>
The <bolt-select> element must include one of these three parameters:
label: The label text for the input. This generates a visible<label>element associated with this<select>.arialabel: Sets thearia-labelattribute of the underlying<select>element.arialabelledby: Sets thearia-labelledbyattribute of the underlying<select>element.
Additionally, The <bolt-select> element supports the following parameters:
value: optional. The value for the input, which must be a string. Thevalueattribute will not accept an object.required: optional. If present, the field is required. Fields that are not required will show "(optional)".optionaltext: optional.show(default) orhide. Use to remove the "(optional)" text from non-required fields.disabled: optional. If present, disables rendered interactive elements.error: optional. The error message to display below the input.- Should not be used when component is
disabled. For slotted field error see select error slot
- Should not be used when component is
width: optional.full(default) spans the entire width of the container.fit-contentsets the width of theselectbox based on its longest option. A numerical value sets width in terms of average character widths.invalid: optional. If present, the field appears invalid.placeholder: optional. Defaults to "Select", but text can be customized.placeholdervalue: optional. Defaults to empty string.datatestselectoptional property to configure thedata-testvalue on the underlying<select>element. Default isselect.
The <bolt-select> element supports the use of <bolt-contextual-help> via the help slot placeholder. For more information and to see other options visit the contextual help page.
Internals
Permalink to "Internals"Test selectors
Permalink to "Test selectors"[data-test="select"]targets primary <select> element- Configurable via the
datatestselectproperty
- Configurable via the
General guidelines
Permalink to "General guidelines"- Select is used for selecting one item from a list of between 6 and 15 items. Avoid overwhelming users with too many options.
- Order the options in a Select logically.
- Only if a deliberate selection is required or if no option can be defaulted, should a Select display the placeholder text "Select" before a user interacts with it. Otherwise, any available option can be set as the Select's default.
- Combine a Select with a field label for context and the best accessibility. A field label is not needed when the component is used in a table. (e.g. where a column header provides accessible context.)
- When a screen does not provide enough space for a user to see the full text of an option, place the text, in full, below the Select to let the user know what they have chosen.
- Input validation and error messaging for a Select should only occur after a user submits a form.
- Select should never be in both error and disabled states at the same time.
When to use
Permalink to "When to use"- When a user needs to choose one option from a simple list of 6 or more options.
- Use Select if space constraints don't allow a large number of radio buttons to be used for selecting one option.
When not to use
Permalink to "When not to use"- Avoid using a Select when typing may be faster.
- Avoid if all options are required to be displayed concurrently.
When to use something else
Permalink to "When to use something else"- Avoid Select when displaying more than 15 options; consider using a Text field or Autocomplete, especially if filtering would be beneficial.
- Consider an alternative pattern when options are links navigating users to various places.
- Consider using Radio button for a list between 2 and 5 predefined options when space is available.
- Use Radio button instead of Select for a single boolean option.
- Use Switch for a binary decision where the input can be recorded or updated immediately.
- Use Checkbox for user confirmation (e.g., "I agree to…" or "I have read…") instead of Select.
Do
- Order options in Select logically.
- Display a user's selected option after a choice is made.
- Have clear, short field labels that provide users with an idea of the options they will see before opening a Select.
Don't
- Don't disable options; hide them instead.
- Don't add subtext or images into a Select.
- Don't add too many options; but at least 6 options are recommended.
- Don't allow choosing an item from a Select to act as navigation. Allow the user to make a choice and then press a button to proceed.
Content guidelines
Permalink to "Content guidelines"- Select field labels and items use sentence case.
- Error messages use sentence case and include a period.
Accessibility compliance
Permalink to "Accessibility compliance"-
WCAG 2.2 Compliant
-
JAWS 2025 Tested
-
NVDA 2025 Tested
-
VoiceOver Tested
-
Keyboard Tested
-
aXe Tested
All Bolt components have gone through accessibility testing, but please keep our accessibility guidelines in mind.