OGE logoOGE

Select Box

<oge-select-box> is a drop-down select on the shared field chrome: pick one item from a list, optionally filter it by typing, and bind the committed value with signals, Signal Forms or reactive forms. The popup follows the anchor on scroll, flips when cramped and matches the field width.

WAI-ARIA combobox displayExpr / valueExpr search signal forms

Basic usage

Bind an array of strings and [(value)] — no mapping needed. Open with the mouse, ↓, Enter or by typing a letter (type-ahead).

[(value)]
value: null

Objects map through displayExpr/valueExpr (field name or function). searchEnabled turns the input editable and filters client-side; searchChanged + [loading] are the server-side escape hatch.

displayExpr valueExpr searchEnabled
committed id: null

Grouping & custom values

groupBy (field name or function) groups flat data under headers on the fly — no pre-shaping. acceptCustomValue lets typed text that matches nothing become the value: customItemCreating maps it to an item (sync, async, or null to reject).

groupBy acceptCustomValue customItemCreating
Type a new tag and press Enter

Lazy data

Pass a function as [items] — it runs once on first open; the popup shows a localized loading row while pending and an error row on rejection. selectedItem resolves as soon as the data lands.

items: () => Promise deferred

Tag Box — multi-select

<oge-tag-box> is the multi-select sibling: the value is an array of valueExpr results, picks render as removable chips, the popup stays open while selecting (checkbox listbox, aria-multiselectable) and Backspace removes the last chip. imageExpr puts avatars on chips and options; maxDisplayedTags collapses overflow into a +N chip.

value: T[] imageExpr maxDisplayedTags selectionChanged
Angular
Elif KayaMert Demir

Item states & templates

disabledExpr marks rows non-selectable (skipped by keyboard navigation too). The selected value stays resolvable even while the visible list is filtered.

disabledExpr
Sold-out plans can't be picked

Field chrome

Everything from the shared chrome applies: label modes, sizes, styling modes, clear button, hints, validation subscript and the sm + subscriptSizing=none compact grid-editor shape.

labelMode size stylingMode
Shipping destination

Mobile / adaptive

With adaptiveMode="auto" a viewport narrower than adaptiveBreakpoint (600px) turns the drop-down into a modal bottom sheet — titled with the label, a close button, a search field at the top, 44px rows, safe-area insets, focus trap and swipe-down dismiss — and the date picker into a full-screen dialog. Narrow the window (or open the page on a phone) to try it; the default 'none' keeps existing apps anchored.

adaptiveMode adaptiveBreakpoint

Keyboard & accessibility

The editor implements the WAI-ARIA combobox pattern with aria-activedescendant — DOM focus never leaves the input; the active option is referenced by id and scrolled into view.

  • ↓/↑ open the popup and move the active option (no wrap); Alt+↑ commits and closes.
  • Enter and Space (select-only) commit; Esc closes without committing — pressed again while searching it clears the search text.
  • Home/End jump to the first/last option in select-only mode (they move the caret while searching); PgUp/PgDn jump ten options.
  • Printable characters type-ahead in select-only mode — a repeated character cycles through its matches.