Wizard — edit from review
Variant: Edit from review
The last step of a form, a summary with an Edit on every row, and the round trip Edit should be. Tap Edit on Plan and you land on the plan step in one 320ms move — the cost of a single step, though the ring travels two gaps — because the reader asked for a place, not a route; replaying step three on the way would show them a screen they never asked to see. Every step stays done on the rail; editing moves the ring and reopens nothing. In this mode the way out is the primary button and it says where it goes, "Back to review", while the ordinary Back steps aside, since from here it would mean step one. The button keeps a fixed width so the label swap never resizes it under the thumb. The summary is updated while off screen, so the panel that slides home is finished rather than catching up, and the edited row takes a clay wash that arrives in 128ms and lets go over 640ms — fast in, slow out reads as "this one", not a blink. Under reduced motion the panels fade out and then in.
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>Wizard — edit from review</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 — 6.4s: Edit, one jump back, change the answer, one jump
home, the change lands, reset. 1% is 64ms; each jump is 5% (320ms)
— the same as a single step, though it covers two. */
--cycle: 6.4s;
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
--_gap: calc(100cqw / 3);
--_off: calc(100% + 16px);
--_rise: 4px;
}
* {
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);
}
.frame {
width: clamp(232px, 82vw, 300px);
padding: 14px;
display: grid;
gap: 12px;
border-radius: calc(12px * var(--round));
background: var(--paper);
border: 1px solid color-mix(in srgb, var(--slate) 10%, transparent);
}
.body {
display: grid;
gap: 12px;
animation: reset var(--t) infinite;
}
/* ── The rail ─────────────────────────────────────────────────────── */
.rail {
position: relative;
height: 20px;
margin: 0 10px;
container-type: inline-size;
}
/* Every step is done and stays done. Editing one doesn't reopen it on
the rail — only the ring goes anywhere. */
.track {
position: absolute;
left: 0;
right: 0;
top: 9px;
height: 2px;
border-radius: 1px;
background: var(--clay);
}
.ring {
position: absolute;
left: -10px;
top: 0;
width: 20px;
height: 20px;
border-radius: 50%;
border: 2px solid var(--clay);
background: var(--paper);
transform: translateX(calc(3 * var(--_gap)));
animation: ring var(--t) infinite;
}
.dot {
position: absolute;
left: -6px;
top: 4px;
width: 12px;
height: 12px;
display: grid;
place-items: center;
border-radius: 50%;
background: var(--clay);
border: 2px solid var(--clay);
color: var(--paper);
transform: translateX(calc(var(--_i) * var(--_gap)));
}
.dot svg {
width: 8px;
height: 8px;
}
.d1 {
--_i: 0;
}
.d2 {
--_i: 1;
}
.d3 {
--_i: 2;
}
.d4 {
--_i: 3;
background: var(--paper);
}
/* ── The panels ───────────────────────────────────────────────────── */
.stage {
position: relative;
height: 96px;
overflow: hidden;
}
.panel {
position: absolute;
inset: 0;
display: grid;
gap: 7px;
align-content: start;
}
/* Rows are inset 6px so the wash on a changed row has room to sit
around its text inside the clipped stage; the heading matches. */
.review {
gap: 4px;
animation: review var(--t) infinite;
}
.plan {
transform: translateX(calc(-1 * var(--_off)));
animation: plan var(--t) infinite;
}
.h {
font-size: 13px;
font-weight: 600;
letter-spacing: -0.01em;
margin-bottom: 2px;
}
.review .h {
padding-left: 6px;
}
.line {
height: 22px;
display: grid;
grid-template-columns: 4.6em 1fr auto;
align-items: center;
gap: 8px;
padding: 0 6px;
border-radius: calc(6px * var(--round));
font-size: 12px;
color: color-mix(in srgb, var(--slate) 62%, transparent);
}
.changed {
animation: landed var(--t) infinite;
}
.val {
display: grid;
}
.val i {
grid-area: 1 / 1;
display: block;
height: 6px;
border-radius: 3px;
background: color-mix(in srgb, var(--slate) 22%, transparent);
}
.changed .old {
animation: val-old var(--t) infinite;
}
.changed .new {
opacity: 0;
animation: val-new var(--t) infinite;
}
.edit {
padding: 2px 6px;
border-radius: 999px;
font-weight: 600;
color: var(--clay-d);
}
.changed .edit {
animation: tap-edit var(--t) infinite;
}
.opt {
height: 18px;
display: flex;
align-items: center;
gap: 8px;
}
.opt b {
width: 12px;
height: 12px;
flex: none;
display: grid;
place-items: center;
border-radius: 50%;
border: 2px solid var(--oat);
}
.opt b::after {
content: '';
width: 4px;
height: 4px;
border-radius: 50%;
background: var(--clay);
transform: scale(0);
}
.opt i {
display: block;
height: 6px;
border-radius: 3px;
background: var(--oat);
}
.was b {
animation: was-ring var(--t) infinite;
}
.was b::after {
animation: was-dot var(--t) infinite;
}
.now b {
animation: now-ring var(--t) infinite;
}
.now b::after {
animation: now-dot var(--t) infinite;
}
/* ── Footer ───────────────────────────────────────────────────────── */
.foot {
display: flex;
justify-content: space-between;
align-items: center;
}
.btn {
height: 28px;
padding: 0 14px;
display: grid;
place-items: center;
border-radius: 999px;
font-size: 12px;
font-weight: 600;
}
.back {
color: color-mix(in srgb, var(--slate) 55%, transparent);
animation: back var(--t) infinite;
}
/* Fixed width, so the label swap never resizes the button under the
thumb that is about to press it. */
.primary {
width: 118px;
background: var(--clay-d);
color: var(--paper);
animation: press var(--t) infinite;
}
.primary span {
grid-area: 1 / 1;
}
.submit {
animation: label-submit var(--t) infinite;
}
.return {
opacity: 0;
animation: label-return var(--t) infinite;
}
/* ── Keyframes ────────────────────────────────────────────────────── */
/* One jump, not a replay. Review to step two is two stops on the rail
but a single 320ms move — the same cost as one step — because the
reader asked for a place, not a route. Walking back through step
three would show them a screen they didn't ask about, twice. */
@keyframes review {
0%,
10% {
transform: translateX(0);
animation-timing-function: var(--ease-in-out);
}
15%,
37.5% {
transform: translateX(var(--_off));
animation-timing-function: var(--ease-in-out);
}
42.5%,
100% {
transform: translateX(0);
}
}
@keyframes plan {
0%,
10% {
transform: translateX(calc(-1 * var(--_off)));
animation-timing-function: var(--ease-in-out);
}
15%,
37.5% {
transform: translateX(0);
animation-timing-function: var(--ease-in-out);
}
42.5%,
100% {
transform: translateX(calc(-1 * var(--_off)));
}
}
@keyframes ring {
0%,
10% {
transform: translateX(calc(3 * var(--_gap)));
animation-timing-function: var(--ease-in-out);
}
15%,
37.5% {
transform: translateX(var(--_gap));
animation-timing-function: var(--ease-in-out);
}
42.5%,
100% {
transform: translateX(calc(3 * var(--_gap)));
}
}
@keyframes tap-edit {
0%,
7.9% {
background: transparent;
transform: scale(1);
animation-timing-function: var(--ease-out);
}
9.5% {
background: color-mix(in srgb, var(--clay) 16%, transparent);
transform: scale(0.95);
animation-timing-function: var(--ease-out);
}
12%,
100% {
background: transparent;
transform: scale(1);
}
}
/* Radio handoff, sequenced: the old pick empties in 64ms, then the new
one fills in 96ms. Overlapped, there is a frame with two half-picked
answers; sequenced, the gap with none is a single 64ms beat. */
@keyframes was-ring {
0%,
24% {
border-color: var(--clay);
animation-timing-function: ease;
}
25%,
85% {
border-color: var(--oat);
}
86%,
100% {
border-color: var(--clay);
}
}
@keyframes was-dot {
0%,
24% {
transform: scale(1);
animation-timing-function: var(--ease-out);
}
25%,
85% {
transform: scale(0);
}
86%,
100% {
transform: scale(1);
}
}
@keyframes now-ring {
0%,
25% {
border-color: var(--oat);
animation-timing-function: ease;
}
26.5%,
85% {
border-color: var(--clay);
}
86%,
100% {
border-color: var(--oat);
}
}
@keyframes now-dot {
0%,
25% {
transform: scale(0);
animation-timing-function: var(--ease-out);
}
26.5%,
85% {
transform: scale(1);
}
86%,
100% {
transform: scale(0);
}
}
/* While you are off editing, the summary already says the new thing —
swapped where nobody is looking — so the panel that slides home is
finished, not catching up. */
@keyframes val-old {
0%,
26% {
opacity: 1;
}
26.1%,
85% {
opacity: 0;
}
86%,
100% {
opacity: 1;
}
}
@keyframes val-new {
0%,
26% {
opacity: 0;
}
26.1%,
85% {
opacity: 1;
}
86%,
100% {
opacity: 0;
}
}
/* The row you edited carries a clay wash as the panel lands, held long
enough to find and released slowly: arrival is fast and the fade is
~5x longer, so it reads as "this one" rather than as a blink. */
@keyframes landed {
0%,
42.5% {
background: transparent;
animation-timing-function: ease;
}
44.5%,
54% {
background: color-mix(in srgb, var(--clay) 14%, transparent);
animation-timing-function: ease;
}
64%,
100% {
background: transparent;
}
}
/* In edit-from-review the way out is the primary button, and it says
where it goes. Back steps off, because from here "back" would mean
step one — a route nobody in this state wants. */
@keyframes back {
0%,
10% {
opacity: 1;
animation-timing-function: ease;
}
12.5%,
40% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
43.5%,
100% {
opacity: 1;
}
}
@keyframes label-submit {
0%,
10% {
opacity: 1;
transform: translateY(0);
animation-timing-function: var(--ease-out);
}
11.5%,
39% {
opacity: 0;
transform: translateY(calc(-1 * var(--_rise)));
animation-timing-function: var(--ease-out);
}
41.5%,
100% {
opacity: 1;
transform: translateY(0);
}
}
@keyframes label-return {
0%,
11.5% {
opacity: 0;
transform: translateY(var(--_rise));
animation-timing-function: var(--ease-out);
}
14%,
37.5% {
opacity: 1;
transform: translateY(0);
animation-timing-function: var(--ease-out);
}
39%,
100% {
opacity: 0;
transform: translateY(var(--_rise));
}
}
@keyframes press {
0%,
35.9% {
transform: scale(1);
animation-timing-function: var(--ease-out);
}
37.5% {
transform: scale(0.96);
animation-timing-function: var(--ease-out);
}
40%,
100% {
transform: scale(1);
}
}
@keyframes reset {
0%,
81% {
opacity: 1;
animation-timing-function: ease;
}
84.5%,
86.5% {
opacity: 0;
animation-timing-function: ease;
}
91%,
100% {
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
/* The panels crossfade in place and the labels swap without lifting;
the ring still makes its two moves, and the wash still lands on the
changed row — those carry the meaning. The cycle runs 1.5x. */
:root {
--_rise: 0px;
}
.body,
.review,
.plan,
.ring,
.changed,
.changed .old,
.changed .new,
.changed .edit,
.was b,
.was b::after,
.now b,
.now b::after,
.back,
.primary,
.submit,
.return {
animation-duration: calc(var(--t) * 1.5);
}
.review {
animation-name: f-review;
}
.plan {
animation-name: f-plan;
transform: none;
opacity: 0;
}
/* Out, then in — never both on the same frame. */
@keyframes f-review {
0%,
10% {
opacity: 1;
animation-timing-function: ease;
}
12%,
39.5% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
42.5%,
100% {
opacity: 1;
}
}
@keyframes f-plan {
0%,
12% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
15%,
37.5% {
opacity: 1;
animation-timing-function: ease;
}
39.5%,
100% {
opacity: 0;
}
}
}
</style>
</head>
<body>
<div
class="frame"
role="img"
aria-label="The review step of a finished four-step form: Edit on the Plan row jumps straight back to the plan step in one move, a different plan is picked, Back to review jumps straight home, and the Plan row briefly washes clay to show what changed"
>
<div class="body">
<div class="rail" aria-hidden="true">
<span class="track"></span>
<span class="ring"></span>
<span class="dot d1"
><svg viewBox="0 0 12 12" fill="none">
<path
d="M2.5 6.2 5 8.5l4.5-5"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/></svg
></span>
<span class="dot d2"
><svg viewBox="0 0 12 12" fill="none">
<path
d="M2.5 6.2 5 8.5l4.5-5"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/></svg
></span>
<span class="dot d3"
><svg viewBox="0 0 12 12" fill="none">
<path
d="M2.5 6.2 5 8.5l4.5-5"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/></svg
></span>
<span class="dot d4"></span>
</div>
<div class="stage">
<div class="panel review">
<p class="h">Review</p>
<span class="line"
>Details<span class="val"><i style="width: 70%"></i></span
><span class="edit">Edit</span></span
>
<span class="line changed"
>Plan<span class="val"
><i class="old" style="width: 44%"></i><i class="new" style="width: 30%"></i></span
><span class="edit">Edit</span></span
>
<span class="line"
>Alerts<span class="val"><i style="width: 56%"></i></span
><span class="edit">Edit</span></span
>
</div>
<div class="panel plan">
<p class="h">Pick a plan</p>
<span class="opt"><b></b><i style="width: 40%"></i></span>
<span class="opt was"><b></b><i style="width: 54%"></i></span>
<span class="opt now"><b></b><i style="width: 34%"></i></span>
</div>
</div>
<div class="foot">
<span class="btn back">Back</span>
<span class="btn primary"
><span class="submit">Submit</span><span class="return">Back to review</span></span
>
</div>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.