Forms
Combobox
A select with a filter field: type to narrow the options, then pick one.
Group: Forms. Exports: Combobox. shadcn/ui equivalent: Combobox (partial parity).
Usage
import { Combobox } from "./halaska-kit";
Combobox props
optionsarray(default []): The choices to offer.valueany: The controlled value.onChange(value) => void: Called with the new value.placeholderstring(default "Select…"): Hint shown while empty.labelstring: Visible label.
Accessibility
- The trigger has the combobox role with aria-expanded, and a string label becomes its accessible name.
- The filter field takes focus when the list opens. Arrow keys move the highlight, Enter picks it, and Escape closes the list and returns focus to the trigger.
- The list has listbox and option roles, and aria-selected marks the current value.
- Focus stays in the filter field, and the highlighted option is announced through aria-activedescendant.
Known gaps
- Single selection only.
- No option groups, and no disabled options.
- No disabled state on the control.
- The filter placeholder and the empty message are fixed.
Used in
Halaska UI · Components · Patterns · Screens · Install