Success Check
A checkmark that draws itself with a soft burst to confirm an action finished.
Overview
Success Check marks the end of an action, such as a payment, a submitted form, or a finished upload. A soft circle grows in, its outline draws around, the check strokes from left to right, and a faint ring and particles push outward once it lands. The whole sequence takes under a second.
It uses the theme's success color by default and accepts any CSS color, so it can match a brand or sit on a colored surface.
Installation
Usage
import { SuccessCheck } from "@/components/animated/success-check"
<SuccessCheck label="Payment sent" size={60} />The check draws when it mounts or when show becomes true. Change playKey to draw it again:
const [attempt, setAttempt] = useState(0)
<SuccessCheck playKey={attempt} onComplete={() => focusNextStep()} />
<button onClick={() => setAttempt((n) => n + 1)}>Replay</button>Accessibility
Without label, the check is decorative and hidden from assistive technology. Pair it with visible text that says what happened, and announce that text with a status region when the result arrives. With label, the check is exposed as an image with that name; use this only when no nearby text already says the same thing.
With reduced motion enabled, the check appears fully drawn with a short fade and no burst, and onComplete still fires.