# Success Check

> A checkmark that draws itself with a soft burst to confirm an action finished.

Source: https://www.honestui.com/docs/animated/success-check

```tsx
"use client";

import { useState } from "react";
import { SuccessCheck } from "@/registry/default/animated/success-check";

export function SuccessCheckDemo() {
  const [play, setPlay] = useState(0);

  return (
    <div className="flex w-full max-w-xs flex-col items-center gap-4 rounded-2xl border border-border bg-card px-6 pb-6 pt-8 text-center">
      <SuccessCheck playKey={play} size={60} />
      <div className="flex flex-col gap-1" role="status">
        <p className="text-base font-semibold tracking-tight text-foreground">Payment sent</p>
        <p className="text-[13px] text-muted-foreground">
          <span className="tabular-nums">$1,240.00</span> to Northwind Studio
        </p>
      </div>
      <button
        type="button"
        onClick={() => setPlay((value) => value + 1)}
        className="mt-1 h-8 rounded-lg border border-border bg-background px-3 text-[13px] font-medium text-foreground transition-colors hover:bg-muted/60"
      >
        Replay
      </button>
    </div>
  );
}

```

## Overview [#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 [#installation]

<CliBlock commands="[&#x22;success-check&#x22;]" />

## Usage [#usage]

```tsx
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:

```tsx
const [attempt, setAttempt] = useState(0)

<SuccessCheck playKey={attempt} onComplete={() => focusNextStep()} />
<button onClick={() => setAttempt((n) => n + 1)}>Replay</button>
```

## Accessibility [#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.

## API Reference [#api-reference]


  ### `show`

type: `boolean` · default: `true`

Draws the check when true and clears it when false.

  ### `playKey`

type: `string | number`

Change to play the animation again.

  ### `size`

type: `number` · default: `56`

Diameter in pixels.

  ### `color`

type: `string` · default: `success color`

Stroke and burst color. Any CSS color.

  ### `background`

type: `string` · default: `success tint`

Soft fill behind the check. Any CSS color.

  ### `burst`

type: `boolean` · default: `true`

Plays the ring and particles behind the circle.

  ### `label`

type: `string`

Accessible name. Without it the check is decorative.

  ### `onComplete`



void">
    Called once the check has finished drawing.

  ### `className`

type: `string`

Class for the root element.
