Gauge
Circular 0–100 readout. Pair it with a name; the ring is not self-describing.
Sizes
tiny is 20px, small 32px, medium 64px, large 96px. Default is medium.
Value
show-value prints the rounded percent. tiny places the number beside the ring; other sizes draw it in the center.
Default color scale
Without colors, the fill steps red → amber → green at 0 / 33 / 66.
Custom color range
Pass a numeric scale. The stroke uses the last key the value has reached.
Named colors
primary and secondary pin both arcs instead of using the threshold scale.
Arc priority
equal sizes both arcs so a 50/50 ratio reads as a split. Default primary grows the filled arc only.
Indeterminate
Spins the ring while a value is still being computed. value still sets how much of the ring is painted.
Overlay
Default slot sits in the center. Use it for an icon, not a unit string.
Best practices
- Gauge is a 0–100 ratio against a known max — quota, cache hit rate, uptime. Known-total task progress belongs on Progress. Binary state belongs on Badge or Status Dot.
arc-priority="equal"for true ratios so 50% is half the ring. Leave the defaultprimarywhen only the filled share matters.- Reuse product thresholds in
colors. Do not invent gauge-only breakpoints. - Name the metric next to the ring.
show-valueprints the number only — never a%or unit inside the slot. - Pair
indeterminatewith copy such as «Calculating usage…» so a spinning ring is not read as zero. - The control already sets
role="progressbar"and value ARIA. Do not override those; color is not enough without text.