ComboBox
Searchable dropdown with filtering. Built on React Aria.
Import
import { ComboBox } from '@dangbt/pro-ui'
Basic usage
<ComboBox
label="Framework"
options={[
{ value: 'react', label: 'React' },
{ value: 'vue', label: 'Vue' },
{ value: 'svelte', label: 'Svelte' },
{ value: 'solid', label: 'SolidJS' },
]}
placeholder="Search frameworks..."
/>
Controlled
const [value, setValue] = useState('')
<ComboBox
label="Country"
options={countries}
value={value}
onChange={setValue}
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Label |
options | { value: string; label: string }[] | ✅ | Options list |
value | string | — | Controlled value |
onChange | (value: string) => void | — | Called on selection |
placeholder | string | — | Placeholder text |
isDisabled | boolean | — | Disable |