Select
A list of options to pick from, opened by a button. No text entry — long lists are reachable by typeahead. Form-associated, with single/multi-select, chips and full keyboard navigation.
Preview
<esa-select label="Fruit" placeholder="Choose a fruit"></esa-select> import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@esa/ecology/esa-select';
@Component({
selector: 'app-select-demo',
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
template: `
<esa-select label="Fruit" placeholder="Choose a fruit"></esa-select>
`,
})
export class SelectDemo {} Select or Combobox?
If the user picks from what you gave them, it is a Select. If they type into it, it is a Combobox.
- Select — a button opens a list. Reach a distant option by
typeahead: type
c,aand it jumps to the first “Ca…” option, the way a native<select>does. The list is never filtered. - Combobox — an input with suggestions. It filters as you type
and can fetch remotely (debounced
searchevent,loading,results-count).
Until 2026-08-15 both components had this backwards: searchable
defaulted to on here, so every select rendered an editable autocomplete,
while Combobox defaulted to a button trigger. Both defaults are now correct and the
old props are deprecated shims that still work and warn.
Sizes
Three sizes, not four. Select has no xs: at 28px the trigger and its chevron fall
below a comfortable tap target, and because the option list it opens is sized independently,
shrinking the trigger buys nothing downstream. sm is the floor — reach for it in
dense table rows and filter bars. Controls without a popup, like
Text Field, still offer xs.
<esa-select label="Small" size="sm"></esa-select>
<esa-select label="Medium" size="md"></esa-select>
<esa-select label="Large" size="lg"></esa-select> import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@esa/ecology/esa-select';
@Component({
selector: 'app-select-demo',
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
template: `
<esa-select label="Small" size="sm"></esa-select>
<esa-select label="Medium" size="md"></esa-select>
<esa-select label="Large" size="lg"></esa-select>
`,
})
export class SelectDemo {} States
Multi-select renders chips with chip-mode. Error, required, disabled, and read-only states are all driven by attributes.
<esa-select label="Toppings" multiple chip-mode placeholder="Add toppings"></esa-select>
<esa-select label="Required" required></esa-select>
<esa-select label="Error" error-text="Please make a selection"></esa-select>
<esa-select label="Disabled" disabled></esa-select> import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@esa/ecology/esa-select';
@Component({
selector: 'app-select-demo',
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
template: `
<esa-select label="Toppings" multiple chip-mode placeholder="Add toppings"></esa-select>
<esa-select label="Required" required></esa-select>
<esa-select label="Error" error-text="Please make a selection"></esa-select>
<esa-select label="Disabled" disabled></esa-select>
`,
})
export class SelectDemo {} API
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | '' | Field label above the control. |
options | EsaOption[] | [] | Selectable options. Set as a property (not an attribute). |
size | 'sm' | 'md' | 'lg' | 'md' | Control size (reflected attribute). No xs — see Sizes. |
placeholder | string | 'Select...' | Placeholder shown when nothing is selected. |
help-text | string | '' | Helper text below the control. Property: `helpText`. |
cue | string | '' | Override the visually-hidden instructional cue read to screen reader users. The default explains how to review options and that typing jumps to a match — which is what makes announcing the list unnecessary as it changes. Do not blank it, or the option list becomes silent with nothing to set expectations. |
error-text | string | '' | Error message; sets the error state when present. Property: `errorText`. |
required | boolean | false | Marks the field required (renders a * after the label). |
live-error | boolean | false | Announce the error the moment it appears rather than only when the field is focused. OFF by default — see the long note on `esa-text-field.liveError`: the house pattern is validate-on-submit with `<esa-error-summary>`, under which a live region per field fires an assertive announcement for EVERY invalid field at once, racing the summary the user was just sent to. Turn it on for fields validated INLINE, on blur. Property: `liveError`. |
disabled | boolean | false | Disables interaction (reflected attribute). |
name | string | undefined | — | Form field name — the key this control submits under. |
multiple | boolean | false | Allow multiple selections. |
searchable | boolean | false | DEPRECATED — a type-to-filter field is an autocomplete, which is <a href='/components/esa-combobox'>esa-combobox</a>. Still honoured; warns at runtime. Typeahead replaces the common use. |
chip-mode | boolean | false | In multi-select, render selected values as removable chips. Property: `chipMode`. |
value | string | string[] | null | — | Property accessor. Single = string; multiple = string array. Set as a JS property — there is no attribute. |
Events
| Event | Type | Default | Description |
|---|---|---|---|
change | CustomEvent<{ value: string | string[] }> | — | Fired on selection change. Composed and bubbles. Form value is the string (single) or comma-joined values (multiple). |
Binding these events from Angular
Every one of these is a CustomEvent, so the payload is on
$event.detail — $event.target.value reads empty, with no
error. The names are lowercase and Angular passes them to
addEventListener verbatim, so camel-casing one means it never fires.
(change)="onChange($event.detail)"
Accessibility
- Input has
role="combobox"witharia-expanded,aria-haspopup="listbox", andaria-autocomplete="list". - Dropdown is
role="listbox"; options arerole="option"witharia-selected/aria-disabled. - Keyboard: ArrowUp/Down navigate, Enter selects, Escape/Tab close. Outside-click closes.
- Chip remove buttons carry an
aria-label("Remove {label}"). - Form-associated via
ElementInternals— value submits with the enclosing form.
Theming surface
Every public token this component reads, extracted from its source at build time,
split by blast radius: the hooks that belong to this component,
then the shared and system tokens it consumes alongside everything else. The
Resolves to column walks each token's real lineage —
component → semantic → primitive → raw value — so you
can see exactly where re-pointing it lands. A spoke re-skins by overriding these in
its theme-<slug>.css; component internals are never edited. No
hook for what you need? File it with /request-lego.
Type roles it names
This component does not set a size, weight, face or tracking of its own — it names a composite, and the composite carries all five. A composite is a class rather than a token, so none of it appears in the tables below; re-theme text by re-pointing the token family, not by editing the component.
| Role | Re-point | Reach |
|---|---|---|
.typography-body-lg |
| +7 more componentsesa-breadcrumbs, esa-checkbox, esa-checkbox-group, esa-combobox, esa-input-tag, esa-radio-group, esa-textarea |
.typography-body-md |
| +28 more componentsesa-app-shell, esa-breadcrumbs, esa-card, esa-checkbox, esa-checkbox-group, esa-collapsible, esa-combobox, esa-command-palette, esa-confirm-dialog, esa-container, esa-danger-zone, esa-dialog, esa-dropdown-menu, esa-empty-state, esa-entity-search, esa-form-field, esa-header-nav, esa-input-tag, esa-nav-dropdown, esa-page-header, esa-popover, esa-progress-bar, esa-radio-group, esa-side-dialog, esa-snackbar-item, esa-switch-toggle, esa-tab-layout, esa-textarea |
.typography-body-sm |
| +20 more componentsesa-alert-box, esa-breadcrumbs, esa-button-toggle, esa-card, esa-checkbox-group, esa-combobox, esa-command-palette, esa-date-picker, esa-empty-state, esa-file-upload, esa-form-field, esa-input-tag, esa-link-column, esa-loading-overlay, esa-progress-bar, esa-radio-group, esa-search-panel, esa-stat, esa-text-field, esa-textarea |
.typography-body-xs |
| +14 more componentsesa-breadcrumbs, esa-checkbox, esa-checkbox-group, esa-combobox, esa-command-palette, esa-empty-state, esa-entity-search, esa-field-error, esa-header-nav, esa-input-tag, esa-progress-bar, esa-radio-group, esa-search-panel, esa-textarea |
.typography-label-lg |
| +12 more componentsesa-breadcrumbs, esa-button-toggle, esa-checkbox-group, esa-color-picker, esa-combobox, esa-date-picker, esa-form-field, esa-input-tag, esa-radio-group, esa-range-slider, esa-text-field, esa-textarea |
.typography-label-md |
| +33 more componentsesa-app-bar, esa-breadcrumbs, esa-button-group, esa-button-toggle, esa-card, esa-checkbox-group, esa-color-picker, esa-combobox, esa-command-palette, esa-confirm-dialog, esa-danger-zone, esa-date-picker, esa-dialog, esa-empty-state, esa-entity-search, esa-file-upload, esa-filter-container, esa-form-field, esa-header-nav, esa-input-tag, esa-link-column, esa-page-header, esa-pillbox, esa-popover, esa-progress-bar, esa-radio-group, esa-range-slider, esa-side-dialog, esa-sidebar-nav, esa-stat, esa-text-field, esa-textarea, esa-tooltip |
.typography-label-xs |
| +14 more componentsesa-breadcrumbs, esa-button-toggle, esa-checkbox-group, esa-color-picker, esa-combobox, esa-date-picker, esa-entity-search, esa-form-field, esa-input-tag, esa-progress-bar, esa-radio-group, esa-range-slider, esa-text-field, esa-textarea |
.typography-microcopy-lg-subtle |
| +7 more componentsesa-combobox, esa-command-palette, esa-date-picker, esa-entity-search, esa-filter-dropdown, esa-input-tag, esa-text-field |
.typography-microcopy-md-subtle |
| +7 more componentsesa-combobox, esa-date-picker, esa-filter-dropdown, esa-input-tag, esa-pagination, esa-search-panel, esa-text-field |
.typography-microcopy-xs-subtle |
| +7 more componentsesa-combobox, esa-date-picker, esa-filter-dropdown, esa-filter-pills, esa-input-tag, esa-text-field, esa-tooltip |
Wired to this component
None. This component has no hooks of its own — it themes entirely through the shared tokens below, so every override here also moves its siblings.
Shared tokens it reads
Owned by a family or by the semantic layer. Still overridable — but scope the
override (esa-foo { --form-border-color: … }) unless you mean to move
everything that reads it. Reach says what else that is.
| Token | Reach | Resolves to |
|---|---|---|
--focus-ring-color | component focus ring group · +34 more | #3e9b4f via --color-border-default-focus → --color-grass-10 |
--focus-ring-offset | component focus ring group · +31 more | 2px |
--focus-ring-width | component focus ring group · +35 more | 2px via --border-width-focus → --border-width-200 |
--form-border-color | component forms group · +11 more | one role per property, so a theme can move the ring's weight and its colour independently. Tier 3's --focus-ring-width now reads this instead of holding a bare 2px, which is the same shape --focus-ring-color has always had (a thin tier-3 alias over a tier-2 role) — width was simply never given the tier-2 half.
*
* This role was rejected once, and the rejection is worth recording because its PREMISE was wrong rather than its reasoning. The argument against an `emphasis` width was that every 2px border in the kit is micro-geometry — spinner rings, the kbd keycap lip, a chevron. The focus ring was not in that enumeration and does not fit it: 33 components render it, more than read any other tier-3 token, and it is not micro-geometry but an accessibility affordance whose weight is a legitimate brand axis (a spoke that needs a heavier ring for contrast has to be able to reach it). It is also not a `border` in any component — every consumer paints it with `outline` or `box-shadow` — which is precisely why a survey of BORDERS missed it. The name still says `border` because tier 2 already calls the ring's colour --color-border-default-focus via --color-border-default |
--form-border-color-focus | component forms group · +11 more | #3e9b4f via --color-border-default-focus → --color-grass-10 |
--form-border-color-hover | component forms group · +3 more | #bbbbbb via --color-border-default-strong → --color-gray-8 |
--form-border-width | component forms group · +10 more | 1px via --border-width-default → --border-width-100 |
--form-error-border-color | component forms group · +9 more | #ce2c31 via --color-background-utility-danger → --color-red-11 |
--form-error-color | component forms group · +9 more | #ce2c31 via --color-content-utility-danger → --color-red-11 |
--form-help-color | component forms group · +9 more | #646464 via --color-content-default-secondary → --color-gray-11 |
--form-label-color | component forms group · +7 more | #646464 via --color-content-default-secondary → --color-gray-11 |
--form-placeholder-color | component forms group · +4 more | #646464 via --color-content-default-secondary → --color-gray-11 |
--form-text-color | component forms group · +6 more | #202020 via --color-content-default → --color-gray-12 |
--color-background-disabled | semantic every component | #f0f0f0 via --color-gray-3 |
--color-background-elevation-raised | semantic every component | #fcfcfc via --color-gray-1 |
--color-background-elevation-sunken | semantic every component | #f0f0f0 via --color-gray-3 |
--color-background-field | semantic every component | rgba(0, 0, 0, 0) |
--color-background-overlay-active | semantic every component | #46a758 via --color-background-brand → --color-grass-9 |
--color-background-overlay-strong-hover | semantic every component | rgba(0, 0, 0, 0.05) via --color-black-a-1 |
--color-border-disabled | semantic every component | #d9d9d9 via --color-gray-6 |
--color-content-brand | semantic every component | #2a7e3b via --color-grass-11 |
--color-content-default | semantic every component | #202020 via --color-gray-12 |
--color-content-default-secondary | semantic every component | #646464 via --color-gray-11 |
--color-content-disabled | semantic every component | #8d8d8d via --color-gray-9 |
--color-content-utility-danger | semantic every component | #ce2c31 via --color-red-11 |
--elevation-4 | semantic every component | 0 via --shadow-offset-x |
--radius-md | semantic every component | 0.5rem via --radius-200 |
--radius-pill | semantic every component | 9999px via --radius-full |
--radius-sm | semantic every component | 0.25rem via --radius-100 |
--transition-fast | semantic every component | 150ms via --duration-150 |
--z-dropdown | semantic every component | 50 |
--font-style-italic | primitive every component | italic |
--icon-size-md | primitive every component | 20px |
--spacing-050 | primitive every component | 0.125rem |
--spacing-100 | primitive every component | 0.25rem |
--spacing-200 | primitive every component | 0.5rem |
--spacing-250 | primitive every component | 0.625rem |
--spacing-300 | primitive every component | 0.75rem |
--spacing-400 | primitive every component | 1rem |