Combobox
Base UIA select you can type into, for lists too long to scan.
Install
$ npx shadcn@latest add https://spotcheckui.com/r/combobox.jsonAlso installs @base-ui/react.
Usage
import { Combobox } from "@/components/spotcheck/combobox"
<Combobox label="Region" options={regions} value={region} onValueChange={setRegion} />Props
- label * Required
stringDefault —Names the input for screen readers. - options * Required
string[]Default — - value
string | nullDefault —The selected option, when you control it. - defaultValue
string | nullDefault —The starting option, when it manages itself. - onValueChange
(value: string | null) => voidDefault — - placeholder
stringDefault — - emptyText
stringDefault No matches.Shown when nothing matches. - className
stringDefault —
Keyboard
| ↑ ↓ | Move through matches |
|---|---|
| Enter | Choose a match |
| Esc | Close the list |
Reduced motion
The list appears without animation.