How it works
A semicircular gauge is SVG arc stroke dressed as hardware. One 180-degree path forms the track, and the three color segments are three arcs pieced together by angle. The needle - or a glowing arc - sweeps to the current value with the same stroke-dasharray trick: convert the target angle to an arc length, then animate the dashoffset to zero. The landing overshoot comes purely from the easing curve: pick a cubic-bezier that travels past the target by 3 to 5 degrees and settles back, and you get the physical wobble of a real mechanical meter. The center number counts up in sync.
The conversion that quietly breaks amateur versions is value-to-angle mapping. Write it as one function and derive needle angle, arc length, and segment boundaries from it - if any of the three does its own math, the color segments and the needle reading will disagree at the boundaries and the whole instrument loses credibility.
How to use this prompt
Fits speed, credit score, completion rate - any single value that decides everything. Give the AI the value range and the segment breakpoints (for example 0-60 green, 60-80 yellow, 80+ red) and it will produce the arc geometry. For a layered look, add one line: a glow arc that follows the needle but stops 10 degrees short.
Tips for better results
Sweep duration of 800 to 1200 milliseconds reads as a genuine instrument; faster looks like an app animation, slower looks broken. Keep overshoot within 5 degrees - anything more looks cheap. Leave a 2-degree dark gap between color segments and the dial instantly gains tick-mark credibility. Animate the number with easeOut, not linear: the front-loaded speed mirrors the needle's physical deceleration, and human eyes catch it immediately when the two disagree.