Table of Contents |
---|
Description
Status | ||||
---|---|---|---|---|
|
...
It allows users to select one or multiple values from a list of predefined values. An optional search field can help the user to find values easily.
Types
Type | Usage | Image |
---|---|---|
Regular drop-down | When the user can only select one option from a predefined list. When there are fewer than 15 options. | |
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. | ||
When the user can select multiple values from a predefined list | ||
Usage & Behavior
General guidelines
Structure
The drop-down consists of:
...
Text labels | |
Text labels plus icons | |
Action icons |
Default State
The drop-down trigger area consists of a text box showing the default option, if one exists. For example:
...
Where there is no label, the default text will be Select a {NameOfEntity}. For example, Select a queue.
...
Content
A drop-down menu can (optionally) have a preceding label. Labels inform the user about what is included in the options list.
...
Logical. Sort options into a meaningful order. For example, group related options together, and order by the most common to least common.
Alphabetical. If there are more than 8 options available, sort them alphabetically. This helps the user to find the right option quickly. Sort currencies, names, and similar content alphabetically.
Numeric. Sort numeric values in a sequential order, with the lowest number first.
Chronological. Sort time-related information into chronological order, with the most recent first.
Internal Logic
Users need to select one option exclusively from a short list. (Where the user can select multiple options, see Multi-select drop-down below).
There should be a minimum of 3 options.
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 of an option, the options list will close.
The selected option will be shown in the trigger area.
States
State | Visual | |
---|---|---|
Regular | ||
Hover | ||
Active | ||
Selected | ||
Disabled | ||
Error | ||
Warning | ||
Focused | ||
Focused, Hover | ||
Focused, Active | ||
Focused, Disabled |
Interaction
Interaction | Visual | Details |
---|---|---|
None | The Select field always displays either:
See the Default State section above. | |
Hover | ||
Click the trigger area |
| |
Select an option | On selecting an option:
| |
Click anywhere outside of the drop-down |
| |
View options list with an existing selection |
|
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.
Internal Logic
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.
Interaction
Interaction | Visual | Details |
---|---|---|
Click the trigger area |
| |
Enter search |
| |
Select an option | On selecting an option:
| |
View options list with an existing selection |
|
Multi-select drop-down
A multi-select drop-down allows users to easily select multiple values from a predefined list.
Internal Logic
Selected items
The selected values are presented in the trigger area as read-only.
2 or more items are presented one after the other, separated by a comma and a space.
When the selected values exceed the size of the trigger area, the labels will be replaced by the total number of selections.
An option can be selected by clicking on the checkbox or the label.
When space is limited and/or the user is expected to select several items, a Select All option can be added.
...
The user is expected to select all or most of the items.
The list is very long (so it will allow the user to easily clear all selections).
Interaction
Interaction | Visual | Details |
---|---|---|
Click the trigger area |
| |
Select an option |
| |
Multiple items selected |
| |
Click on the trigger area, or |
|
Multi-select
...
searchable drop-down
Interaction
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:
...
A drop-down with an error:
...
Best practices
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 radio buttons → use Radio Buttons or Check boxesBoxes instead.
The user needs to enter a value which is not in the list . Use a combo box → use a Combo Box instead.
The list is large . Use → 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:
Accessibility Compliance
Unless otherwise specified, see our general compliance information in Fundamentals - Accessibility.
Design
Zeplin Link | Screen Thumbnail |
---|---|
Code
...
New LUX Design
Html macro | ||
---|---|---|
| ||
<link rel="stylesheet" href="https://ux.verint.com/fonts/css/verint_lux.css">
<link rel="stylesheet" href="https://ux.verint.com/bootstrap-4.0.0/dist/css/bootstrap.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://ux.verint.com/bootstrap-4.0.0/dist/js/bootstrap.bundle.js"></script>
<script src="https://ux.verint.com/bootstrap-4.0.0/dist/other/accessibility.js"></script>
<script src="https://ux.verint.com/bootstrap-4.0.0/dist/other/prism.min.js"></script>
<link rel="stylesheet" href="https://ux.verint.com/bootstrap-4.0.0/dist/other/prism-coy.min.css">
|
...
<script> $(function () { $('[data-toggle="tooltip"], [data-toggle-second="tooltip"]').tooltip({trigger: 'hover', delay: { "show": 100, "hide": 0 }}); $('.is-invalid, .is-warning').on('shown.bs.tooltip', function () { var x = $(this).offset().left + $(this).width(); var y = $(this).offset().top; $('.bs-tooltip-right').css('transform', 'translate3d('+x+'px, '+y+'px, 0px)'); }); }); </script> <div class="card"> <div class="card-header">Menu Button <button id="toggleMarkup" type="button" class="btn btn-sm btn-outline-primary btn btn-fixed-width float-right m-0" onclick="$('pre' ).toggle()">Toggle Markup</button></div> <div class="card-body"> <form> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm">Regular</label> <div class="col-lg-4"> <button class="btn btn-outline-light btn-sm btn-fixed-width dropdown-toggle menu-dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Menu</button> <div class="dropdown-menu dropdown-menu-sm"> <a class="dropdown-item" href="#">First Option</a> <a class="dropdown-item" href="#">Second Option</a> <a class="dropdown-item" href="#">Third Option</a> <a class="dropdown-item" href="#">Fourth Option</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#">Fifth Option</a> </div> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><button class="btn btn-outline-light btn-sm btn-fixed-width dropdown-toggle menu-dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Menu</button> <div class="dropdown-menu dropdown-menu-sm"> <a class="dropdown-item" href="#">First Option</a> <a class="dropdown-item" href="#">Second Option</a> <a class="dropdown-item" href="#">Third Option</a> <a class="dropdown-item" href="#">Fourth Option</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#">Fifth Option</a> </div></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm" |
...
>Disabled</label> <div class="col-lg-4"> <button class="btn btn-outline-light btn-sm btn-fixed-width dropdown-toggle menu-dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" |
...
disabled>Menu</button> <div class="dropdown-menu dropdown-menu-sm"> <a class="dropdown-item" href="#">First Option</a> <a class="dropdown-item" href="#">Second Option</a> <a class="dropdown-item" href="#">Third Option</a> <a class="dropdown-item" href="#">Fourth Option</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#">Fifth Option</a> </div> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><button class="btn btn-outline-light btn-sm btn-fixed-width dropdown-toggle menu-dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" |
...
disabled>Menu</button> <div class="dropdown-menu dropdown-menu-sm"> <a class="dropdown-item" href="#">First Option</a> <a class="dropdown-item" href="#">Second Option</a> <a class="dropdown-item" href="#">Third Option</a> <a class="dropdown-item" href="#">Fourth Option</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#">Fifth Option</a> </div></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm" |
...
>Error</label> <div class="col-lg-4"> <button class="btn btn-outline-light btn-sm btn-fixed-width dropdown-toggle menu-dropdown-toggle is-invalid" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-toggle-second="tooltip" data-custom-class="input-error" data-placement="right" |
...
title="There is an Error on the Menu Button">Menu</button> <div class="dropdown-menu dropdown-menu-sm"> <a class="dropdown-item" href="#">First Option</a> <a class="dropdown-item" href="#">Second Option</a> <a class="dropdown-item" href="#">Third Option</a> <a class="dropdown-item" href="#">Fourth Option</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#" |
...
>Fourth Option</a> </div> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><button class="btn btn-outline-light btn-sm btn-fixed-width dropdown-toggle menu-dropdown-toggle is-invalid" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-toggle-second="tooltip" data-custom-class="input-error" data-placement="right" |
...
title="There is an Error on the Menu Button">Menu</button> <div class="dropdown-menu dropdown-menu-sm"> <a class="dropdown-item" href="#">First Option</a> <a class="dropdown-item" href="#">Second Option</a> <a class="dropdown-item" href="#">Third Option</a> <a class="dropdown-item" href="#">Fourth Option</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#">Fifth Option</a> </div></script></code></pre> </div> </div> <div class="form-group row"> <label for="inputKey" class="col-lg-2 col-form-label col-form-label-sm" |
...
>Warning</label> <div class="col-lg-4"> <button class="btn btn-outline-light btn-sm btn-fixed-width dropdown-toggle menu-dropdown-toggle is- |
...
warning" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-toggle-second="tooltip" data-custom-class="input-warning" data-placement="right" title=" |
...
There is a Warning on the Menu Button">Menu</button> <div class="dropdown-menu dropdown-menu-sm"> <a class="dropdown-item" href="#">First Option</a> <a class="dropdown-item" href="#">Second Option</a> <a class="dropdown-item" href="#">Third Option</a> <a class="dropdown-item" href="#">Fourth Option</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#">Fourth Option</a> </div> </div> <div class="col-lg-6"> <pre class="language-html"><code><script type="prism-html-markup"><button class="btn btn-outline-light btn-sm btn-fixed-width dropdown-toggle menu-dropdown-toggle is- |
...
warning" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-toggle-second="tooltip" data-custom-class="input-warning" data-placement="right" title="There is a Warning on the Menu Button">Menu</button> <div class="dropdown-menu dropdown-menu-sm"> <a class="dropdown-item" href="#">First Option</a> <a class="dropdown-item" href="#">Second Option</a> <a class="dropdown-item" href="#">Third Option</a> <a class="dropdown-item" href="#">Fourth Option</a> <div class="dropdown-divider"></div> <a class="dropdown-item" href="#">Fifth Option</a> </div></script></code></pre> </div> </div> </form> </div> </div> |
...