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

PropTypeDefaultDescription
optionsComboboxOption[]List of selectable options.
valuestring | nullControlled selected value.
onValueChange(value: string | null) => voidCalled when the selection changes.
filter(option, query) => booleanCustom matcher (default: case-insensitive substring on label).
emptyStateReactNodeRendered when no options match the current query.