Data | ProgressRing
ProgressRing#
Description#
- Compact circular gauge displaying a value from 0 to 100 with a conic ring. The value goes inside the ring, the label below it and an optional unit on its own line.
- Drawn with CSS (conic gradient and radial mask), not SVG.
- Accessible as
role="meter"witharia-valuetextincluding name, value and unit.
Props#
value(number | null) — How much of the ring is filled, from 0 to 100.nullleaves just the track. Required.label(string) — The name below the ring («Humidity»). Required.display(string) — What goes inside the ring («71 %», «6»). Without this, the value with «%». Default:undefined.unit(string) — The unit on its own line belowdisplay(«km/h»). Default:undefined.size('sm' | 'md') — Ring size. Default:'md'.
Usage#
| |
Notes#
valueis automatically clamped to 0–100.- The
aria-valuetextis built as “{label}, {display} {unit}” when a unit is present. - The ring is drawn with a conic gradient of
--use-primaryand a radial mask that leaves a 4 px arc.