Skip to the page
Tactile UI

Liquid segmented control

The segmented control whose selection is one bead of glass. It is the kit’s control: the same tray, native radios and labels. Held, the bead is where the finger is; let go and it settles on the nearest segment without bounce. It stretches behind its head, and a long quick move leaves a drop that it takes back in. The bead is as wide as the segment it is over, so segments of unequal width work.

On this page
  1. Anatomy
  2. Variants
  3. States
  4. Props and options
  5. Usage notes
  6. Accessibility
  7. Related parts

Anatomy

The bead is a pill of glass drawn by one shader: a dome whose rim bends a painted copy of the control’s own tray and labels, lit from above left, with a soft shadow. The keys’ own raised look is removed under the bead, and if the glass cannot be drawn a frosted CSS bead takes its place.

Variants

  • Three views
  • Unequal segments
  • Two segments
  • One segment disabled
  • Whole control disabled

States

  • First
  • Middle
  • Last
  • Disabled

Props and options

NameKindDescription
changeeventThe checked radio’s own change event; its value is the selection.
data-liquidattributeWhich bead is showing. Read it, do not write it: the script falls back to frosted when WebGL2 is missing, the context is lost or reduced transparency is set.
liquidSegmentedHTML(options)functionThe control as markup.
liquidSegmentedStats()functionWhat is drawing: WebGL contexts open (0 or 1 for the whole page), controls on the page, and how many of them are glass.

Usage notes

Drag the bead and let go, or tap a segment. Focus the group and press an arrow key. Without WebGL, or with reduced transparency set, the bead is frosted instead of glass and everything else is the same.

Accessibility

  • Keyboard: Tab reaches the checked segment, the arrow keys move the selection and the bead goes there. These are the native radio keys.
  • The selection is never the glass: the checked radio is the truth, and the checked segment’s label takes the kit’s ink.
  • Frosted fallback. It still follows the finger and springs.
  • A disabled segment or a disabled control does not take the bead; a tap on it does nothing.

Segmented control

A row of keys in a tray with one pressed down: pick a view, a range or a mode and it applies at once. It is the kit’s selector without the lamps, with sizes, a full-width row and icon segments.

Liquid switch

The settings switch whose thumb is a drop of glass. It is the kit’s switch. Held, the thumb is exactly where the finger is; let go and it carries on at the finger’s speed and settles without bounce. It stretches as it travels, and on a quick move it leaves a small drop behind that it takes back in. The glass bends a painted copy of the switch’s own track, so the slot’s colour shows through the thumb.

Toggle group

The segmented control’s keys, each latching on its own, so any number can be down at once: bold and italic, the columns a table shows, the filters on a log. Every key is a checkbox and posts with the form. A lone toggle is a group of one, and a parting line splits clusters of keys in one slot.

Cloth selector

A mode switch made of cloth. A row of tiles covered in stretched fabric stands in a machined tray, each with an icon and a word pressed into it. The chosen tile sits a touch lower and a lamp behind it lights its icon and word through the weave. Choose another and the first lamp fades down as the next comes up. Underneath it is a group of native radios, so it posts one value without any script.