ListItem

Base list item component for interactive list items in menus and selects.

Since ariaActiveDescendant is used in lists, list items are not actually focused. To style or animate a focused list item, use :state(focused) in CSS or handle custom behaviors by overriding updated().

Properties

NameTypeDefaultDescription
selectedBooleanfalseWhether the list item is selected.
focusedBooleanfalseWhether the list item has focus.

Methods

NameDescription
focus()Visually sets the focused state to true.
blur()Visually sets the focused state to false.