Ring meter
A circular meter for one reading against a maximum: disk used, quota spent, a score out of 100. Use it where a compact, glanceable figure is wanted. When the limit and the thresholds matter more than the shape, use the usage meter.
Install
npx shadcn@latest add @thrum-pro/ring-meterThis is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | Required | The reading. Below 0 or above max it is drawn as an empty or a full ring, and the number still shows the real value. |
max | number | Default 100 | The value of a full ring. |
label | string | Required | What the ring measures. It is the name screen readers hear. |
format | Intl.NumberFormatOptions | Default compact | How the number in the centre and the spoken value are written. |
locale | string | Default "en-US" | Locale for number formatting. |
status | "normal" | "ok" | "warn" | "alarm" | Default "normal" | Colours the arc. normal is the text colour, ok the theme's success colour, warn its warning colour and alarm its destructive colour. |
statusLabel | string | – | The state as a word, under the number and in the spoken value. The default follows status: OK, warning or critical. Pass your own to translate it. |
showLabel | boolean | Default false | Show the label as a compact caption under the centre reading when no status word is active. |
thickness | number | Default 10 | Width of the ring in pixels. It is limited to half the size of the ring. |
sound | boolean | Default true | Play a soft tone when the number lands, if the visitor has sound on. |
className | string | – | Sets the size. The default is 128 by 128 pixels. The number scales with the ring. |
Motion and sound
Motion
- First draw: when the ring scrolls into view, the arc sweeps clockwise from 12 o'clock in about 400 ms and the number rolls up from zero with it.
- A new value moves the arc and the number from where they are, with no overshoot. A change during a sweep continues from the current position.
- The arc fades out in 150 ms when the value reaches zero, so no dot is left at 12 o'clock.
- Reduced motion: the arc and the number appear at their value and change instantly.
Sound
- A short tone when the number lands. The arc is silent.
Sound is off until the visitor turns it on. Pass sound={false} to keep this component silent. How sound works
Accessibility
- Exposed as a meter named by the label, with a minimum of 0, the maximum, and a spoken value such as “72% of 100%”.
- A status other than normal is a word as well as a colour: OK, warning or critical. It is shown under the number and added to the spoken value.
- The number is the real value even when the ring is clamped: 128% draws a full ring and reads 128%.
- It is not focusable: there is nothing to operate.
Source
The source comes with Pro
TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies
Files and dependencies
- Adds
components/ui/ring-meter.tsx- Packages
motion- Brings along
- Chart foundationsMotion tokensAnimated number
Changelog
- 1.0.0 · 2026-12-02First release.