Affinity — move across
Variant: Move across
One note was filed under the wrong theme, and the board moves it as an exchange rather than a delete and an insert. The tag changes first: the dot crossfades from clay to olive in 180ms while nothing moves, because the decision comes before its consequence. Then the note lifts, 2.5% of scale with a shadow on its own layer, 144ms on ease-out. It crosses in one 432ms ease-in-out window that it shares with everything else that moves. The source group closes up by exactly the slot the destination opens, so the board never changes height and nothing beneath the two groups has to know a move happened. The lifted note passes over the destination header on the way, which is the one overlap worth allowing, since the thing in hand is the thing being watched. It sets down on the same ease-out it lifted on, and only then do the counts change, old digit out before new digit in, because the number is the outcome, not the intention. Reach for it for re-tagging, moving a card between columns, or reassigning an item between owners: anywhere the user needs to see both ends of a transfer.
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>Affinity — move across</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 — 7.2s. Re-tag 180ms, lift 144ms, one 432ms crossing shared by
everything that moves, drop 144ms; then the same again in reverse. */
--cycle: 7.2s;
--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);
/* Row pitch — row plus gap, so every travel lands in a slot. */
--_p: 26px;
}
* {
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);
}
.board {
position: relative;
width: min(248px, 86vw);
height: 176px;
}
.hdr {
position: absolute;
left: 2px;
right: 0;
height: 20px;
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.02em;
color: color-mix(in srgb, var(--slate) 62%, transparent);
}
.h-exp {
top: 0;
}
.h-onb {
top: calc(4 * var(--_p) + 2px);
animation: close-up var(--t) infinite;
}
/* Counts sit in a fixed 1ch box, so a changing digit never nudges the
header. Old leaves before new lands. */
.num {
position: relative;
display: inline-block;
width: 1ch;
height: 1.2em;
font-weight: 500;
font-variant-numeric: tabular-nums;
color: color-mix(in srgb, var(--slate) 42%, transparent);
}
.num span {
position: absolute;
inset: 0;
}
.num .was {
animation: num-out var(--t) infinite;
}
.num .now {
opacity: 0;
animation: num-in var(--t) infinite;
}
.row {
position: absolute;
left: 0;
right: 0;
height: 22px;
display: flex;
align-items: center;
gap: 7px;
padding: 0 8px;
font-size: 12px;
white-space: nowrap;
background: var(--paper);
border: 1px solid color-mix(in srgb, var(--slate) 10%, transparent);
border-radius: calc(5px * var(--round));
box-shadow: 0 0 0 2px var(--ivory);
}
.dot {
position: relative;
flex: none;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--clay);
}
.o .dot,
.dot.retag {
background: var(--olive);
}
.dot.retag {
position: absolute;
inset: 0;
opacity: 0;
animation: retag var(--t) infinite;
}
.e1 {
top: 22px;
}
.e3 {
top: calc(22px + 2 * var(--_p));
animation: close-up var(--t) infinite;
}
.o1 {
top: calc(22px + 4 * var(--_p) + 2px);
}
.o2 {
top: calc(22px + 5 * var(--_p) + 2px);
}
/* The mover rides above everything — it is the one path that crosses
occupied ground — and carries its own lift shadow on a pseudo layer,
so the shadow fades on opacity instead of repainting a box-shadow. */
.mover {
top: calc(22px + var(--_p));
z-index: 3;
animation:
travel var(--t) infinite,
lift var(--t) infinite;
}
.mover::after {
content: '';
position: absolute;
inset: -1px;
border-radius: inherit;
box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--slate) 34%, transparent);
opacity: 0;
animation: shadow var(--t) infinite;
}
/* The tag changes before anything moves: the decision first, then the
consequence. */
@keyframes retag {
0%,
10% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
12.5%,
55% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
57.5%,
100% {
opacity: 0;
}
}
@keyframes lift {
0%,
13% {
scale: 1;
animation-timing-function: var(--ease-out);
}
15%,
21.5% {
scale: 1.025;
animation-timing-function: var(--ease-out);
}
23.5%,
58% {
scale: 1;
animation-timing-function: var(--ease-out);
}
60%,
66.5% {
scale: 1.025;
animation-timing-function: var(--ease-out);
}
68.5%,
100% {
scale: 1;
}
}
@keyframes shadow {
0%,
13% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
15%,
21.5% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
23.5%,
58% {
opacity: 0;
animation-timing-function: var(--ease-out);
}
60%,
66.5% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
68.5%,
100% {
opacity: 0;
}
}
/* One window for the whole exchange: the source closes up by exactly
the slot the destination opens, so the board never changes height
and nothing below the two groups has to know a move happened. */
@keyframes travel {
0%,
15.5% {
translate: 0 0;
animation-timing-function: var(--ease-in-out);
}
21.5%,
60.5% {
translate: 0 calc(2 * var(--_p) + 2px);
animation-timing-function: var(--ease-in-out);
}
66.5%,
100% {
translate: 0 0;
}
}
@keyframes close-up {
0%,
15.5% {
translate: 0 0;
animation-timing-function: var(--ease-in-out);
}
21.5%,
60.5% {
translate: 0 calc(-1 * var(--_p));
animation-timing-function: var(--ease-in-out);
}
66.5%,
100% {
translate: 0 0;
}
}
/* Counts change when the note lands, never when it lifts — the number
is the outcome, not the intention. */
@keyframes num-out {
0%,
21.5% {
opacity: 1;
translate: 0 0;
animation-timing-function: var(--ease-out);
}
23%,
68.5% {
opacity: 0;
translate: 0 -3px;
animation-timing-function: var(--ease-out);
}
70.5%,
100% {
opacity: 1;
translate: 0 0;
}
}
@keyframes num-in {
0%,
23% {
opacity: 0;
translate: 0 3px;
animation-timing-function: var(--ease-out);
}
25%,
66.5% {
opacity: 1;
translate: 0 0;
animation-timing-function: var(--ease-out);
}
68%,
100% {
opacity: 0;
translate: 0 3px;
}
}
@media (prefers-reduced-motion: reduce) {
/* The exchange happens on one frame; the re-tag and the counts keep
their fades, because those are the record of what changed. */
.mover {
animation: travel-step calc(var(--t) * 1.5) infinite;
}
.mover::after {
animation: none;
}
.e3,
.h-onb {
animation: close-up-step calc(var(--t) * 1.5) infinite;
}
.num span {
translate: none !important;
}
.dot.retag,
.num .was,
.num .now {
animation-duration: calc(var(--t) * 1.5);
}
@keyframes travel-step {
0%,
15.5% {
translate: 0 0;
animation-timing-function: steps(1, end);
}
21.5%,
60.5% {
translate: 0 calc(2 * var(--_p) + 2px);
animation-timing-function: steps(1, end);
}
66.5%,
100% {
translate: 0 0;
}
}
@keyframes close-up-step {
0%,
15.5% {
translate: 0 0;
animation-timing-function: steps(1, end);
}
21.5%,
60.5% {
translate: 0 calc(-1 * var(--_p));
animation-timing-function: steps(1, end);
}
66.5%,
100% {
translate: 0 0;
}
}
}
</style>
</head>
<body>
<div
class="board"
role="img"
aria-label="A research note is re-tagged from Export to Onboarding: its dot changes colour, it lifts, and it crosses into the other group while the source closes up and the destination opens by the same slot; both counts change as it lands"
>
<div class="hdr h-exp">
<i class="dot"></i>Export
<span class="num"><span class="was">3</span><span class="now">2</span></span>
</div>
<div class="hdr h-onb">
<i class="dot" style="background: var(--olive)"></i>Onboarding
<span class="num"><span class="was">2</span><span class="now">3</span></span>
</div>
<div class="row e1"><i class="dot"></i>Couldn’t find export</div>
<div class="row e3"><i class="dot"></i>Wanted CSV, got PDF</div>
<div class="row o o1"><i class="dot"></i>Skipped the tour</div>
<div class="row o o2"><i class="dot"></i>Never finished setup</div>
<div class="row mover">
<i class="dot"><i class="dot retag"></i></i>Invite step confused
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.