
Switch
On or off, applied the moment it moves. A native checkbox with a ridged thumb in a slot that lights green when on.
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.
The thumb is a pill of glass drawn by one shader: a dome whose rim bends a painted copy of the switch’s own track, lit from above left, with a soft shadow. If the glass cannot be drawn, the kit’s own grip is kept and frosted.
| Name | Kind | Description |
|---|---|---|
| change | event | The checkbox’s own change event. |
| data-liquid | attribute | Which thumb 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. |
| liquidSwitchHTML(options) | function | The switch as markup: id, name, value, checked, disabled, label or labelledby. |
| liquidSwitchStats() | function | What is drawing: WebGL contexts open (0 or 1 for the whole page), switches on the page, and how many of them are glass. |
Drag a thumb and let go, or tap the row. Tab to a switch and press Space. Without WebGL, or with reduced transparency set, the thumb is frosted instead of glass and everything else is the same.

On or off, applied the moment it moves. A native checkbox with a ridged thumb in a slot that lights green when on.
The switch on a settings row whose grip turns to ferrofluid when a hand comes near. At rest it is the kit’s switch. Bring the pointer within a finger’s width or two and the grip becomes a glossy black drop; closer, its spikes snap up and lean toward the pointer. Turn it on and the drop surges across the slot, spikes down while it travels, and stands them taller on the lit side. Move away and they melt and the plain grip comes back. A keyboard focus wakes it too.
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.

What a settings page is made of: a label, one sentence under it and the control at the end, ruled like the list with a hairline between rows and nothing else drawn. A row with a switch or a check is one label, so pressing anywhere on it turns the control; a row with a key, a select or a value is a plain box, so a press means what the key says.