Combobox

A filterable single-value picker on the ARIA combobox pattern.

Import#

import { Combobox } from "astralis-ui";

Type to filter, arrows to move, Enter to commit, Escape to revert to the last committed selection. Reopening on a committed value shows the full list — filtering only kicks in once you type.

Compared to Select: Select is a button you pick from; Combobox is an input you search in. For multiple values, use MultiSelect. All three share the same option machinery, so options shapes are interchangeable.

Props#

PropTypeDefaultDescription
optionsArray<{label, value, disabled?} | {group, options}>[]Flat or grouped options.
value / defaultValuestring | number | nullControlled / uncontrolled selection.
onChange(value) => voidFires on commit (pick or clear).
onInputChange(text) => voidFires on every filter keystroke.
clearablebooleanfalse✕ button when a value is selected.
namestringHidden input for native form submission.
emptyTextstring"No matches"Shown when nothing matches.
size / variant / colorScheme / invalid / disabled / readOnly / loadingas SelectShared styling + state system.

Keyboard#

KeyAction
typeFilter the options
Open when closed; move the highlight down
Move the highlight up
EnterCommit the highlighted option
EscClose and revert to the last committed value
TabClose, revert, and move on

Accessibility#

role="combobox" with aria-autocomplete="list", aria-expanded, aria-controls and aria-activedescendant tracking the highlighted option — the screen reader follows the highlight while focus stays in the input. Label/description wiring comes from Field.