Skip to main content

Function: ListBox()

ListBox<T>(__namedParameters): Element

Defined in: components/ListBox/ListBox.tsx:74

A standalone semantic list box built on React Aria's ListBox — a selectable list of options.

Per ADR-007 the CONTAINER is Entity = Collection (an informational surface) and each ListBoxItem is Entity = Selection (input chrome). Set selectionMode="single|multiple". Use ListBoxItem for each option.

Type Parameters

Type ParameterDefault type
T extends objectobject

Parameters

ParameterType
__namedParametersListBoxProps<T>

Returns

Element

Example

<ListBox aria-label="Frameworks" selectionMode="multiple">
<ListBoxItem id="react">React</ListBoxItem>
<ListBoxItem id="vue">Vue</ListBoxItem>
</ListBox>