Skip to main content
The Combobox component combines text input with a filterable list for flexible selection with keyboard navigation and accessibility.

Import

Basic Usage

Sub-components

Combobox.Root

Groups all parts of the combobox. Doesn’t render its own HTML element. Key Props:
  • value: Controlled selected value (or array for multiple={true})
  • defaultValue: Uncontrolled default value
  • onValueChange: Called when selection changes
  • inputValue: Controlled input text value
  • defaultInputValue: Uncontrolled default input value
  • onInputValueChange: Called when input text changes
  • multiple: Whether multiple items can be selected (default: false)
  • open: Controlled popup open state
  • defaultOpen: Uncontrolled default open state
  • onOpenChange: Called when popup opens/closes
  • items: Array of items or groups
  • filter: Custom filter function (or null for no filtering)
  • autoHighlight: Auto-highlight first match (default: false)
  • highlightItemOnHover: Whether hovering highlights items (default: true)
  • disabled: Whether component is disabled (default: false)
  • readOnly: Whether input is read-only (default: false)
  • required: Whether field is required (default: false)
  • name: Form field name
  • autoComplete: Browser autocomplete hint
  • itemToStringLabel: Convert object items to string for display
  • itemToStringValue: Convert object items to string for form submission
  • isItemEqualToValue: Custom equality function for object items
  • onItemHighlighted: Called when item is highlighted
  • openOnInputClick: Whether clicking input opens popup
  • modal: Whether popup is modal (default: true)

Combobox.Trigger

Container for the input and icon.

Combobox.Input

The text input element. Renders an <input> element.

Combobox.Icon

Icon indicating the combobox can be opened.

Combobox.Clear

Button to clear the current selection.

Combobox.Portal

Portals the popup to a different part of the DOM.

Combobox.Positioner

Positions the popup relative to the trigger.

Combobox.Popup

The container for the list of items.

Combobox.List

Scrollable list container for items.

Combobox.Item

An individual selectable item. Props:
  • value: The value this item represents
  • disabled: Whether this item is disabled
State attributes:
  • data-highlighted: Present when item is highlighted
  • data-selected: Present when item is selected
  • data-disabled: Present when item is disabled

Combobox.ItemIndicator

Shown only when the item is selected (for visual feedback).

Combobox.Empty

Displayed when no items match the filter.

Combobox.Group

Groups related items together.

Combobox.GroupLabel

Label for a group of items.

Combobox.Value

Displays the selected value in the trigger.

Combobox.Chips

Container for multiple selection chips (when multiple={true}).

Combobox.Chip

Displays a single selected value chip.

Combobox.ChipRemove

Button to remove a chip.

Combobox.Arrow

Arrow pointing to the trigger.

Combobox.Backdrop

Backdrop shown when modal={true}.

Combobox.Status

Announces status changes for screen readers.

Multiple Selection

Grouped Items

Custom Filtering

Object Items

Styling

Form Integration