List
<ui5-list>The ui5-list component allows displaying a list of items, advanced keyboard
handling support for navigating between items, and predefined modes to improve the development efficiency.
The ui5-list is a container for the available list items:
ui5-liui5-li-customui5-li-group
To benefit from the built-in selection mechanism, you can use the available
selection modes, such as
Single, Multiple and Delete.
Additionally, the ui5-list provides header, footer, and customization for the list item separators.
Keyboard Handling
Basic Navigation
The ui5-list provides advanced keyboard handling.
When a list is focused the user can use the following keyboard
shortcuts in order to perform a navigation:
- [Up] or [Down] - Navigates up and down the items
- [Home] - Navigates to first item
- [End] - Navigates to the last item
The user can use the following keyboard shortcuts to perform actions (such as select, delete),
when the selectionMode property is in use:
- [Space] - Select an item (if
typeis 'Active') whenselectionModeis selection - [Delete] - Delete an item if
selectionModeproperty isDelete
Fast Navigation
This component provides a build in fast navigation group which can be used via [F6] / [Shift] + [F6] / [Ctrl] + [Alt/Option] / [Down] or [Ctrl] + [Alt/Option] + [Up].
In order to use this functionality, you need to import the following module:
import "@ui5/webcomponents-base/dist/features/F6Navigation.js"
ES6 Module Import
import "@ui5/webcomponents/dist/List.js";
import "@ui5/webcomponents/dist/ListItemStandard.js"; (for ui5-li)
import "@ui5/webcomponents/dist/ListItemCustom.js"; (for ui5-li-custom)
import "@ui5/webcomponents/dist/ListItemGroup.js"; (for ui5-li-group)