LLabanaat

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

PropTypeDefaultDescription
options{ value, label, disabled? }[]The selectable options
value / defaultValuestringControlled / uncontrolled selected value
onValueChange(value) => voidChange handler
labelstringField label
placeholderstringInput placeholder / listbox aria-label fallback
isLoadingbooleanfalseShows a loading row for async option fetching
disabledbooleanfalseDisables interaction