Select
A select opens the device's own list. Use it to choose one plain answer, such as a notice period, when radio buttons would take too much room.
Which control to use
Look at how many options there are, how much room the form has, and what each option has to show.
Anatomy
A closed select looks like a text field with a chevron at its end. The open list belongs to the operating system: a menu on a computer, a picker on a phone.
- Fill and focus
- as the text field
- Height
- 44 px, or 48 px large
- Chevron
- 16 px, 12 px from the end
- --text-muted
- Text ends at
- 36 px from the end
- Corner radius
- 8 px
- --radius-lg
The first option
If one answer suits most people, select it in advance. If none does, start with an empty option that asks the question, such as Choose a notice period, and treat it as no answer.
Write the options as parallel phrases in sentence case. If none of them may apply, add None.
States and keyboard
A select has the states of the text field. It tells the browser which theme the page is in, so the open list is dark in the dark theme and light in the light one.
The keyboard is the platform's own. The arrow keys move through the options, and typing a letter jumps to the first option that starts with it.
Permitted and not permitted
Permitted
Radio buttons for Yes and No
Both answers are in view and one click chooses.
Not permitted
A select that hides two answers
It costs a click to see a choice the page could show.