Receipt — sending, sent, delivered
Variant: Sent → delivered
The three states of an outgoing message, told by one mark that grows. While it is in flight the bubble wears a small clock — a clock rather than a spinner, because the message is waiting, not working, and a thread full of unsent bubbles should not become a page full of motion. When the server takes it, one tick draws in 180ms on ease-out: the only beat the sender caused, so it is the one that moves most. When the other device takes it, the second tick does not draw — it slides four pixels out from under the first, so "delivered" reads as more of "sent" rather than a new icon replacing it. The words beneath crossfade in 60ms and never animate their width: the label is a stack and the mark trails it, so every state ends flush against the same glyph and the meta line never reflows. Reach for it on any message, comment or outbox row where "did it go?" is a real question; skip the second tick entirely if your transport cannot honestly tell you the device has it.
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>Receipt — sending, sent, delivered</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 — 6s, so 1% is 60ms. In flight until 20% (1.2s), sent until
50%, delivered until the thread clears at 92%. */
--cycle: 6s;
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
--_muted: color-mix(in srgb, var(--slate) 54%, transparent);
--_in: color-mix(in srgb, var(--oat) 45%, var(--paper));
--_hand: calc(1.2s / var(--speed));
--_lag: calc(60ms / var(--speed));
}
* {
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(320px, 90vw);
background: var(--paper);
border: 1px solid var(--oat);
border-radius: calc(14px * var(--round));
overflow: hidden;
}
.head {
display: flex;
justify-content: space-between;
padding: 10px 14px;
font-size: 11.5px;
color: var(--_muted);
border-bottom: 1px solid var(--oat);
}
.head b {
color: var(--slate);
font-weight: 600;
}
.thread {
display: grid;
gap: 6px;
padding: clamp(12px, 4vw, 16px) 14px;
}
.in,
.out {
max-width: 80%;
padding: 7px 11px;
font-size: 13px;
line-height: 1.35;
border-radius: calc(14px * var(--round));
}
.in {
justify-self: start;
background: var(--_in);
}
.out {
justify-self: end;
margin-top: 4px;
color: var(--paper);
background: var(--clay-d);
transform-origin: 100% 100%;
animation: life var(--t) infinite;
}
@keyframes life {
0% {
opacity: 0;
transform: translateY(8px) scale(0.97);
animation-timing-function: var(--ease-out);
}
4%,
92% {
opacity: 1;
transform: none;
animation-timing-function: var(--ease-out);
}
95%,
100% {
opacity: 0;
transform: none;
}
}
.meta {
justify-self: end;
display: flex;
align-items: center;
gap: 5px;
height: 14px;
font-size: 11.5px;
color: var(--_muted);
animation: life var(--t) infinite backwards;
animation-delay: var(--_lag);
}
/* The mark trails the words, so every state ends flush against it
and the glyph never floats away from a short label. */
.glyph {
order: 2;
display: grid;
width: 17px;
height: 12px;
}
.glyph > svg {
grid-area: 1 / 1;
width: 17px;
height: 12px;
overflow: visible;
fill: none;
stroke: currentColor;
stroke-width: 1.5;
stroke-linecap: round;
stroke-linejoin: round;
}
/* In flight. A clock rather than a spinner: the message is waiting, not
working, and a spinner beside every unsent bubble in a thread turns
a slow network into a page full of motion. */
.clock {
animation: clock var(--t) infinite;
}
.clock .hand {
transform-box: view-box;
transform-origin: 11px 6px;
animation: hand var(--_hand) linear infinite;
}
@keyframes hand {
to {
transform: rotate(360deg);
}
}
@keyframes clock {
0%,
19.5% {
opacity: 1;
}
20.5%,
100% {
opacity: 0;
}
}
/* Sent: the server has it. One stroke, drawn in 180ms — the only beat in
the whole exchange the user caused, so it is the one that moves most. */
.t1 {
stroke-dasharray: 16;
stroke-dashoffset: 16;
animation: t1 var(--t) infinite;
}
@keyframes t1 {
0%,
20% {
stroke-dashoffset: 16;
animation-timing-function: var(--ease-out);
}
23%,
100% {
stroke-dashoffset: 0;
}
}
/* Delivered: the device has it. The second tick is not drawn, it slides
out from under the first — the same mark doubling, so "delivered"
reads as more of "sent" rather than a new icon replacing it. */
.t2 {
opacity: 0;
transform-box: view-box;
animation: t2 var(--t) infinite;
}
@keyframes t2 {
0%,
50% {
opacity: 0;
transform: translateX(-4px);
animation-timing-function: var(--ease-out);
}
54%,
100% {
opacity: 1;
transform: none;
}
}
.label {
display: grid;
justify-items: end;
}
.label > span {
grid-area: 1 / 1;
white-space: nowrap;
opacity: 0;
animation-duration: var(--t);
animation-iteration-count: infinite;
animation-timing-function: ease;
}
.l-sending {
animation-name: l-sending;
}
.l-sent {
animation-name: l-sent;
}
.l-delivered {
animation-name: l-delivered;
}
@keyframes l-sending {
0%,
19.5% {
opacity: 1;
}
20.5%,
100% {
opacity: 0;
}
}
@keyframes l-sent {
0%,
19.5% {
opacity: 0;
}
20.5%,
49.5% {
opacity: 1;
}
50.5%,
100% {
opacity: 0;
}
}
@keyframes l-delivered {
0%,
49.5% {
opacity: 0;
}
50.5%,
100% {
opacity: 1;
}
}
@media (prefers-reduced-motion: reduce) {
/* Nothing travels: the bubble fades in place, the tick fades instead
of drawing, the second tick appears where it lands, and the clock
hand holds still while the clock itself breathes. Every timeline
stretches by the same 1.5. */
.out,
.meta {
animation-name: life-still;
}
@keyframes life-still {
0% {
opacity: 0;
}
4%,
92% {
opacity: 1;
}
95%,
100% {
opacity: 0;
}
}
.clock .hand {
animation: none;
}
.clock {
animation-name: clock-still;
}
@keyframes clock-still {
0%,
19.5% {
opacity: 1;
}
10% {
opacity: 0.55;
}
20.5%,
100% {
opacity: 0;
}
}
.t1 {
stroke-dashoffset: 0;
animation-name: t1-still;
}
@keyframes t1-still {
0%,
20% {
opacity: 0;
}
23%,
100% {
opacity: 1;
}
}
.t2 {
animation-name: t2-still;
}
@keyframes t2-still {
0%,
50% {
opacity: 0;
}
54%,
100% {
opacity: 1;
}
}
.out,
.meta,
.clock,
.t1,
.t2,
.label > span {
animation-duration: calc(var(--t) * 1.5);
}
.meta {
animation-delay: calc(var(--_lag) * 1.5);
}
}
</style>
</head>
<body>
<div
class="card"
role="img"
aria-label="A sent message shows a small clock while it is in flight, then one tick draws as the server accepts it, then a second tick slides out from under the first when it reaches the other person's device"
>
<div class="head"><b>Maya Okafor</b><span>Direct message</span></div>
<div class="thread">
<div class="in">Is the build green?</div>
<div class="out">Green. Shipping now.</div>
<div class="meta">
<span class="glyph" aria-hidden="true">
<svg class="clock" viewBox="0 0 17 12">
<circle cx="11" cy="6" r="4.75" />
<path class="hand" d="M11 6 V3" />
</svg>
<svg viewBox="0 0 17 12">
<path class="t1" d="M1 6.5 L4.5 10 L11 2" />
<path class="t2" d="M8 9 L9 10 L15.5 2" />
</svg>
</span>
<span class="label">
<span class="l-sending">Sending</span>
<span class="l-sent">Sent</span>
<span class="l-delivered">Delivered</span>
</span>
</div>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.