Skip to the page
TACTILE UI

Kit part · Selects

Select

A choice from a longer list, in the same recess as a field, with a printed chevron. The browser’s own menu opens it.

Element
<select>
Needs
kit.css
Rules
field.rules.md · 5
Finishes
Aluminium · Graphite · Porcelain · Black
Volumes
Tactile · Quiet
On this page
  1. Variants
  2. Every state, at once
  3. API
  4. Markup
  5. Accessibility
  6. How it’s built
  7. Rules
  8. Related parts
01

Variants

Default
With an error
02

Every state, at once

Both finishes, side by side. Hover, pressed and focus are forced with .is-hover, .is-down and .is-focus; checked and disabled are real.

Aluminium

PartRestFocusChosenError
Select

Graphite

PartRestFocusChosenError
Select
03

API

NameKindValuesWhat it does
.tui-selectclasson <select>The field recess, with a printed chevron and 34px kept clear on the right.
.tui-fieldclasson <label>The printed label above, the hint below.
data-errorattributeon .tui-fieldRed hairline and red hint.
changeevent—Native.
Arrows · Space · type-aheadkeyboard—Native select behaviour.
04

Markup

<label class="tui-field">
  <span class="tui-label">Sample rate</span>
  <select class="tui-select">
    <option>44.1 kHz</option>
    <option selected>48 kHz</option>
    <option>96 kHz</option>
  </select>
</label>

Needs kit.css only, no script. How to install the kit.

05

Accessibility

  • A native select: the open list, type-ahead and the announcements belong to the browser and the system.
  • Two to five options read better as a radio group or a selector; more than five, a select.
06

How it’s built

A native <select> with appearance: none in the field’s recess. The chevron is two 5px triangles drawn by linear gradients in --tui-ink-2. The open menu is not restyled: it stays the platform’s.

07

Rules

field.rules.mdIn the brain

The label is printed above; an error carries a hint that says what to do.

5 rules in this file, with the foundations they rest on and the anti-patterns that break them. Full rules ship in the brain with the Pass.

08

Field

Text entry in a recess, the label printed above it, and a hint that says how to fix an error.

Radio

One choice from a short list in a form: small round keys in a fieldset, the chosen one pressed with a printed dot.

Selector

One mode of two to five: latching keys in a tray, one down at a time, each with a lamp that lights when chosen.

Docs
Finish
Volume