Combobox
A searchable single-select, implemented directly against the WAI-ARIA 1.2 combobox pattern — role="combobox" on the input, role="listbox" on the popup, and aria-activedescendant for virtual focus — since no accessible Radix combobox primitive currently exists.
<Combobox label="Country" placeholder="Search countries…" options={[ { value: "us", label: "United States" }, { value: "ca", label: "Canada" }, { value: "mx", label: "Mexico" }, { value: "fr", label: "France" }, { value: "de", label: "Germany" }, { value: "jp", label: "Japan" }, ]} />
Editable — change the code above and the preview updates live.
Installation
import { Combobox } from "@labanaat/ui/combobox";Props
| Prop | Type | Default | Description |
|---|---|---|---|
| options | { value, label, disabled? }[] | — | The selectable options |
| value / defaultValue | string | — | Controlled / uncontrolled selected value |
| onValueChange | (value) => void | — | Change handler |
| label | string | — | Field label |
| placeholder | string | — | Input placeholder / listbox aria-label fallback |
| isLoading | boolean | false | Shows a loading row for async option fetching |
| disabled | boolean | false | Disables interaction |