Back to the library
Last step advance, snap
Variant: Snap
The same checkout stepper advancing to its final step, here with a strong ease-out on the move. Use it when the flow should feel fast and the jump to the last step should register the moment it starts. Almost all the travel happens in the first third of the 290ms, so the marker reaches the final node right away and spends the rest of the time settling there.
progresssteppercheckoutstate-changeease-out
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>Last step advance — snap</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; /* include ONLY if at least one border-radius is wrapped below */
--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
(#d97757 / #b85c3e / #788c5d / #b04a3f). */
--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 — every duration in the document runs off --t. */
--cycle: 3.2s; /* the authored master loop */
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* include only if used */
--_muted: color-mix(in oklab, var(--slate) 58%, var(--paper));
--_shadow: color-mix(in oklab, var(--slate) 22%, transparent);
--_glow: color-mix(in oklab, var(--clay-d) 40%, transparent);
}
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
display: grid;
place-items: center;
background: var(--ivory);
color: var(--slate);
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.card {
width: min(360px, 88vw);
padding: clamp(16px, 5vw, 24px);
background: var(--paper);
border-radius: calc(16px * var(--round));
box-shadow: 0 0 0 1px var(--oat), 0 10px 28px -14px var(--_shadow);
}
.eyebrow {
margin: 0;
font-size: clamp(11px, 3.2vw, 12px);
letter-spacing: 0.05em;
text-transform: uppercase;
color: var(--_muted);
}
.headline {
display: grid;
margin: 6px 0 0;
font-size: clamp(16px, 4.6vw, 19px);
font-weight: 600;
line-height: 1.25;
}
.headline span { grid-area: 1 / 1; }
.before { animation: before var(--t) infinite; }
.after { opacity: 0; animation: after var(--t) infinite; }
.track {
position: relative;
height: 22px;
margin: clamp(16px, 5vw, 22px) 11px 0;
}
.line, .base, .fill {
position: absolute;
top: 50%;
height: 4px;
margin-top: -2px;
border-radius: 999px;
}
.line { left: 0; right: 0; background: var(--oat); }
.base { left: 0; right: 50%; background: var(--clay); }
.node {
position: absolute;
top: 50%;
width: 10px;
height: 10px;
margin: -5px 0 0 -5px;
border-radius: 50%;
background: var(--clay);
}
.n1 { left: 0; }
.n2 { left: 50%; }
.n3 { left: 100%; background: var(--paper); box-shadow: inset 0 0 0 2px var(--oat); }
/* Clip only the left edge: the fill's trailing half hides behind the start,
while the puck keeps room to travel past the end. */
.clip {
position: absolute;
inset: 0;
clip-path: inset(-16px -48px -16px 0);
}
.rider {
position: absolute;
inset: 0;
transform: translateX(-50%);
animation: advance var(--t) infinite;
}
.fill { left: 0; right: 0; background: var(--clay); }
.puck {
position: absolute;
top: 50%;
width: 22px;
height: 22px;
margin-top: -11px;
border-radius: 50%;
background: var(--clay);
box-shadow: 0 0 0 4px var(--paper), 0 3px 10px var(--_glow);
}
.puck::after {
content: "";
position: absolute;
inset: 7px;
border-radius: 50%;
background: var(--paper);
}
.rider .puck { right: 0; margin-right: -11px; }
.puck-from { left: 50%; margin-left: -11px; display: none; }
.labels {
display: grid;
grid-template-columns: repeat(3, 1fr);
margin-top: 10px;
font-size: clamp(11px, 3.2vw, 12.5px);
font-weight: 500;
}
.labels span:nth-child(2) { text-align: center; }
.labels span:nth-child(3) { text-align: right; }
.pay { color: var(--_muted); animation: pay var(--t) infinite; }
@keyframes advance {
0% { transform: translateX(-50%); opacity: 1; }
15% { transform: translateX(-50%); animation-timing-function: var(--ease-out); }
24% { transform: translateX(0); }
84% { transform: translateX(0); opacity: 1; animation-timing-function: var(--ease-out); }
89% { transform: translateX(0); opacity: 0; }
90% { transform: translateX(-50%); opacity: 0; animation-timing-function: var(--ease-out); }
96%, 100% { transform: translateX(-50%); opacity: 1; }
}
@keyframes before {
0% { opacity: 1; transform: none; }
23% { opacity: 1; transform: none; animation-timing-function: var(--ease-out); }
27% { opacity: 0; transform: translateY(-4px); }
87% { opacity: 0; transform: translateY(4px); animation-timing-function: var(--ease-out); }
95%, 100% { opacity: 1; transform: none; }
}
@keyframes after {
0% { opacity: 0; transform: translateY(4px); }
24% { opacity: 0; transform: translateY(4px); animation-timing-function: var(--ease-out); }
30% { opacity: 1; transform: none; }
84% { opacity: 1; transform: none; animation-timing-function: var(--ease-out); }
88%, 100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes pay {
0% { color: var(--_muted); }
25% { color: var(--_muted); animation-timing-function: ease; }
29% { color: var(--slate); }
84% { color: var(--slate); animation-timing-function: ease; }
88%, 100% { color: var(--_muted); }
}
@keyframes rm-fill {
0% { opacity: 0; }
15% { opacity: 0; animation-timing-function: ease; }
28% { opacity: 1; }
84% { opacity: 1; animation-timing-function: ease; }
92%, 100% { opacity: 0; }
}
@keyframes rm-from {
0% { opacity: 1; }
15% { opacity: 1; animation-timing-function: ease; }
28% { opacity: 0; }
84% { opacity: 0; animation-timing-function: ease; }
92%, 100% { opacity: 1; }
}
@keyframes rm-before {
0% { opacity: 1; }
20% { opacity: 1; animation-timing-function: ease; }
28% { opacity: 0; }
86% { opacity: 0; animation-timing-function: ease; }
94%, 100% { opacity: 1; }
}
@keyframes rm-after {
0% { opacity: 0; }
22% { opacity: 0; animation-timing-function: ease; }
30% { opacity: 1; }
84% { opacity: 1; animation-timing-function: ease; }
92%, 100% { opacity: 0; }
}
@media (max-width: 380px) {
.card { padding: 16px; }
.track { margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
.rider {
transform: translateX(0);
animation: rm-fill calc(var(--t) * 2) infinite;
}
.puck-from {
display: block;
animation: rm-from calc(var(--t) * 2) infinite;
}
.before { animation: rm-before calc(var(--t) * 2) infinite; }
.after { animation: rm-after calc(var(--t) * 2) infinite; }
.pay { animation-duration: calc(var(--t) * 2); }
}
</style>
</head>
<body>
<div class="card" role="group" aria-label="Checkout progress">
<p class="eyebrow">Checkout · details saved</p>
<p class="headline">
<span class="before">One more step</span>
<span class="after" aria-hidden="true">Last step: payment</span>
</p>
<div class="track" aria-hidden="true">
<div class="line"></div>
<div class="base"></div>
<div class="node n1"></div>
<div class="node n2"></div>
<div class="node n3"></div>
<div class="puck puck-from"></div>
<div class="clip">
<div class="rider">
<div class="fill"></div>
<div class="puck"></div>
</div>
</div>
</div>
<div class="labels">
<span>Cart</span>
<span>Details</span>
<span class="pay">Pay</span>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.