Skip to content
Onycx-ui
ESC

Progress Ring

Display a percentage in a circular meter that fills as it comes into view.

Dependencies
No extra packages
Size
207 lines
Controls
9 controls

Installation

CLI · shadcn registry

npx shadcn@latest add https://ui.onycx.dev/r/progress-ring.json

1 · Dependencies

None beyond React and Tailwind.

2 · Copy the source

components/onycx/progress-ring.tsx

Requires React 19 and Tailwind CSS v4. Copy the source from the progress-ring.tsx tab after tweaking: your values are baked in as the new defaults. Exported image examples use portable sample artwork. Replace it with your own media as needed.

Props

PropTypeDefaultDescription
valuenumber970–100; clamped.
labelstring"Accuracy"Mono caption and the meter's accessible name.
sizenumber176Diameter in px; type scales with it (value 48/176, label 10/176) and the ring never exceeds its container.
strokenumber3Arc width in viewBox units; the track is stroke / 2.
duration / delaynumber2000 / 500Fill timing in ms, cubic-bezier(0, 0, .58, 1).
color / trackColor / textColorstring"#ffffff" / "rgb(255 255 255 / .05)" / "#ffffff"Arc and glow, track, and value colours; the label uses the text colour at 40%.
spin / spinDurationboolean / numbertrue / 15Turns the whole ring once per spinDuration seconds, linear.
glowbooleantrueBlurred disc at 5% of the colour.
countUpbooleanfalseCount the number with the arc; the original shows the final value.
suffix / decimalsstring / number"%" / 0Number formatting.