Skip to main content
  1. Docs
  2. Components
  3. Forms

Select

One option, or several, from up to about fifteen: a field that opens its list below.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<button> + listServer-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • One choice from a list too long to show: five to fifteen options.
  • Several from a short list, with multiple.
  • A choice that's part of a form, saved with it.
Not for

02

Anatomy

  1. 1field-label<label>Names the trigger, from its Field.
  2. 2select-trigger<button>The field-style box with its chevron; it opens the list.
  3. 3select-value<span>The chosen label, or the placeholder.

03

Do and don't

Two choices are radios
DoBoth in view: one press to choose.
Don'tTwo options behind a click.
The placeholder is an example
Do"e.g. Monthly": what an answer looks like.
Don'tAn instruction, where the label already asks.

04

Content

  • Options in sentence case, short: "Billing admin".
  • Order them as people think of them: by time, by size, else alphabetically.
  • A disabled option stays in the list when its absence would puzzle.
Next — SelectAPI