Combobox
Searchable single-select for lists too long to scan. Filters locally, or defers to a server via onSearchChange.
Type to filter. Wayne Enterprises is archived.
Nothing selected yet.
client = "globex" · country = null
import { Combobox, type ComboboxOption } from '@objectifthunes/whiteboard'
const clients: ComboboxOption[] = [
{ value: 'acme', label: 'Acme Industries', meta: '12 invoices' },
{ value: 'wayne', label: 'Wayne Enterprises', meta: 'archived', disabled: true },
]
<Combobox options={clients} value={client} onChange={setClient} clearable fullWidth />
{/* server-side search: you filter, it just renders */}
<Combobox
options={results}
value={client}
onChange={setClient}
onSearchChange={setQuery}
loading={isFetching}
/>Select is the right answer for a handful of options — it is a native element, and native beats custom on mobile every time. Reach for Combobox once the list is long enough that scanning it is work: countries, customers, repositories.
Pass onSearchChange and pre-filtered options to drive it from a server; pass neither and it filters the list it was given. It never double-filters, so a server that already narrowed the results is not narrowed again locally.
The arrow cursor walks only the selectable options, so disabled rows are skipped rather than being dead stops you have to press through.
The panel matches the trigger width via matchAnchorWidth, and the filter box takes focus on open so you can type immediately.