Progress Ring
Web (React)
A circular ring that smoothly sweeps to a value, with a live numeric readout.
A highly precise, animated progress ring. It animates both the SVG pathLength and the numeric label smoothly using Framer Motion, avoiding the standard dash-array visual glitches on large stroke widths.
Installation
CLI
npx @modus-ui/cli add progress-ringManual
- Copy the code from the component tab.
- Create a file at
components/ui/progress-ring.tsx. - Paste the code.
Usage
tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | 72 | How far round to sweep, 0 to 100. |
| size | number | 120 | Outer diameter, in pixels. |
| strokeWidth | number | 10 | Thickness of the ring, in pixels. |
| duration | number | 1.2 | Seconds the sweep takes. |
| showLabel | boolean | true | Print the percentage in the middle. |
| className | string | "" | - |
Comments