Combobox
Searchable select: a button trigger opening a filterable option list in a popover.
Works controlled (value + onValueChange) or uncontrolled; supports virtualization for large lists.
Usage
@desk/ui/components/combobox
<Field className="w-72">
<FieldLabel htmlFor="finish-filter">Filter by finish</FieldLabel>
<FieldContent>
<Combobox items={FINISHES} placeholder="Any finish…" />
</FieldContent>
</Field>Best practices
Use
Comboboxwhen the user filters/searches a long list; useSelectfor a short closed list, or a domain variant likeCountryComboboxfor known sets.onValueChangefires with""when the current selection is toggled off — treat empty string as "cleared", not as a real value.For lists in the hundreds+, pass
virtualization={{ enabled: true }}so only visible rows mount instead of everyCommandItem.Provide
itemsas{ label, value }[]— the visible text comes fromlabelwhile selection is tracked byvalue.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| buttonClassName | string | Button class name | |
| contentClassName | string | Class name for the popover content panel | |
| data-testid | string | Test id for the trigger button | |
| disabled | boolean | Whether disabled | |
| items | ComboboxItem[] | List of items | |
| onValueChange | (value: string) => void | Called with the selected value, or | |
| placeholder | string | "Select…" | Placeholder text |
| size | ResponsiveSize | "xl" | Trigger size — a single token or a per-breakpoint object like
|
| value | string | Selected value; provide (with | |
| virtualization | ComboboxVirtualizationOptions | Virtualization settings for large item sets. |
Also exports
- interface
ComboboxItem - interface
ComboboxProps - interface
ComboboxVirtualizationOptions
Composition
Used by