Skip to content

Search Feitio

↵ opens the first↑↓ chooseEsc closes

Select

A list that opens to pick one option among many.

On this page

Playground

Empty option
State
Background
HTML
<div class="feitio-field"><label class="feitio-label" for="pg-s">Repeat</label><span class="feitio-select"><select id="pg-s"><option>Daily</option><option selected>Weekly</option><option>Monthly</option></select><svg class="feitio-icon" aria-hidden="true"><use href="/feitio/icons/sprite.svg#feitio-chevron-down"></use></svg></span></div>

When to use

When not to use

Examples

Time zone

Time zone

In Chrome and Edge, the list opens inside the page, as lifted paper: it shows in screen sharing and follows the theme. Elsewhere, the system list opens, which works the same.

Show code
HTML
<span class="feitio-select">
  <select id="fuso">
    <option value="">Escolha um fuso horário</option>
    <option>São Paulo (UTC−3)</option>
    …
  </select>
  <svg class="feitio-icon" aria-hidden="true">…</svg>
</span>

States

No choice
Chosen
Error
Pick a time zone
Disabled

No choice: when no option makes a sensible default, the first line invites, in soft text, and cannot be submitted. When a sensible default exists, it comes chosen.

Do and don’t

Do

Many known options: the list saves space.

Don’t

Three options hidden in a list: with Radios, they would fit on screen and take one tap.

Accessibility

Attributes

AttributeValuesWhat for
class="feitio-select"on the wrapping <span>The frame and the drawn arrow.
option value=""the first optionThe "no choice" state; cannot be submitted.
aria-invalid="true"with an errorThe wine line.
Top