⚡ ComponentForge

Select

Inputs

Single-select listbox following the ARIA 1.2 combobox/select-only pattern: DOM focus stays on the trigger while aria-activedescendant walks options. Typeahead included.

import { Select } from "@componentforge/react";

Examples

Grouped options with disabled item

Keyboard: Enter/↓ opens, ↑/↓ walk enabled options, typeahead jumps, Escape cancels.

value: (empty)

Accessibility

  • Trigger exposes role="combobox", aria-haspopup="listbox", aria-expanded and aria-controls.
  • Options are role="option" with aria-selected / aria-disabled; disabled options are skipped by arrows and typeahead.
  • Selected option is announced through the activedescendant relationship.

Keyboard interactions

KeyAction
Enter / Space / ↓Open the listbox.
↑ / ↓Highlight previous / next enabled option.
Home / EndFirst / last enabled option.
Printable charsTypeahead jump (500 ms buffer).
Enter / SpaceCommit highlighted option.
Escape / TabClose without committing (Escape refocuses trigger).

API reference

Selected props — every component also spreads native HTML attributes.

PropTypeDefaultDescription
value / defaultValuestring""Controlled/uncontrolled selected value.
onValueChange(value: string) => voidCommit handler.
placeholderstring"Select…"Shown when no value; doubles as accessible name.
Item.value / Item.label / Item.disabledstring / string / booleanOption config; label falls back to children text.