Intro
The combobox allows users to select an item from a predefined list.
It provides an editable input field for filtering the list, and a dropdown menu with a list of the available options.
If the entries are not validated by the application, users can also enter a custom value.
Combobox
When to Use
Do
Use the combobox:
- If users need to select a single item from a long list of items.
- If the list items are secondary information and do not need to be displayed right away.
Don't
Don’t use the combobox:
Anatomy
- Input field: Displays the selected value.
- Value/text: The content the user has entered into the field.
- Dropdown button: Expands and collapses the option list.
- Option list: Contains values from which the user can choose.
Anatomy of a combobox
Types
List Layouts
Two-column layout
Grouped items
Filters
When the user starts typing in the input field, the option list is filtered. Only items that match the characters entered are shown in the dropdown list. The following filter variants are available:
‘Starts with per term’ filter variant
‘Starts with’ filter variant
‘Contains’ filter variant
Behavior and Interaction
Choose from List
- Clicking the dropdown button opens the suggestion list.
- Selecting an item from the list enters it in the input field.
Type or Paste Text
-
The component responds as the user types or pastes in text:
-
- Suggestions are filtered based on the typed text (see Filter Variants).
- The autocomplete feature proposes matching labels. The autocompleted part of the text is highlighted.
-
-
To enter a value in the input field, the user can:
-
- Press Enter to accept the autocompleted text.
- Click an item in the suggestion list.
-
Combobox - choose from list
Handling of Incorrect Values
- If the user pastes or types a text that doesn’t match one of the selection options, it remains in place by default.
- If data validation is implemented, entering an incorrect text triggers an error message and the field displays in an error state.
Data validation – error state for incorrect value
Responsive Behavior
On mobile phones, the selection list is displayed as a full screen dialog.