Link — handshake
Variant: Handshake
A connection that is only drawn once both ends agree to it. The link starts as a long-dashed line — this family’s word for a path that exists but carries nothing — and a probe crosses it on a 672ms ease-in-out, because it travels between two points already on screen rather than entering. The far node answers with one expanding ring, an ack sets out 96ms later on the same curve, and only once it is home does the line go solid: two halves leave their own nodes on the same frame and meet in the middle on a 384ms ease-out. Drawing it from one end would claim the client decides; the seam in the middle says it took two. The status flips from connecting to live on the commit, not on the probe, so the label never gets ahead of the line. Reach for it on any connect step — a socket, a pairing flow, an integration authorising — where "trying" and "connected" must not be confusable.
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>Link — handshake</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;
--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)
);
--_muted: color-mix(in srgb, var(--slate) 52%, transparent);
--_rule: color-mix(in srgb, var(--slate) 30%, transparent);
/* Clock — 4.8s: a 672ms probe out, a 672ms ack back, a 384ms commit,
then over two seconds of a live link before the reset. */
--cycle: 4.8s;
--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);
}
* {
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);
}
.link {
width: min(280px, 86vw);
height: auto;
display: block;
overflow: visible;
}
/* The family's grammar: dashed is a link that is planned but carries
nothing, solid is a link both ends have agreed to. */
.planned {
fill: none;
stroke: var(--_rule);
stroke-width: 2.5;
stroke-dasharray: 8 6;
animation: planned var(--t) infinite;
}
/* Two halves, each owned by one end, so the line is only whole once both
sides have committed. Butt caps: the seam where they meet is the claim,
and a round cap would paint a dot there before either half arrives. */
.half {
fill: none;
stroke: var(--olive);
stroke-width: 3;
stroke-linecap: butt;
stroke-dasharray: 100 200;
animation: commit var(--t) infinite;
}
.node {
fill: var(--paper);
stroke: var(--slate);
stroke-width: 2;
}
.core {
fill: var(--olive);
transform-box: fill-box;
transform-origin: center;
animation: core var(--t) infinite;
}
/* The probe is a request in flight between two points already on screen,
so it eases in and out of each end rather than launching at full speed. */
.probe {
fill: var(--clay);
animation: probe var(--t) infinite;
}
/* Same colour as the probe: direction carries the meaning, and a darker
return reads as an error coming back. */
.ack {
fill: var(--clay);
animation: ack var(--t) infinite;
}
.answer {
fill: none;
stroke: var(--clay);
stroke-width: 1.5;
transform-box: fill-box;
transform-origin: center;
animation: answer var(--t) infinite;
}
.name {
fill: var(--_muted);
font-family: inherit;
font-size: 12px;
font-weight: 500;
}
.status {
font-family: inherit;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.14em;
}
.waiting {
fill: var(--_muted);
animation: waiting var(--t) infinite;
}
.live {
fill: var(--olive);
animation: live var(--t) infinite;
}
.settled {
animation: settled var(--t) infinite;
}
@keyframes planned {
0%,
39% {
opacity: 1;
}
47%,
90% {
opacity: 0.4;
}
96%,
100% {
opacity: 1;
}
}
@keyframes probe {
0%,
6% {
opacity: 0;
transform: translateX(0);
}
8% {
opacity: 1;
transform: translateX(0);
animation-timing-function: var(--ease-in-out);
}
22% {
opacity: 1;
transform: translateX(200px);
}
23%,
100% {
opacity: 0;
transform: translateX(200px);
}
}
/* The answer sets out 96ms after the probe lands — long enough to read as
the far end deciding, short enough that the round trip stays one gesture. */
@keyframes ack {
0%,
23% {
opacity: 0;
transform: translateX(200px);
}
24% {
opacity: 1;
transform: translateX(200px);
animation-timing-function: var(--ease-in-out);
}
38% {
opacity: 1;
transform: translateX(0);
}
39%,
100% {
opacity: 0;
transform: translateX(0);
}
}
@keyframes answer {
0%,
22% {
opacity: 0;
transform: scale(1);
}
23% {
opacity: 0.7;
transform: scale(1);
animation-timing-function: var(--ease-out);
}
31%,
100% {
opacity: 0;
transform: scale(2.2);
}
}
/* Commit only once the ack is home: both halves leave their nodes on the
same frame, 384ms on a strong ease-out, and meet in the middle. */
@keyframes commit {
0%,
39% {
stroke-dashoffset: 100;
animation-timing-function: var(--ease-out);
}
47%,
97% {
stroke-dashoffset: 0;
}
98%,
100% {
stroke-dashoffset: 100;
}
}
@keyframes core {
0%,
45% {
opacity: 0;
transform: scale(0.9);
animation-timing-function: var(--ease-out);
}
50%,
100% {
opacity: 1;
transform: scale(1);
}
}
@keyframes waiting {
0%,
44% {
opacity: 1;
}
47%,
93% {
opacity: 0;
}
96%,
100% {
opacity: 1;
}
}
@keyframes live {
0%,
46% {
opacity: 0;
}
50%,
90% {
opacity: 1;
}
93%,
100% {
opacity: 0;
}
}
/* The live layer goes dark before the halves retract at 98%, and the
dashes come back up underneath it, so the reset is a crossfade back to
"planned" — never an empty frame, never the link visibly undoing. */
@keyframes settled {
0%,
90% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
96%,
100% {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
/* The travelling dots are the only movement across the frame; they go.
The commit and the label change are the state, so they stay, at 2x. */
.probe,
.ack,
.answer {
display: none;
}
.planned,
.half,
.core,
.waiting,
.live,
.settled {
animation-duration: calc(var(--t) * 2);
}
}
</style>
</head>
<body>
<svg
class="link"
viewBox="0 0 280 136"
role="img"
aria-label="A dashed planned link between a client and a server. A probe travels across, an acknowledgement travels back, and only then does a solid line grow from both ends to meet in the middle as the status changes from connecting to live."
>
<path class="planned" d="M 52 56 H 228" />
<g class="settled">
<path class="half" pathLength="100" d="M 52 56 H 140" />
<path class="half" pathLength="100" d="M 228 56 H 140" />
</g>
<circle class="answer" cx="240" cy="56" r="12" />
<circle class="probe" cx="40" cy="56" r="4" />
<circle class="ack" cx="40" cy="56" r="4" />
<circle class="node" cx="40" cy="56" r="12" />
<circle class="node" cx="240" cy="56" r="12" />
<g class="settled">
<circle class="core" cx="40" cy="56" r="4.5" />
<circle class="core" cx="240" cy="56" r="4.5" />
</g>
<text class="name" x="40" y="90" text-anchor="middle">client</text>
<text class="name" x="240" y="90" text-anchor="middle">server</text>
<text class="status waiting" x="140" y="124" text-anchor="middle">CONNECTING</text>
<text class="status live" x="140" y="124" text-anchor="middle">LIVE</text>
</svg>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.