Vibary.ai
← Vibe Coding

Checkbox Check Draw

The box fills from its center and the tick strokes itself in over the fill.

formsminimalfriendlyinteraction · finite · starter · ~0.3s
Interactive · click to play
Variant

The animated component in this preview is rendered from the canonical file shown here. The surrounding demo shell only provides context and is not part of the copied code.

221 lines · react + motion only
import { useId, useState } from "react";
import { motion, useReducedMotion } from "motion/react";

/**
 * Vibary · Checkbox Check Draw
 *
 * The box fills from its center and the tick strokes itself in behind
 * the fill, so the two read as one gesture rather than a swap. A real

About this pattern

Two beats read as one gesture: an accent square grows out of the middle of the empty box, and a fraction of a second later the tick strokes across it. Ordering them that way is the whole trick — a mark that arrives before its background looks pasted on, and a mark that arrives with it is just a swap. The fill spring is damped so the box never overshoots and pushes the tick past its own frame. Unchecking runs shorter and eases in, because undoing a choice is not an event.

Checkout optionsTerms agreementTask list itemFilter panel

Where it shows up

Screens we drew to show where this motion usually sits. Illustrations, not captures of any product.

  • Payment
    Card number4242 4242 4242 4242Name on cardN. Bergström
    Expiry04 / 28CVC•••
    Subtotal$156.00Shipping$0.00Tax$13.65Total$169.65
    Pay $169.65
    Checkout

    Option rows where the box has to stay quiet next to the total.

Related patterns