ELFBAR

Selector

Dropdown for selecting a value from a predefined list.

Anatomy

  1. Label — Identifies the selector's purpose
  2. Container — Shows the selected value or placeholder
  3. Select Indicator — 18×18 px ▼, changes with selected state
  4. Supporting Line — Bottom helper text, supports Default / Error / Success / Warning
  5. Dropdown — The expanded option list

Usage Guidelines

Do ✓

  • Use Selector when there are more than 7 options (use Radio for fewer)
  • Provide a meaningful placeholder (e.g. "Select a country")
  • Sort options logically (alphabetically, by frequency), with most common options at the top

Don't ✗

  • Don't use Selector for fewer than 3 options — Radio is more intuitive
  • Don't mix native <select> and custom Selector in the same form
  • Don't put excessively long text in options — truncation loses information

Interaction Behavior

StateDescription
DefaultInactive, showing placeholder or selected value
ActivatedClick opens dropdown panel, border highlights
SelectedOption selected, displays selected value
DisabledFully grayed out, cannot open
ErrorBorder and Supporting Line show error style

Accessibility

RequirementImplementation
Container semanticsrole="combobox" + aria-expanded
Dropdown listrole="listbox"
Optionsrole="option" + aria-selected
Keyboard operationEnter/Space to open; ↑↓ to navigate; Enter to select; Escape to close