Progress Ring
SVG circular progress ring showing 70 percent with a soft track.
<div class="relative h-28 w-28">
<svg class="h-full w-full -rotate-90" viewBox="0 0 120 120">
<circle cx="60" cy="60" r="54" fill="none" stroke-width="10" class="stroke-neutral-200 dark:stroke-neutral-700"></circle>
<circle cx="60" cy="60" r="54" fill="none" stroke="#6366f1" stroke-width="10" stroke-linecap="round" stroke-dasharray="339.29" stroke-dashoffset="101.79"></circle>
</svg>
<span class="absolute inset-0 flex items-center justify-center text-lg font-bold text-neutral-800 dark:text-white">70%</span>
</div>Free to use in personal and commercial projects. No attribution required.
Variants
Same component, different looks. Preview each one live and copy the code you like.
Complete
Show the emerald 100 percent ring when a task finishes to give a satisfying sense of completion.
Warning
The amber ring warns about low progress, like storage almost full or a deadline approaching.
Compact
The compact ring fits inside table cells, list rows, and dashboard widgets.
About this progress ring
The progress ring packs a percentage into a compact circle: a soft track with a colored arc sweeping across 70 percent of it, and the number centered inside. It reads at a glance and fits anywhere a full progress bar would feel bulky, like avatars, cards, and dashboard tiles.
It is two SVG circles sharing the same radius. The progress circle uses stroke-dasharray set to the full circumference and stroke-dashoffset to hide the unfinished part. The whole SVG is rotated -90 degrees so the arc starts at the top like a clock instead of at three o clock. round linecaps soften the arc ends.
Use it for profile completion meters, upload progress, skill indicators, and fitness rings. The centered label makes the exact value accessible even when the arc is hard to judge.
A full progress bar is a bully in tight spaces: it demands a wide rectangle that dashboards, avatars, and cards simply do not have. The ring compresses a percentage into a compact circle that reads at a glance, which is why fitness apps, upload tiles, and profile completeness meters all reach for it. It answers how far along in the space of an icon.
Two SVG circles share the same radius. The progress circle gets stroke-dasharray set to the full circumference, and stroke-dashoffset hides the unfinished portion, so the visible arc is exactly the percentage. The whole SVG is rotated -90 degrees so the arc starts at twelve o'clock like a clock instead of at three o'clock where SVG strokes begin. The number sits centered as real text inside.
The ring is an SVG circle with its circumference computed as 2πr, set as stroke-dasharray, and the visible arc controlled by stroke-dashoffset. To show 70 percent, offset the dash by 30 percent of the circumference; the hidden portion wraps invisibly around the back. Rotating the SVG -90 degrees moves the start point from 3 o'clock to 12 o'clock, where progress indicators conventionally begin. Because it is stroke-based, the ring stays razor sharp at any size, unlike a conic-gradient div that pixelates when scaled.
The ring that never completes is almost always a circumference mismatch. Developers hardcode a dasharray from one example while using a different radius, so 100 percent shows a gap or the arc overshoots the track. Always compute the circumference as 2 times pi times your actual radius, and derive the offset from the same number. One formula, one source of truth.
Where to use it
- ✓ Profile completion meters in onboarding flows
- ✓ File upload progress inside compact cards
- ✓ Skill level indicators on portfolios and resumes
- ✓ Daily goal rings in fitness and habit apps
Customization tips
Change the percentage with the formula offset = 339.29 x (1 - progress), so 50 percent is 169.65. Restyle with any stroke color, adjust stroke-width for a chunkier ring, and scale the whole thing with h-28 w-28 since the SVG viewBox keeps it crisp.
Design notes
When to use
A progress ring fits compact spaces where a full bar will not fit, like a profile completeness meter or a download badge on a small card. The circular shape reads as a single glanceable value rather than a timeline, which suits percentages that describe a state more than a process. Starting the arc at the top, as the rotation here does, matches how gauges and clocks are read.
What to avoid
Do not use a ring for processes with clear sequential steps, a stepper communicates stages better than a percentage. Avoid rings so small the percentage text becomes unreadable, below about 64 pixels the number turns to mush. And do not animate the ring continuously once it reaches 100 percent, a finished state should rest.
Accessibility
Give the ring role progressbar with aria-valuenow and a text label of the percentage, since the SVG arc alone means nothing to assistive tech. Keep the percentage text as real text, not drawn paths.
Frequently asked questions
Where do the numbers 339.29 and 101.79 come from?
The circumference is 2 x pi x 54, which is about 339.29. That becomes the dasharray. For 70 percent complete you hide 30 percent, so the offset is 339.29 x 0.3, about 101.79.
Why rotate the SVG by -90 degrees?
SVG circles start drawing at the three o clock position. Rotating -90 degrees moves the start to the top, which matches how people expect progress rings to begin.
Can I animate the ring when the value changes?
Yes. Add a CSS transition on stroke-dashoffset to the progress circle and update the offset value; the arc will sweep smoothly to the new percentage.
Can I build a circular progress bar with conic-gradient instead of SVG?
Yes for static or stepped percentages: a conic-gradient with a hard stop at the percentage value draws the ring in one line of CSS. It breaks down for smooth animation though, because gradient stops do not transition. Stick with the SVG stroke-dashoffset approach, like this element uses, when the value needs to animate or update live.
How do I make a progress ring accessible?
Add role progressbar with aria-valuenow, aria-valuemin, and aria-valuemax to the SVG wrapper, and update aria-valuenow every time the ring value changes. Screen readers will then announce the percentage automatically. Add a visible text label of the percent too, since the ring alone means nothing without it.
How do I change the ring color based on the percentage?
Swap the stroke class at thresholds in your update function, for example red under 25%, amber under 70%, green above. Keep the transition on stroke-dashoffset only, and change the color class instantly so the ring does not flash between hues mid-animation. Always pair color with the numeric label, color alone is not accessible feedback.