Installation
npx shadcn@latest add @iconiq/comboboxProps
ComboboxOption
3 props
Each selectable row is described by a plain object and can optionally include a secondary description line.
value
stringRequired
Stable identifier used for the selected state and returned through onChange.
label
stringRequired
Primary text shown in the closed field and inside the dropdown row.
description
stringOptional helper copy rendered under the label inside the dropdown list.
Combobox
8 props
Searchable single-select field that owns open state, search query, and active row internally, while the selected value stays parent-driven.
options
ComboboxOption[]Required
Available rows rendered in display order and used as the filtering source.
value
stringCurrently selected option value. The component derives the visible label entirely from this prop when the field is closed.
onChange
(value: string) => voidCalled when a row is selected and also when the clear action resets the field to an empty string.
placeholder
stringDefault
"Select an option..."Shown when no value is selected, and again while the field is open with an empty query.
emptyMessage
stringDefault
"No results found."Fallback copy rendered when filtering produces no matching options.
className
stringMerged onto the outer relative wrapper so width or placement can be adjusted externally.
disabled
booleanDefault
falseDisables the input, blocks opening, and applies a reduced-opacity presentation.
clearable
booleanDefault
trueControls whether the clear button appears once a value has been selected.
Notes
This is effectively controlled for selection. If the parent does not feed the next onChange result back into value, the checkmark and closed-field label do not update.
Closing the popover resets the live query string, so reopening the field starts from the full option list again.