Combobox

Filterable single-select with an animated custom listbox, built on the dropdown open/close machine

Category: inputs · WCAG 2.2-AA · select, combobox, dropdown, filter, search

Sizes

States

Props

PropTypeDefaultDescription
idstringBase id for the input and its listbox/aria wiring; auto-generated when omitted.
optionsComboboxOption[]The selectable options.
valuestringThe controlled value.
defaultValuestringThe initial value when uncontrolled.
onValueChange(value: string | undefined) => voidCalled with the selected option value (or undefined when cleared).
onChange(value: string | undefined) => voidDeprecated: use onValueChange (same string | undefined).
clearablebooleanfalseWhen true, shows a control to clear the selected value.
searchablebooleantrueWhen true, shows a search/filter input.
labelstringText label for the control.
hintstringSupplementary hint text shown with the control.
errorstringError message shown when the value is invalid.
size'sm' | 'md' | 'lg''md'Visual size of the component (e.g. 'sm', 'md', 'lg').
disabledbooleanfalseWhen true, disables the control and removes it from the tab order.
labelsComboboxLabelsOverrides for the component’s user-visible strings (i18n).
classNamestringAdditional CSS class names merged onto the root element.

Design tokens

When to use

When not to use

How to build an accessible Combobox in React →

Examples

Basic combobox

<Combobox
  label="Country"
  options={[
    { value: 'us', label: 'United States' },
    { value: 'de', label: 'Germany' },
    { value: 'fr', label: 'France' },
  ]}
  onChange={(value) => console.log(value)}
/>

Related components

← Back to docs