Combobox
Search and choose your project team.
Search and choose your project team.
A labeled text field that filters a list of options as you type; picks one value, or several with multiple.
A Markdown brief for Claude, Cursor or v0: install, setup, props and a complete example.
For one or several choices from a long list people would rather search than scroll.
Under fifteen options? Select or Choice is simpler.
Follows the ARIA combobox pattern: arrows move through options, Enter picks, Escape closes, and the active option is announced.
import { Combobox } from '@idyeah/diya'Stable since 1.0.0
labelRequiredstringVisible label above the field; also names the input and the option list for assistive tech. Hide it with hideLabel.
optionsRequiredComboboxOption[]The choices, in display order; typing filters them by label.
disabledbooleanPrevents typing and choosing, and dims the field.
Default false
errorstringVisible error message below the field; marks it invalid while set.
helperTextstringVisible hint below the field, announced with it; error replaces it while set.
hideLabelbooleanHides the label visually but keeps it as the input's accessible name.
Default false
multiplebooleanSingle mode (the default): leave unset or false. Choosing an option closes the list. Multiple mode: choices show as removable chips, choosing toggles an option and the list stays open.
namestringForm field name: the chosen value, or each chosen value in multiple mode, is sent with the form under it.
size"small" | "medium" | "large"Control height and type size; defaults to 'medium'.
Default 'medium'
multiple={false} (the default)defaultValuestringThe initially chosen value when uncontrolled; a form reset returns to it.
onValueChange(value: string) => voidCalled with the chosen option's value.
valuestringThe chosen option's value, or '' for none, when controlled; pair it with onValueChange.
multiple={true}defaultValuestring[]The initially chosen values when uncontrolled; a form reset returns to them.
onValueChange(value: string[]) => voidCalled with the full new array of chosen values.
valuestring[]The chosen options' values, in the order they were picked, when controlled; pair it with onValueChange.
Also takes every native <input> attribute, such as name, id or data-*.