Component
Thermometer Range Slider
Variants
The same markup drops into a normal page as a compact CSS thermometer (no WebGL needed). Sizes and states below.
Usage
Paste the markup, include assets/css/tokens.css and assets/css/tailwind.css, then run the script from this page.
Accessibility
- Role and state. The track is a vertical role="slider" with aria-valuemin, aria-valuemax, aria-valuenow and a readable aria-valuetext ("34 degrees Celsius, hot"). A polite live region announces the zone when it changes (Cold, Mild, Hot ...).
- Keyboard. Tab to the slider. Arrow keys move by 1, PageUp and PageDown by 10, Home and End jump to the stops. With a pointer, press anywhere on the tube or drag. The focus ring uses the --ring token.
- Reduced motion. With prefers-reduced-motion the mercury jumps straight to the value, shockwaves and camera shake are skipped and the particles hold still; the reading is always shown as a number.
- Contrast. Colours come from the tokens in the page chrome; the stage readout is high-contrast white on a dark scene, and the value never relies on colour alone.