Success Check

A green circle with a checkmark that draws itself in with a pop.

Payment successful

A receipt was sent to your inbox.

Tailwind CSS
<style>
  @keyframes success-pop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
  }
  @keyframes success-draw { to { stroke-dashoffset: 0; } }
  .success-circle { animation: success-pop 0.45s ease-out both; }
  .success-tick { stroke-dasharray: 30; stroke-dashoffset: 30; animation: success-draw 0.35s ease-out 0.35s forwards; }
</style>
<div class="flex flex-col items-center gap-3 text-center">
  <div class="success-circle grid h-16 w-16 place-items-center rounded-full bg-green-500 shadow-lg shadow-green-500/30">
    <svg viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="h-8 w-8"><path class="success-tick" d="M5 13l4 4L19 7"/></svg>
  </div>
  <p class="text-sm font-medium text-slate-800 dark:text-slate-100">Payment successful</p>
  <p class="text-xs text-slate-500 dark:text-slate-400">A receipt was sent to your inbox.</p>
</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.

Info

The blue info variant confirms neutral actions like settings saved or profile updated.

Profile updated

Your changes are now live.

Tailwind CSS

Warning

The amber warning variant flags steps the user still needs to complete.

Action needed

Please verify your email to continue.

Tailwind CSS

Compact

The compact horizontal layout fits inside toast notifications and inline banners.

Payment successful

Tailwind CSS

About this success check

After a payment, a form submit, or an upload, users need one clear signal: it worked. This success check pairs a green circle that pops in with a checkmark that draws itself a beat later, the two-stage rhythm that makes confirmations feel deliberate.

Two keyframes run in sequence. success-pop scales the circle from half size with a slight overshoot, and success-draw animates the stroke-dashoffset of the check path from hidden to fully drawn, delayed by 0.35s so the circle lands first. The soft green shadow grounds the circle, and the caption lines underneath state exactly what happened.

Use it on confirmation screens, in success modals, or as an empty-state replacement after an action completes. Keep the caption specific: name the action and what happens next, so the animation decorates a message instead of replacing it.

After a payment, a form submit, or an upload, users hold their breath. A spinner stopping is not an answer; people need one unmistakable signal that it worked. The success check delivers it in two beats: a green circle pops in, then the checkmark draws itself a moment later. That deliberate rhythm reads as confirmed in a way plain text never does.

Two keyframes run in strict sequence because the brain reads causality into order: the circle pops first, then the check draws, so it feels like the check was stamped onto the circle. The pop uses a scale overshoot to 1.1 before settling, which is what makes it feel elastic instead of mechanical. The draw animates stroke-dashoffset on the check path with a 0.35s delay, timed to start exactly as the pop peaks. A soft green shadow under the circle grounds it; without the shadow the whole thing floats and the celebration feels weightless.

For high-emotion moments like a first purchase, let the check linger a full second before advancing, and consider a restrained confetti burst. For routine saves, keep it small and inline next to the form instead of a full-screen takeover. On the confirmation screen, follow the check with the receipt details so the celebration hands off to substance.

The melodramatic version fires the full pop-and-draw celebration for trivial actions like toggling a setting or saving a draft. When everything is a celebration, nothing is, and the pattern loses its power for the moments that matter like payments and submissions. Reserve the two-stage animation for completed outcomes the user genuinely cares about; quiet actions deserve a quiet toast.

Where to use it

  • ✓ Payment confirmation screens
  • ✓ Form submission success states
  • ✓ Onboarding completion steps
  • ✓ File upload confirmations

Customization tips

Swap green-500 for your brand color. Lengthen the 0.35s delay between pop and draw for a more dramatic sequence. Add a subtle ring by wrapping the circle in a padded ring-4 ring-green-100 container.

Design notes

When to use

A success check marks the happy end of a flow: payment completed, file uploaded, account created. The pop plus the drawing checkmark gives the moment a small celebration that confirms the action truly finished. Place it at the top of a confirmation screen where it is the first thing seen, not buried under paragraphs.

What to avoid

Do not show a success check before the action is actually complete, celebrating early backfires when the request then fails. Avoid reusing the same animation for warnings, the green check must mean success every single time. And do not auto-dismiss the confirmation before the user has read what happened next.

Accessibility

Pair the visual with a heading like Payment successful so screen readers get the message, since the animation alone says nothing. Respect prefers-reduced-motion by showing the final check state without the pop.

Frequently asked questions

How do I animate a checkmark drawing itself in SVG?

Set stroke-dasharray to the path length and stroke-dashoffset to the same value, then animate the offset to 0. A length around 30 works for a check drawn in a 24-unit viewBox.

Why do the pop and the draw run at different times?

Staggering them reads as a two-step celebration: the badge arrives, then the check confirms. Run both at once and it looks muddy; the 0.35s delay costs nothing and looks far better.

Can I replay the animation?

Re-trigger it by removing and re-adding the element, or toggle a key in React. CSS animations on page load run once; replay needs a DOM change or a class re-add via JavaScript.

How do I find the exact path length for stroke-dasharray?

Call getTotalLength() on the path element in the console and use that number for both stroke-dasharray and stroke-dashoffset. Guessing the value leaves a gap or an overlap at the seam. Measure after any path edit, even a small curve tweak changes the total length.

How do I show the success check after a form submits?

Hide the form and reveal the check panel in the same container once the request resolves, keeping the layout height stable so the page does not jump. Trigger the draw animation by adding a class when the panel becomes visible, not on page load, so users actually see the sequence. Include a short confirmation line under the check for screen readers.

Should the success check disappear on its own?

Keep it visible until the user acts, success messages carry information people may want to re-read. If you must auto-dismiss, wait at least five seconds and only for trivial confirmations like a saved draft. Never auto-dismiss a success state that contains a reference number or next steps.