Feature Library

Gauges and progress rings

0.35 CPU ms
A still of the Gauges and progress rings demo
Still
The live demo starts when it’s in view.A simulated drive and download run live · Pause and use the Speed slider · move the red line

Instrument gauges in SVG (a tach with a red line on a nice scale, a speedometer with a best mark, a fuel gauge and an LED ring) whose needles chase their…

What it costs a frame

0.35 ms
GPU
not used
CPU, median
0.35 ms
CPU, 95th pct
0.68 ms
Draw calls
0
Weight
Light

Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured with the simulated drive and the download running: four needles on their springs and three rings, one of them a liquid that moves every frame. Each frame writes a needle angle, the sweep’s mask, any LED segments that change and the ensō’s stroke while it grows. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.350.68
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.521.54
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.551.01

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Dashboards and KPI tiles
  2. Progress toward a goal or rank
  3. Downloads, uploads and installs
  4. Games and racing HUDs
  5. Device and IoT panels
  6. Fitness and quotas
  7. Levels, tiers and streaks round one number

Pitfalls, in brief

  1. Pick a max that divides into the ticks: tachSpec(redLine) for a dial with a goal, niceTicks(min, max, n) otherwise.
  2. The labels are DOM, sized in container units of the gauge: the gauge needs a width from its parent (it is width: 100%, square), or it collapses to nothing.
  3. Each gauge on its own loop (the default) sleeps once its needle settles; with loop: false you call step(dt) every frame yourself, or the needle never moves.
  4. A liquid ring animates every frame while it is on screen (an IntersectionObserver stops it off screen); pass wave: false for a still surface.
  5. The red zone blinks 2.5 times a second while the needle is in it: keep it under three flashes a second (WCAG 2.3.1) if you change gr-blink.
7 more in brief
  1. aria-valuenow and the readout follow set(), not the needle, and are written only when the text changes: call set as often as you like, but give the meter a label that says what it measures.
  2. The segmented ring turns by CSS animations on SVG groups: they need transform-box: view-box and an origin at the centre (56px 56px in its box), as gauges.css sets, or they swing round the corner.
  3. The segmented ring pulses only when its value moves by a segment or more in one set: a download calling set every frame stays calm, a jump in value is noticed.
  4. At most four tier rings fit between the segments and the number (MAX_TIERS); more are drawn as four.
  5. Under prefers-reduced-motion the needles jump to their value, the glint, blink and waves stop, and sweep() does nothing.
  6. Theme with --gr-accent, --gr-red, --gr-best, --gr-liquid and friends on any parent; the gauge’s own rules read them with fallbacks, so set them, not --gr-c-*.
  7. Import gauges.base.css before gauges.css: the base sizes the gauge and places its labels and readout, the other is only the look.
12 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Fully custom code.

Paul Heckbert, “Nice Numbers for Graph Labels”, Graphics Gems (1990): niceTicks and tachSpec round the step to 1, 2 (2.5) or 5 times a power of ten: the idea, the code is the owner’s.

Robert Penner, easing equations: The cubic ease-out (1 − (1 − k)³) the ensō and plain rings use is the well-known form of his easeOutCubic.

Ensō (円相), the Zen brush circle: The look of the ink ring: one stroke, heavy where the brush lands, dry and broken where it lifts.

svggaugesprogressdashboardspringsanimationsegmented ringtiershudaccessibilityintlno dependencies

Near it in the frame