Wire — refused at the port
Variant: Refused
The same drag aimed at a port of the wrong type, built on the idea that a refusal should be announced long before it is enforced. The incompatible port is a filled diamond rather than a circle, so the mismatch is legible before any colour arrives, and it dims to 60% the moment the drag starts while the port that would take the wire keeps its ring the whole way — the right answer stays on offer. There is no catch radius, so the wire’s end stays under the pointer all the way in. It goes rust on contact and the reason appears then, held for 720ms while the button is still down and the user can still change course. On release, Housing gives five 48ms beats of shrinking shake and the wire retracts along its own curve in 360ms, leaving the pointer at full speed and slowing into its port. Unlike a severed link, nothing broke here: the wire is handed back whole to the port it came from, and a smaller knock on that port when it lands confirms nothing was made. Reach for it for typed sockets, permission-gated integrations and any connector that has rules.
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>Wire — refused at the port</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 — 4.8s, shared with the connect variant (1% = 48ms). Press at 288ms,
a 1.25s drag that reaches the wrong port at 1.58s, a 720ms dwell
with the reason showing, release at 2.4s, and a 360ms retract home. */
--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);
/* The retract: a wire handed back, not one that snapped — it leaves the
pointer at full speed and slows over the last stretch into its port. */
--ease-accent: cubic-bezier(0.16, 0.84, 0.3, 1);
--_ink: color-mix(in srgb, var(--slate) 80%, transparent);
--_wire: color-mix(in oklch, var(--slate) 38%, var(--paper));
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
min-height: 100vh;
display: grid;
place-items: center;
padding: clamp(10px, 3vw, 28px);
background: var(--ivory);
font-family:
system-ui,
-apple-system,
'Segoe UI',
Roboto,
sans-serif;
}
.card {
width: min(380px, 92vw);
border: 1px solid var(--oat);
border-radius: calc(14px * var(--round));
background: var(--paper);
}
.card svg {
display: block;
width: 100%;
height: auto;
}
/* Nodes are pills, so their radius stays literal and never takes --round. */
.node rect {
fill: var(--ivory);
stroke: var(--oat);
stroke-width: 1;
}
.node text,
.status text {
font-size: 12.5px;
font-weight: 500;
fill: var(--_ink);
}
.node text {
text-anchor: middle;
}
.drag {
fill: none;
stroke-width: 2;
stroke-linecap: round;
stroke-dasharray: 100 200;
animation: drag var(--t) infinite linear;
}
/* Same arc-length sampling as the connect variant, but nothing catches:
an incompatible port has no catch radius, so the wire's end stays
under the pointer all the way in. It goes rust on contact — while the
hand can still change course — and on release it retracts home along
its own curve. Retracting, not fading, says the wire still belongs to
the port it came from. */
@keyframes drag {
0%,
9% {
stroke: var(--_wire);
stroke-dashoffset: 100;
}
11% {
stroke-dashoffset: 98.99;
}
13% {
stroke-dashoffset: 95.18;
}
15% {
stroke-dashoffset: 86.73;
}
17% {
stroke-dashoffset: 71.13;
}
19% {
stroke-dashoffset: 51.08;
}
21% {
stroke-dashoffset: 34.81;
}
23% {
stroke-dashoffset: 23.67;
}
25% {
stroke-dashoffset: 16.1;
}
27% {
stroke-dashoffset: 10.9;
}
29% {
stroke-dashoffset: 7.36;
}
31% {
stroke-dashoffset: 5.05;
}
33% {
stroke: var(--_wire);
stroke-dashoffset: 3.69;
animation-timing-function: ease;
}
35% {
stroke: var(--rust);
stroke-dashoffset: 3.07;
}
50% {
stroke: var(--rust);
stroke-dashoffset: 3.07;
animation-timing-function: var(--ease-accent);
}
57.5% {
stroke: var(--rust);
stroke-dashoffset: 100;
}
57.51%,
100% {
stroke: var(--_wire);
stroke-dashoffset: 100;
}
}
.port {
fill: var(--_wire);
stroke: var(--paper);
stroke-width: 1.5;
transform-box: fill-box;
transform-origin: center;
}
/* Pressed on the way out, and a smaller knock when the wire lands back
in it — the end of the retract is the moment the user learns nothing
was made. */
.port.src {
animation: src var(--t) infinite;
}
@keyframes src {
0%,
6% {
transform: scale(1);
animation-timing-function: var(--ease-out);
}
8.5% {
transform: scale(1.3);
animation-timing-function: var(--ease-out);
}
12%,
57.5% {
transform: scale(1);
animation-timing-function: var(--ease-out);
}
59.5% {
transform: scale(1.18);
animation-timing-function: var(--ease-out);
}
63%,
100% {
transform: scale(1);
}
}
/* A different type gets a different shape: the diamond is legible
before any colour arrives, and dims the moment the drag starts. The
refusal is announced up front; the drop only enforces it. */
.key {
fill: var(--oat);
stroke: var(--_wire);
stroke-width: 1.5;
stroke-linejoin: round;
animation: key var(--t) infinite;
}
@keyframes key {
0%,
9% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
12%,
33% {
opacity: 0.6;
stroke: var(--_wire);
animation-timing-function: ease;
}
35%,
57.5% {
opacity: 1;
stroke: var(--rust);
animation-timing-function: ease;
}
63%,
100% {
opacity: 1;
stroke: var(--_wire);
}
}
/* Five 48ms beats of shrinking amplitude on release: a short no, not a
tantrum, and it runs alongside the retract rather than before it. */
.target {
animation: shake var(--t) infinite;
}
@keyframes shake {
0%,
50% {
transform: translateX(0);
animation-timing-function: var(--ease-out);
}
51% {
transform: translateX(-3px);
animation-timing-function: var(--ease-in-out);
}
52% {
transform: translateX(2.5px);
animation-timing-function: var(--ease-in-out);
}
53% {
transform: translateX(-1.5px);
animation-timing-function: var(--ease-in-out);
}
54% {
transform: translateX(0.75px);
animation-timing-function: var(--ease-in-out);
}
55%,
100% {
transform: translateX(0);
}
}
/* The port that would take this wire keeps its ring through the whole
wrong drag: the right answer stays on offer. */
.halo {
fill: none;
stroke: var(--clay);
stroke-width: 1.25;
opacity: 0;
transform-box: fill-box;
transform-origin: center;
animation: halo var(--t) infinite;
}
@keyframes halo {
0%,
9% {
opacity: 0;
transform: scale(0.8);
animation-timing-function: var(--ease-out);
}
12%,
57.5% {
opacity: 0.6;
transform: scale(1);
animation-timing-function: ease;
}
62%,
100% {
opacity: 0;
transform: scale(1);
}
}
.pointer {
opacity: 0;
animation: pointer var(--t) infinite linear;
}
.pointer path {
fill: var(--slate);
stroke: var(--paper);
stroke-width: 1.25;
stroke-linejoin: round;
}
@keyframes pointer {
0%,
2% {
opacity: 0;
transform: translate(102px, 97px) scale(1);
animation-timing-function: var(--ease-out);
}
6% {
opacity: 1;
transform: translate(92px, 85px) scale(1);
animation-timing-function: var(--ease-out);
}
8.5% {
transform: translate(92px, 85px) scale(0.9);
animation-timing-function: linear;
}
9% {
transform: translate(92px, 85px) scale(0.9);
}
11% {
transform: translate(93.4px, 85px) scale(0.9);
}
13% {
transform: translate(98.2px, 84.8px) scale(0.9);
}
15% {
transform: translate(109px, 83.5px) scale(0.9);
}
17% {
transform: translate(127.8px, 77px) scale(0.9);
}
19% {
transform: translate(149px, 62.3px) scale(0.9);
}
21% {
transform: translate(165.6px, 49.8px) scale(0.9);
}
23% {
transform: translate(178.3px, 43.3px) scale(0.9);
}
25% {
transform: translate(187.5px, 40.3px) scale(0.9);
}
27% {
transform: translate(194.1px, 39px) scale(0.9);
}
29% {
transform: translate(198.6px, 38.4px) scale(0.9);
}
31% {
transform: translate(201.6px, 38.2px) scale(0.9);
}
33% {
transform: translate(203.3px, 38.1px) scale(0.9);
}
35% {
opacity: 1;
transform: translate(204.1px, 38.1px) scale(0.9);
}
50% {
opacity: 1;
transform: translate(204.1px, 38.1px) scale(0.9);
animation-timing-function: var(--ease-out);
}
53%,
100% {
opacity: 0;
transform: translate(206px, 33px) scale(1);
}
}
/* The reason arrives on contact, while the pointer is still down — the
one moment it can still change what the user does. */
.s-idle {
animation: s-idle var(--t) infinite;
}
.s-why {
animation: s-why var(--t) infinite;
}
@keyframes s-idle {
0%,
33% {
opacity: 1;
animation-timing-function: ease;
}
35%,
82.67% {
opacity: 0;
animation-timing-function: ease;
}
85.5%,
100% {
opacity: 1;
}
}
@keyframes s-why {
0%,
35.67% {
opacity: 0;
animation-timing-function: ease;
}
38.5%,
80% {
opacity: 1;
animation-timing-function: ease;
}
82%,
100% {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
/* Half speed. No pointer, no shake, no knock: the wire fades in whole
over the drag's window, turns rust on contact and fades out where
it was refused. Shape, colour and the reason carry it. */
:root {
--t: calc(var(--cycle) * 2 / var(--speed));
}
.pointer,
.target,
.port.src {
animation: none;
}
.pointer {
opacity: 0;
}
.drag {
stroke-dasharray: none;
animation-name: drag-calm;
}
@keyframes drag-calm {
0%,
9% {
stroke: var(--_wire);
opacity: 0;
animation-timing-function: ease;
}
33% {
stroke: var(--_wire);
opacity: 1;
animation-timing-function: ease;
}
35%,
50% {
stroke: var(--rust);
opacity: 1;
animation-timing-function: ease;
}
57.5%,
100% {
stroke: var(--rust);
opacity: 0;
}
}
}
</style>
</head>
<body>
<div class="card">
<svg
viewBox="0 0 300 160"
role="img"
aria-label="A pointer drags a wire from the Intake node's round output port toward Housing, whose diamond input port dimmed as the drag began while Benefits showed a ring; the wire turns rust on touching the diamond and the status reads Housing needs an address; on release Housing shakes and the wire retracts along its curve back into Intake"
>
<g class="status">
<text class="s-idle" x="14" y="36">Drag to connect</text>
<text class="s-why" x="14" y="36">Housing needs an address</text>
</g>
<g class="node">
<rect x="12" y="69" width="80" height="32" rx="16" />
<text x="52" y="89.5">Intake</text>
</g>
<g class="node target">
<rect x="208" y="22" width="80" height="32" rx="16" />
<text x="248" y="42.5">Housing</text>
<path class="key" d="M 208 32.5 L 213.5 38 L 208 43.5 L 202.5 38 Z" />
</g>
<g class="node">
<rect x="208" y="116" width="80" height="32" rx="16" />
<text x="248" y="136.5">Benefits</text>
</g>
<path class="drag" pathLength="100" d="M 92 85 C 150 85, 150 38, 208 38" />
<circle class="halo" cx="208" cy="132" r="9" />
<circle class="port src" cx="92" cy="85" r="4" />
<circle class="port" cx="208" cy="132" r="4" />
<g class="pointer">
<path d="M0 0 L0 13.5 L3.6 10.2 L6.2 15.6 L8.6 14.5 L6 9.2 L10.8 9.2 Z" />
</g>
</svg>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.