Select — checkbox tick
Variant: Checkbox
The single checkbox, tuned for the control people touch more than almost any other. The box dips to 88% in 80ms on a fast-off-the-mark curve, because the press is a report of contact and any lag reads as the page lagging the finger. The fill grows from 60% as it releases, and the tick starts 40ms into the fill and draws in 160ms on ease-out: the short leg is gone almost at once and the long leg slows into its end, so the mark lands rather than stops. Unchecking is a 100ms fade with no motion. The asymmetry is the point. Checking is the event someone is waiting to see, and clearing it is housekeeping that should not make them watch an animation. Fill and tick live in one wrapper, so "checked" is a single opacity and an uncheck can never leave a stray tick on an empty box. Reach for it in settings, consent rows and to-do lists, anywhere the control is used a thousand times and has to feel the same on the thousandth.
The source
A complete HTML document. Paste it into an empty .html file and it plays — no stylesheet, script, font, or image to fetch.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Select — checkbox tick</title>
<style>
:root {
/* Neutrals — fixed, never remixed. */
--ivory: #faf9f5;
--paper: #ffffff;
--oat: #e3dacc;
--slate: #141413;
/* Knobs — the remix API. A knob exists iff declared here and used below. */
--hue: 38.8;
--lift: 0;
--chroma: 1;
--round: 1;
--speed: 1;
/* Accents — derived from the knobs with the family's offsets baked in,
so one hue roll moves them together. Defaults reproduce the original hex. */
--clay: oklch(calc(0.6724 + var(--lift)) calc(0.1308 * var(--chroma)) var(--hue));
--clay-d: oklch(calc(0.5797 + var(--lift)) calc(0.127 * var(--chroma)) var(--hue));
--olive: oklch(
calc(0.6118 + var(--lift)) calc(0.0713 * var(--chroma)) calc(var(--hue) + 88.3)
);
--rust: oklch(
calc(0.5408 + var(--lift)) calc(0.1357 * var(--chroma)) calc(var(--hue) - 10.3)
);
/* Clock — 3.2s: a check, a long look at the checked state, an uncheck,
and a rest. Each press is 80ms down and 180ms up. */
--cycle: 3.2s;
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
/* Fast off the mark, long settle: the box answers before the finger lifts. */
--ease-accent: cubic-bezier(0.32, 0.72, 0, 1);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
min-height: 100vh;
display: grid;
place-items: center;
background: var(--ivory);
font-family:
system-ui,
-apple-system,
'Segoe UI',
Roboto,
sans-serif;
color: var(--slate);
}
.row {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 18px 14px 14px;
border-radius: calc(10px * var(--round));
background: var(--paper);
box-shadow: 0 1px 2px color-mix(in srgb, var(--slate) 10%, transparent);
font-size: clamp(14px, 4.2vw, 15px);
letter-spacing: -0.01em;
}
.box {
position: relative;
flex: none;
width: 22px;
height: 22px;
border-radius: calc(5px * var(--round));
box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--slate) 32%, transparent);
animation: press var(--t) infinite;
}
/* Fill and tick share one wrapper so "checked" is a single opacity — the
uncheck can never leave a stray tick on an empty box. */
.on {
position: absolute;
inset: 0;
border-radius: inherit;
background: var(--clay);
opacity: 0;
transform: scale(0.6);
animation: on var(--t) infinite;
}
.tick {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
fill: none;
stroke: var(--ivory);
stroke-width: 2.4;
stroke-linecap: round;
stroke-linejoin: round;
stroke-dasharray: 1;
stroke-dashoffset: 1;
animation: draw var(--t) infinite;
}
@keyframes press {
0%,
18.75% {
transform: scale(1);
animation-timing-function: var(--ease-accent);
}
21.25% {
transform: scale(0.88);
animation-timing-function: var(--ease-out);
}
26.88%,
62.5% {
transform: scale(1);
animation-timing-function: var(--ease-accent);
}
65% {
transform: scale(0.88);
animation-timing-function: var(--ease-out);
}
70.63%,
100% {
transform: scale(1);
}
}
/* Checking is the event, so it gets the entrance: the fill grows from
60% while the press releases. Unchecking is housekeeping — a 100ms fade
with no motion at all. The two directions are deliberately unequal. */
@keyframes on {
0%,
21.25% {
opacity: 0;
transform: scale(0.6);
animation-timing-function: var(--ease-out);
}
25.63%,
65% {
opacity: 1;
transform: scale(1);
animation-timing-function: var(--ease-out);
}
68.13% {
opacity: 0;
transform: scale(1);
}
68.2%,
100% {
opacity: 0;
transform: scale(0.6);
}
}
/* The tick starts 40ms into the fill and draws in 160ms on ease-out:
the short leg is gone in a blink and the long leg decelerates into its
end, so the mark lands rather than stops. */
@keyframes draw {
0%,
22.5% {
stroke-dashoffset: 1;
animation-timing-function: var(--ease-out);
}
27.5%,
68.13% {
stroke-dashoffset: 0;
}
68.2%,
100% {
stroke-dashoffset: 1;
}
}
@media (prefers-reduced-motion: reduce) {
.box {
animation: none;
}
.tick {
stroke-dashoffset: 0;
animation: none;
}
.on {
transform: none;
animation: on-flat var(--t) infinite;
}
@keyframes on-flat {
0%,
21.25% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
25.63%,
65% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
68.13%,
100% {
opacity: 0;
}
}
}
</style>
</head>
<body>
<div class="row" role="img" aria-label="A checkbox being checked, held, then unchecked">
<span class="box">
<span class="on">
<svg class="tick" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<path d="M6 11.5 L9.4 14.8 L16 7.8" pathLength="1" />
</svg>
</span>
</span>
<span>Email me receipts</span>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.