Select
Overview
A Select Field enables users to choose a single item from a list of options through a dropdown menu or search functionality.
Live demo
Usage
Do
Use Select Fields when users can select from a list of options to enter information.
Offer clear and descriptive suggestions in the dropdown to help users quickly identify and select the desired option.
Don't
Avoid the use of a Select Field if there are fewer than three options for selection. In this case, use a radio button group instead.
Placement
The Select Field can be placed anywhere in the UI where user selection is required. It can be used alone or grouped with other input components to create a form.
Content
A Select Field should have a label. A Select Field without a label is ambiguous and not accessible. However, in some instances for example, when the Select Field immediately follows a page title and is the only form field used on the page, a label may not be necessary.
Follow capitalisation rules. Field labels, error messages, and menu items should be in sentence case.
Use clear error messages.
Avoid having multiple lines of text per item in a menu.
Keep select item labels as short as possible. When labels are long they will wrap within the dropdown menu.
Sizes
Select fields come in three different sizes: small, medium, and large. The medium size is the default and the most frequently used option. Use the other sizes sparingly; they should be used to create a hierarchy of importance within the page.
| Example | Size | When to use |
|---|---|---|
Example helper text | Medium | This is the default size and the most commonly used size. When in doubt, use the medium size. |
Example helper text | Small | Use when space is constricted or when placing a text input into a form that is long and complex. |
Example helper text | Large | Use when there is a lot of space to work with. The large size is typically used in simple forms or when a select field is placed by itself on a page.. |
States and interactions
| Example | Size | When to use |
|---|---|---|
| Enabled | Initial state displaying the label and select field in default styles. | |
| Hover | Occurs when the user hovers over the select field. | |
Error message | Error | Appears when the user inputs invalid data. |
| Error focus | The error focus state occurs when the user inputs invalid data, and the input field is also in focus. For touch devices the keyboard is shown. | |
| Focus | The focus state occurs when the input field is selected, and the cursor is blinking. For touch devices the keyboard is shown. | |
| Success | The success state occurs when the user inputs valid data, and the input field should change its style to indicate that there is no error. | |
| Success focus | The success focus state occurs when the user inputs valid data, and the input field is also in focus. For touch devices the keyboard is shown. | |
| Disabled | Shows that an input field exists but is not available in that circumstance. This can be used to maintain layout continuity and communicate that a field may become available later. | |
| Read-only | Text fields have a read-only option for when content in the disabled state still needs to be shown. This allows for content to be copied, but not interacted with or changed. |
Accessibility
Ensure that users can navigate and select options using only the keyboard.
Each option in the Select Field menu should have a clear and concise label that describes the option.
Provide clear instructions and hints that help users understand what is expected of them when using the Select Field. Consider using helper text to provide additional guidance.
Provide clear error messages, when users enter invalid data, that tell the user what they need to do to fix the problem.
iOS guidance
Along with the guidance above, there is some iOS specific guidance for this component.
Ensure touch-friendly design with appropriately sized tap areas.
Use concise labels and consider incorporating relevant icons.