List

Base list component for displaying a vertical collection of items with keyboard navigation and selection support.

Since ariaActiveDescendant is used for focus management, the list container is focused rather than individual items. Use :state(focused) in CSS to style focused items.

Properties

NameTypeDefaultDescription
noFocusControlBooleanfalseDisables automatic focus management via ariaActiveDescendant.

Methods

NameParametersDescription
focusFirstItem()Focus the first item in the list.
focusLastItem()Focus the last item in the list.
focusItem(item)itemFocus a specific item in the list.

Events

NameTypeDescription
selectListSelectEventFired when a list item has been selected.
item-focusListItemFocusEventFired when a list item is focused.

CSS Parts

NameDescription
itemsThe slot element for the list items.