Form Inputs

ComboBox

A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query.

A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query.

Empty state#

When filtering returns no matches, the combo box displays a helpful empty state. Use emptyState to replace it with custom content (renderEmptyState is still supported but deprecated).

Component props#

NameTypeDescription
inputValuestringControlled input value
defaultInputValuestringDefault input value
selectedKeystringControlled selected key
defaultSelectedKeystringDefault selected key
isDisabledbooleanDisables the combobox (disabled is also accepted)
showClearbooleanShows a clear button while the input has a value
showIconbooleanShows the open/close trigger button (default: true)
aria-invalidbooleanMarks the input as invalid
onInputChange(value: string) => voidCalled when input changes
onSelectionChange(key: string) => voidCalled when selection changes
emptyStateReactNodeReplaces the default empty-state message
renderEmptyStateFunctionDeprecated alias for emptyState
itemToStringLabel(item) => stringResolves the display label for an item
itemToStringValue(item) => stringResolves the form value for an item

Anatomy#

Items are handed to Base UI as { label, value } objects, so filtering and label resolution happen inside the primitive. The rendered parts expose data-slot attributes: combobox, combobox-input, combobox-clear, combobox-trigger, combobox-positioner, combobox-content, and combobox-empty.