# Run check

A status mark whose spinner closes into a ring, and whose ring runs out into a check, or a cross on failure, in one pen stroke.

Also called: animated check, spinner to check, success checkmark animation.

Example: A run finishing. Each step's spinner closes into a ring, and the ring's own stroke runs out into the check. A failed step ends in a cross, then passes on retry. Preview: https://chatcn.dev/preview/run-check-demo

Most status marks swap a spinner for a check. This one finishes the gesture: the working arc closes into a full ring, then the ring's own stroke leaves the circle and becomes the check, its tail drawing in behind it. A failure ends the same way in a cross, with its second bar a beat later. It is drawn on the kit's 24 grid with round caps, so it sits in any row of text at 14 to 64 px.

## Installation

```bash
npx shadcn@latest add https://chatcn.dev/r/run-check.json
```

## Usage

```tsx
import { RunCheck } from "@/components/ui/chatcn/run-check"

<RunCheck status={step.status} size={16} />
```

## Examples

### States and sizes

Example: Run check states. Queued, running, done and failed at 16, 24 and 40 px, and one large mark to drive by hand. Preview: https://chatcn.dev/preview/run-check-states

## Props

| Prop | Type | Notes |
| --- | --- | --- |
| `status` | `"queued" | "running" | "done" | "error"` | Queued is a faint dashed ring |
| `size` | `number` | Rendered size in px. Default 16 |
| `labels` | `Partial<Record<status, string>>` | Accessible names. Defaults: Queued, Running, Done, Failed |

## Accessibility

- `role="img"` named for its status. Put the announcement on the row it marks, not on the mark.
- Color is never the only signal: the shape changes with the status.

## Motion

- Close: 240 ms ease out. Travel: 460 ms ease in out along one path, drawn with `stroke-dasharray`. A full ring looks the same at any rotation, which is what lets the pen path take over from the spinner without a seam.
- The spinner's head and tail move at different speeds, so the arc breathes as it turns.
- Only a status change from running animates; a mark that mounts finished is drawn finished.

Under reduced motion: the spinner holds still as a short arc and endings fade in.

Source: https://chatcn.dev/docs/components/run-check