ComboBox

Text input with autocomplete suggestions, async loading support, free-form entry, and keyboard navigation.

Anatomy

1 2 3
  1. 1 Input field — editable text entry for typeahead filtering.
  2. 2 Controls — clear, loading, and expand/collapse affordances.
  3. 3 Suggestion list — filtered options, async status, or a free-form value action.

Options

Default
Hover
Focus
Disabled
PropertyValuesDefault
optionsArray of {value, label, description, keywords, disabled}[]
placeholdertext
valueselected value
loadingtrue / falsefalse
allowCustomValuetrue / falsefalse
statedefault / hover / active / focus / disableddefault

Behaviors

Typeahead filtering

Filtering happens as the user types. Matching checks labels, values, descriptions, groups, and optional keywords.

Loading options… Results update when loading completes.

Async loading

Set the loading attribute while remote suggestions are pending, then update the options property when results arrive.

Free-form value

When allow-custom-value is present, unmatched text can be committed as a submitted value.

Custom option rendering

Use an option-template reference when labels need richer layouts such as helper text, region names, or additional metadata.

Usage guidelines

<uif-combobox aria-label="Destination">…</uif-combobox>

Do

Use ComboBox when typing is faster than scanning a long list or when suggestions come from an async source.

<select> with 50 options

Don't

Don't replace a native select unless filtering, async loading, or free-form entry is genuinely needed.

Content standards

  • Placeholder text should describe the search target, not restate the field label.
  • Option labels should stay short and scannable; move detail into description when needed.
  • Free-form input should be constrained by downstream validation when the field feeds structured data.

Keyboard interactions

KeyInteraction
TabMoves focus into or out of the field and commits the current value if appropriate.
Opens the list and moves the active option.
Home / EndMoves to the first or last enabled option when the list is open.
EnterSelects the active option or commits the free-form value.
EscapeCloses the list and restores the last committed selection.
Type-aheadFilters available options in place.

Accessibility

  • The input uses the ARIA combobox pattern with an associated listbox and active descendant.
  • Always provide a visible label or aria-label / aria-labelledby.
  • Loading and empty states announce status updates with role="status" and aria-live="polite".
  • Free-form values should be validated the same way as other user-entered text before submission.

Theming

ComboBox adapts automatically across brands and color modes through dedicated component tokens. Use the hero switches above to review brand/mode combinations.

Design checklist

Autocomplete filteringSuggestions can be filtered from user input.
Async loading stateLoading affordance and live status messaging are documented.
Free-form inputOptional custom value behavior is supported and documented.
Keyboard supportArrow, Home/End, Enter, Escape, and Tab interactions are documented.
Design tokensVisual styling is driven by dedicated --uif-combobox-* tokens.