Spread — band opens from the median
Variant: Percentile band
A fourteen-minute latency chart where every minute lands as a median tick first and its p5–p95 range opens out of that tick 120ms later. The range is a statement about the median — how far the requests strayed from it — so it unclips outward from the tick’s own height rather than growing up from the baseline, and a reader sees the centre before the spread. It is a clip-path reveal, not scaleY, so the pill keeps its round caps the whole way open. Ticks cascade left to right 40ms apart and each range takes 512ms on ease-out. Four minutes in the middle open two to three times taller while their medians stay level: an incident a p50 chart would have drawn as a flat line. Use it for latency, build time and any series where the tail matters more than the middle.
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>Spread — band opens from the median</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, so 1% is 64ms. Medians land across 520ms, each range
opens 120ms behind its median, then a long hold. */
--cycle: 6.4s;
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--_muted: color-mix(in srgb, var(--slate) 50%, transparent);
--_grid: color-mix(in srgb, var(--oat) 80%, transparent);
--_band: color-mix(in srgb, var(--clay) 38%, transparent);
--_tick: var(--slate);
}
* {
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);
}
.card {
width: min(296px, 88vw);
padding: 14px 16px 12px;
background: var(--paper);
border: 1px solid var(--oat);
border-radius: calc(10px * var(--round));
display: grid;
gap: 10px;
}
.head {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 12px;
}
.head b {
font-weight: 600;
}
.legend {
display: flex;
gap: 10px;
color: var(--_muted);
font-size: 11px;
}
.legend span {
display: flex;
align-items: center;
gap: 4px;
}
.legend .k-tick {
width: 10px;
height: 2px;
background: var(--_tick);
}
.legend .k-band {
width: 6px;
height: 12px;
border-radius: 999px;
background: var(--_band);
}
.plot {
position: relative;
height: clamp(96px, 30vw, 120px);
display: flex;
background: repeating-linear-gradient(to top, var(--_grid) 0 1px, transparent 1px 25%);
border-bottom: 1px solid color-mix(in srgb, var(--slate) 24%, transparent);
animation: frame var(--t) infinite;
}
.y {
position: absolute;
left: 0;
bottom: 75%;
font-size: 11px;
line-height: 1;
padding-bottom: 2px;
color: var(--_muted);
font-variant-numeric: tabular-nums;
}
.b {
position: relative;
flex: 1;
}
/* The range is a statement about the median — "this is how far the
requests strayed from it" — so it opens out of the median, unclipped
outward from the tick's own height rather than grown from the
baseline. A clip keeps the pill's round caps; scaleY would squash them. */
.b i {
position: absolute;
left: 50%;
bottom: var(--_lo);
height: calc(var(--_hi) - var(--_lo));
width: clamp(6px, 2.2vw, 8px);
translate: -50% 0;
border-radius: 999px;
background: var(--_band);
clip-path: inset(var(--_o) 0 calc(100% - var(--_o)) 0 round 999px);
opacity: 0;
animation: open var(--t) infinite;
animation-delay: calc((0.32s + var(--_i) * 0.04s) / var(--speed));
}
.b b {
position: absolute;
left: 50%;
bottom: var(--_m);
width: clamp(10px, 3.4vw, 13px);
height: 2px;
margin-bottom: -1px;
translate: -50% 0;
background: var(--_tick);
opacity: 0;
animation: tick var(--t) infinite;
animation-delay: calc((0.2s + var(--_i) * 0.04s) / var(--speed));
}
.axis {
display: flex;
justify-content: space-between;
font-size: 11px;
color: var(--_muted);
}
/* Every element hides again at 86% of its own iteration, when the frame
is already dark. Each stagger delay is under the 896ms dark window,
so no part re-arms where it can be seen. */
@keyframes tick {
0% {
opacity: 0;
transform: scaleX(0.6);
animation-timing-function: var(--ease-out);
}
4%,
86% {
opacity: 1;
transform: scaleX(1);
}
86.01%,
100% {
opacity: 0;
}
}
@keyframes open {
0% {
opacity: 0;
clip-path: inset(var(--_o) 0 calc(100% - var(--_o)) 0 round 999px);
animation-timing-function: var(--ease-out);
}
1.5% {
opacity: 1;
}
8%,
86% {
opacity: 1;
clip-path: inset(0 0 0 0 round 999px);
}
86.01%,
100% {
opacity: 0;
}
}
@keyframes frame {
0%,
80% {
opacity: 1;
animation-timing-function: var(--ease-out);
}
86%,
100% {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
/* The ranges fade up at full height instead of opening; ticks keep
only their fade. Twice the period, and the delays scale with it so
the reset still lands in the dark. */
.plot,
.b i,
.b b {
animation-duration: calc(var(--t) * 2);
}
.b i {
animation-delay: calc((0.64s + var(--_i) * 0.08s) / var(--speed));
clip-path: none !important;
}
.b b {
animation-delay: calc((0.4s + var(--_i) * 0.08s) / var(--speed));
transform: none !important;
}
}
</style>
</head>
<body>
<div
class="card"
role="img"
aria-label="A latency chart over fourteen minutes. Each minute's median lands as a short dark tick, then a pale range opens out of it to show where the 5th to 95th percentile of requests fell. The medians stay level the whole time, while four minutes in the middle open into ranges two to three times taller"
>
<div class="head">
<b>Latency</b>
<span class="legend"
><span><i class="k-tick"></i>p50</span><span><i class="k-band"></i>p5–p95</span></span
>
</div>
<div class="plot">
<span class="y">300ms</span>
<span class="b" style="--_i: 0; --_lo: 18%; --_hi: 46%; --_m: 30%; --_o: 57.1%"
><i></i><b></b
></span>
<span class="b" style="--_i: 1; --_lo: 17%; --_hi: 48%; --_m: 29%; --_o: 61.3%"
><i></i><b></b
></span>
<span class="b" style="--_i: 2; --_lo: 19%; --_hi: 45%; --_m: 31%; --_o: 53.8%"
><i></i><b></b
></span>
<span class="b" style="--_i: 3; --_lo: 18%; --_hi: 50%; --_m: 30%; --_o: 62.5%"
><i></i><b></b
></span>
<span class="b" style="--_i: 4; --_lo: 16%; --_hi: 47%; --_m: 28%; --_o: 61.3%"
><i></i><b></b
></span>
<span class="b" style="--_i: 5; --_lo: 18%; --_hi: 49%; --_m: 31%; --_o: 58.1%"
><i></i><b></b
></span>
<span class="b" style="--_i: 6; --_lo: 19%; --_hi: 52%; --_m: 32%; --_o: 60.6%"
><i></i><b></b
></span>
<span class="b" style="--_i: 7; --_lo: 18%; --_hi: 76%; --_m: 31%; --_o: 77.6%"
><i></i><b></b
></span>
<span class="b" style="--_i: 8; --_lo: 17%; --_hi: 94%; --_m: 33%; --_o: 79.2%"
><i></i><b></b
></span>
<span class="b" style="--_i: 9; --_lo: 19%; --_hi: 86%; --_m: 32%; --_o: 80.6%"
><i></i><b></b
></span>
<span class="b" style="--_i: 10; --_lo: 18%; --_hi: 76%; --_m: 30%; --_o: 79.3%"
><i></i><b></b
></span>
<span class="b" style="--_i: 11; --_lo: 17%; --_hi: 51%; --_m: 29%; --_o: 64.7%"
><i></i><b></b
></span>
<span class="b" style="--_i: 12; --_lo: 18%; --_hi: 47%; --_m: 30%; --_o: 58.6%"
><i></i><b></b
></span>
<span class="b" style="--_i: 13; --_lo: 19%; --_hi: 48%; --_m: 31%; --_o: 58.6%"
><i></i><b></b
></span>
</div>
<div class="axis"><span>14 min ago</span><span>now</span></div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.