Plate № 50 · UX primitives · motion
A pattern from the gf.cx specimen book
A reading that rolls between °C and °F
"see if you can find a temperature animation, that fades between C/F, or devise one as a pattern" … "'B' very cool" … "save this to patterns.gf as a working example."
The problem
The home.gf.cx Almanac reads the New Hope sky in a single sentence — first frost in about N days · today's swing · H · L. Pick one unit for those temperatures and you shut out half the audience: an American reader wants Fahrenheit, everyone else Celsius. The usual fix is a °C/°F toggle button, but a button is chrome — a control the reader has to notice, understand, and operate — and the Almanac's whole manner is to state what the land needs without asking anything of you. A quiet surface shouldn't grow a settings switch just to name a temperature two ways.
The model
Don't offer a switch — let the number re-express itself. On a slow shared cadence the reading rolls from Celsius to Fahrenheit and back, like a mechanical register recalibrating: each digit column spins through the values between its old and new place, and the unit letter flips with them. Nothing to click; the figure simply breathes between its two forms, and a reader who only cares about one unit sees it within a few seconds either way.
- Odometer, not crossfade. The digits travel — 14 spins up to 57 through 2…3…4…5 — so the eye reads a single value being recomputed, not two values swapped. That physical roll is what makes it legible rather than flickery.
- One shared cadence. Every reading on the page flips together off one timer, so the whole line re-expresses itself at once instead of several numbers twitching out of sync.
- Hold on attention. Hover or focus any reading and the cadence pauses, so a reader studying the figure isn't chased by motion.
- Calm by default. Under
prefers-reduced-motionthe roll is dropped entirely and the reading shows both forms at rest — 14 °C / 57 °F — so the information never depends on the animation.
Working example
The adopted treatment, live. Sample reading is today's New Hope high, 14 °C ⇆ 57 °F — hover to hold it, or step it by hand:
Treatments considered
Two alternatives were explored on the same reading before the odometer won. A · Crossfade & rise is the quietest — the figure sinks out as the new one lifts in — but it reads as two values swapping rather than one recomputing. C · Mercury tween counts through every value with a thread of mercury recalibrating beneath, the most literal reading but a touch busy for a sky line. The odometer landed between them: mechanical enough to read as an instrument register, calm enough for the Almanac — and a natural fit for the Barometer skin.
How it's built
Each rolling figure is a row of fixed-height, overflow-clipped columns; each column holds a 0–9 strip that translates by whole em steps, so a CSS transform transition does the spin. The unit is the same mechanism with a two-face °C / °F strip. One timer flips every reading on the page together:
<span class="stage">
<span class="big"><span class="reel" id="reel"></span></span><span class="unit" id="reelUnit"></span>
</span>
<!-- behaviour MUST be external — Rocket Loader mangles inline <script> -->
<script src="temp-switch-demo.js" data-cfasync="false" defer></script>
The portable implementation is this page's own temp-switch-demo.js. The next step is to promote it to a shared shelf primitive — assets.gf.cx/temp-switch, a <span data-temp-c="14" data-temp-f="57"> element any surface drops in — so the roll comes from one source the way the tooltip and made-with primitives do.
Where it applies
Reach for this wherever a surface shows a measured value that has two honest units and a calm register that a toggle button would spoil — temperature in °C/°F, a distance in km/mi, a weight in kg/lb. It earns its place only on a quiet surface; a dense dashboard wants a real control, not ambient motion.
Reference
- Source
- Dan, 2026-10-18 — choosing the °C/°F motion for the home.gf.cx Almanac. Design was A/B/C-explored; treatment B (odometer) chosen.
- In use / example
- home.gf.cx — the Almanac sky line.
- Reusable elements
- The digit-reel roll · the two-face unit strip · the shared-cadence flip · the
prefers-reduced-motionstatic fallback. - Next step
- Promote to
assets.gf.cx/temp-switch(data-temp-c/data-temp-f) so every surface draws the roll from one file. - Build cost
- A row of CSS digit-reels and one shared timer; no library. Behaviour ships external for Rocket-Loader safety.