Skip to main content

Function: ComboBox()

ComboBox<T>(__namedParameters): Element

Defined in: components/ComboBox/ComboBox.tsx:160

A semantic text input with a filtered option list, built on React Aria.

The answer to a Select that has grown past scanning range: typing filters the options (typeahead), while the chevron still opens the full list. Entity = Input — the user's primary act is typing, and the list narrows what they type (see the Entity rationale in this file's header). Options are ComboBoxItem.

Validation is the invalid State (via isInvalid/validate), never an evaluation variant, and it surfaces in a validationMessage part — which Select now carries too (F-009 closed in forms C2; this doc claimed the distinction while it lasted).

Host geometry knob: --fsl-combo-box-max-height caps the scrolling list.

Type Parameters

Type ParameterDefault type
T extends objectobject

Parameters

ParameterType
__namedParametersComboBoxProps<T>

Returns

Element

Example

<ComboBox label="Timezone" defaultSelectedKey="America/Sao_Paulo">
<ComboBoxItem id="America/Sao_Paulo">São Paulo</ComboBoxItem>
<ComboBoxItem id="Europe/Lisbon">Lisbon</ComboBoxItem>
</ComboBox>