Table of Contents |
---|
Description
...
Usage & Behavior
General guidelines
Structure
The drop-down consists of:
...
Interaction | Visual | Details |
---|---|---|
Hovering anywhere on the trigger area |
| |
Clicking anywhere on the trigger area |
| |
Selecting an option |
| |
Viewing options list with an existing selection |
| |
Selecting a No selection option |
| |
Clicking anywhere outside the drop-down |
| |
Focusing or hovering on a list option when its row contains action and status icons |
| |
Focusing or hovering over an action or status icon |
|
Searchable drop-down
A Search field should be added:
to options lists with over 15 items.
when users are likely to know what they are looking for.
...
The search field will be auto-focused when the options list opens, so that the user may start searching immediately.
The search field will operate as a Live Search.
The user may select an item either by using the mouse and clicking, or by using the Up and Down keys to navigate between options and Enter to select.
On selection, the options list will close.
The selected item will be presented in the trigger area.
The search field is cleared each time the options list is closed.
...
The All option is a master type checkbox, which controls the state of all the other checkboxes in the list. See Checkbox for the full behaviour.
The All option should be presented at the top of the options list.
When all items are selected, the trigger area should show All instead of a number.
...
Interaction | Visual | Details |
---|---|---|
Click the trigger area |
| |
Enter Search |
| |
Select an option |
| |
Delete search string |
|
Validations and errors
Please refer to the Field Validation page for more information.
A drop-down with a warning:
...
Use when:
The options list is small-medium in size.
Space is constrained.
Use the searchable type when:
there are more than 15 options.
when users are expected to know what they are looking for, and are likely to be aware of how the option is labelled.
Don’t use when:
The list has fewer than 3 options.
The list has fewer than 7 options and the user needs to see them all at once → use /wiki/spaces/UX/pages/299860272 Radio Buttons or Checkboxes instead.
The user needs to enter a value which is not in the list → use a /wiki/spaces/UX/pages/299860272 Combo Box instead.
The list is large → use Dual List Selector or List instead.
General:
Only show a scrollbar when the list has over 8 items.
Keep the text values as short as possible, because the list uses single lines only.
There is no horizontal scrolling in the option list.
The options list should adapt its length to the longest entry by default, but values which are too long may be truncated, with a tooltip displaying the full text (not recommended).
Place options that represent All or None at the beginning of the list, regardless of the sort order of the remaining items.
Do not allow the control to auto-adjust based on the selection.
If there’s no preceding label, or if the label is not indicative enough, the {NameOfEntity} should be added within the drop-down, after the number of selections. For example, 2 categories selected:
...
Unless otherwise specified, see our general compliance information in Fundamentals - Accessibility.
Focus management
If a search bar exists, it will be treated as the first item on the options list.
Keyboard | Trigger area | Options list |
---|---|---|
Tab | Navigates to the next component. |
|
Shift + Tab | Navigates to the previous component. |
|
Space | Opens the menu. |
|
Enter | Opens the menu. |
|
Esc | N/A | Closes the menu without updating the selection. |
Arrows | Up/Down - Opens the menu. |
Holding down the key will scroll continuously. |
Page Up/Home | N/A | Navigates to the first item. |
Page Down/End | N/A | Navigates to the last item. |
...