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 formultiple={true})defaultValue: Uncontrolled default valueonValueChange: Called when selection changesinputValue: Controlled input text valuedefaultInputValue: Uncontrolled default input valueonInputValueChange: Called when input text changesmultiple: Whether multiple items can be selected (default:false)open: Controlled popup open statedefaultOpen: Uncontrolled default open stateonOpenChange: Called when popup opens/closesitems: Array of items or groupsfilter: Custom filter function (ornullfor 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 nameautoComplete: Browser autocomplete hintitemToStringLabel: Convert object items to string for displayitemToStringValue: Convert object items to string for form submissionisItemEqualToValue: Custom equality function for object itemsonItemHighlighted: Called when item is highlightedopenOnInputClick: Whether clicking input opens popupmodal: 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 representsdisabled: Whether this item is disabled
data-highlighted: Present when item is highlighteddata-selected: Present when item is selecteddata-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 (whenmultiple={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 whenmodal={true}.