[ Feedback ]
ProgressRing
Circular progress with a smooth animated arc. Put a percentage, an icon or any content in the middle.
2 examplesDark modeAccessible
Import#
import { ProgressRing } from 'reusify-ui';When to use#
- Goals and streaks (steps, calories), compact upload progress, scores and quotas inside cards.
Examples#
Basic#
64%
<ProgressRing value={64} size={96} thickness={8} showValue label="Upload" />Colors and content#
color takes a semantic name or any CSS color. Children replace the percentage.
80%
🔥
92
<ProgressRing value={80} color="success" showValue />
<ProgressRing value={45} color="#a3e635" size={56} thickness={6}>🔥</ProgressRing>
<ProgressRing value={92} color="danger" size={64} thickness={3}>92</ProgressRing>Used in designs#
ProgressRing in real layouts: these 2 designs use it. Open one to try it and copy the code.
API reference#
<ProgressRing />
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | 0 | Current value. |
max | number | 100 | Value that fills the ring. |
size | number | 48 | Diameter in px. |
thickness | number | 4 | Stroke width in px. |
color | semantic | string | 'primary' | Arc color. |
trackColor | string | - | Track color (defaults to the muted token). |
showValue | boolean | false | Show the percentage in the middle. |
label | string | - | Accessible name. |
children | ReactNode | - | Custom center content. |
value0numberCurrent value.
max100numberValue that fills the ring.
size48numberDiameter in px.
thickness4numberStroke width in px.
color'primary'semantic | stringArc color.
trackColor-stringTrack color (defaults to the muted token).
showValuefalsebooleanShow the percentage in the middle.
label-stringAccessible name.
children-ReactNodeCustom center content.
Accessibility#
- role="progressbar" with aria-valuenow / min / max; pass label for an accessible name.