CSS Circular Progress
A circular progress ring driven by a single --value custom property.
<div class="progress-ring" style="--value: 72" role="progressbar" aria-valuenow="72" aria-valuemin="0" aria-valuemax="100">72%</div>
.progress-ring {
--value: 0; /* 0 to 100 */
--track: #e2e8f0;
--fill: #8b5cf6;
display: grid;
place-items: center;
width: 96px;
height: 96px;
border-radius: 50%;
background:
radial-gradient(closest-side, #fff 78%, transparent 79%),
conic-gradient(var(--fill) calc(var(--value) * 1%), var(--track) 0);
color: #1e293b;
font: 700 20px/1 system-ui, sans-serif;
}
About this CSS Circular Progress
This CSS Circular Progress is 15 lines of pure CSS (0.4 KB) with no JavaScript and no dependencies. It uses radial gradients, conic gradients, CSS Grid and custom properties. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.
CSS features used
Customize it
Change these custom properties to restyle the circular progress without touching the rest of the CSS:
| Property | Default |
|---|---|
--value | 0 |
--track | #e2e8f0 |
--fill | #8b5cf6 |
How to use this circular progress
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.progress-ringclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).
Building with an AI tool?
“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.