Select
<ui5-select>
| Since 0.8.0The ui5-select
component is used to create a drop-down list.
Usage​
There are two main usages of the ui5-select>
.
- With Option (
ui5-option
) web component:
The available options of the Select are defined by using the Option component.
The Option comes with predefined design and layout, including icon
, text
and additional-text
.
- With OptionCustom (
ui5-option-custom
) web component.
Options with custom content are defined by using the OptionCustom component The OptionCustom component comes with no predefined layout and it expects consumers to define it.
Keyboard Handling​
The ui5-select
provides advanced keyboard handling.
- [F4] / [Alt] + [Up] / [Alt] + [Down] / [Space] or [Enter] - Opens/closes the drop-down.
- [Up] or [Down] - If the drop-down is closed - changes selection to the next or the previous option. If the drop-down is opened - moves focus to the next or the previous option.
- [Space], [Enter] - If the drop-down is opened - selects the focused option.
- [Escape] - Closes the drop-down without changing the selection.
- [Home] - Navigates to first option
- [End] - Navigates to the last option
ES6 Module Import​
import "@ui5/webcomponents/dist/Select";
import "@ui5/webcomponents/dist/Option";
import "@ui5/webcomponents/dist/OptionCustom";