CSS Animated Checkmark
A success checkmark that draws itself with an SVG stroke animation.
HTML
<svg class="checkmark" viewBox="0 0 52 52" aria-label="Success">
<circle cx="26" cy="26" r="24"/>
<path d="M15 27l7 7 15-15"/>
</svg>
CSS
/* Remove "infinite" from both animations to play it once */
.checkmark {
width: 72px;
height: 72px;
fill: none;
stroke: #22c55e;
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
}
.checkmark circle {
stroke-dasharray: 151;
animation: check-circle 3s ease infinite;
}
.checkmark path {
stroke-dasharray: 32;
animation: check-tick 3s ease infinite;
}
@keyframes check-circle {
0% { stroke-dashoffset: 151; }
25%, 100% { stroke-dashoffset: 0; }
}
@keyframes check-tick {
0%, 20% { stroke-dashoffset: 32; }
35%, 100% { stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
.checkmark circle,
.checkmark path {
animation: none;
}
}
About this CSS Animated Checkmark
This CSS Animated Checkmark is 37 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses keyframe animations and reduced-motion support. 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
The colors in this snippet. Search and replace them to match your brand:
#22c55e
How to use this animated checkmark
- 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
.checkmarkclass 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.