CSS Goal Progress Card
A metric card with a conic-gradient progress ring, set by one custom property, next to the goal amount.
Monthly goal
$7,200 / $10,000 18 days left<article class="goal-card">
<div class="goal-card-ring" style="--p: 72" role="img" aria-label="72% of goal reached">
<span>72%</span>
</div>
<div>
<p>Monthly goal</p>
<strong>$7,200 <small>/ $10,000</small></strong>
<span>18 days left</span>
</div>
</article>
.goal-card {
--ring: #db2777;
display: flex;
align-items: center;
gap: 16px;
width: 270px;
padding: 16px 18px;
border-radius: 18px;
background: #fff;
box-shadow: 0 8px 24px -12px rgba(131, 24, 67, 0.35);
color: #500724;
font-family: system-ui, sans-serif;
}
.goal-card-ring {
display: grid;
flex: none;
place-items: center;
width: 72px;
height: 72px;
border-radius: 50%;
background: conic-gradient(var(--ring) calc(var(--p) * 1%), #fce7f3 0);
}
.goal-card-ring span {
display: grid;
place-items: center;
width: 56px;
height: 56px;
border-radius: 50%;
background: #fff;
font-size: 15px;
font-weight: 800;
}
.goal-card p {
margin: 0;
color: #9d4b73;
font-size: 12px;
}
.goal-card strong {
display: block;
margin: 2px 0;
font-size: 20px;
}
.goal-card small {
color: #be8aa5;
font-size: 12px;
font-weight: 500;
}
.goal-card-ring + div > span {
color: var(--ring);
font-size: 12px;
font-weight: 600;
}
About this CSS Goal Progress Card
This CSS Goal Progress Card is 58 lines of pure CSS (1.0 KB) with no JavaScript and no dependencies. It uses conic gradients, box shadows, CSS Grid and Flexbox. 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 goal progress card without touching the rest of the CSS:
| Property | Default |
|---|---|
--ring | #db2777 |
How to use this goal progress card
- 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
.goal-cardclass 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.