Combobox
Searchable select with keyboard navigation. Type to filter, ArrowUp/Down to move, Enter to select, Escape to dismiss.
Usage
import { Combobox } from '@bwo-ui/react';
const [value, setValue] = useState<string | null>(null);
<Combobox
options={[
{ value: 'next', label: 'Next.js' },
{ value: 'remix', label: 'Remix' },
]}
value={value}
onValueChange={setValue}
placeholder="Pick a framework…"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
options | ComboboxOption[] | — | List of selectable options. |
value | string | null | — | Controlled selected value. |
onValueChange | (value: string | null) => void | — | Called when the selection changes. |
filter | (option, query) => boolean | — | Custom matcher (default: case-insensitive substring on label). |
emptyState | ReactNode | — | Rendered when no options match the current query. |