Back to the library
Reply bubble pop
Variant: Ease-out
A comic-style speech bubble for a new reply. It grows out of the sender's avatar, and a halftone print shadow lands 40ms after it. Use it for incoming comments, mentions or chat previews, where the user needs to see who is speaking. The bubble scales from the tip of its tail rather than its centre, so the motion points back to the avatar. A strong ease-out puts nearly all of the 256ms entrance in the first few frames, which is when the user is looking.
speech-bubbleentrancenotificationhalftoneease-out
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>Reply bubble pop — ease-out</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; /* include ONLY if at least one border-radius is wrapped below */
--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
(#d97757 / #b85c3e / #788c5d / #b04a3f). */
--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 — every duration in the document runs off --t. */
--cycle: 3.2s; /* the authored master loop */
--t: calc(var(--cycle) / var(--speed));
--ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* include only if used */
--_yellow: oklch(calc(0.88 + var(--lift)) calc(0.17 * var(--chroma)) calc(var(--hue) + 57));
--_magenta: oklch(calc(0.6 + var(--lift)) calc(0.24 * var(--chroma)) calc(var(--hue) - 44));
--_cyan: oklch(calc(0.82 + var(--lift)) calc(0.11 * var(--chroma)) calc(var(--hue) + 171));
}
* { box-sizing: border-box; margin: 0; }
body {
min-height: 100vh;
display: grid;
place-items: center;
background: var(--ivory);
color: var(--slate);
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
padding: 16px;
}
.stage {
width: min(300px, 86vw);
display: grid;
gap: 26px;
}
/* Origin sits on the tail tip, so the bubble grows out of the avatar. */
.wrap {
position: relative;
transform-origin: 24px calc(100% + 16px);
animation: pop var(--t) infinite both;
}
.dots {
position: absolute;
inset: 0;
border-radius: calc(16px * var(--round));
background: radial-gradient(circle, var(--_magenta) 1.6px, transparent 2.1px) 0 0 / 6px 6px;
transform: translate(8px, 8px);
animation: print var(--t) calc(40ms / var(--speed)) infinite both;
}
.bubble {
position: relative;
background: var(--paper);
border: 3px solid var(--slate);
border-radius: calc(16px * var(--round));
padding: clamp(12px, 3.5vw, 16px) clamp(14px, 4vw, 18px);
}
.h {
font-weight: 900;
font-size: clamp(17px, 5.2vw, 21px);
line-height: 1.15;
letter-spacing: 0.02em;
text-transform: uppercase;
animation: line var(--t) calc(40ms / var(--speed)) infinite both;
}
.h span {
background: linear-gradient(transparent 58%, var(--_cyan) 58%);
padding: 0 3px;
}
.b {
margin-top: 6px;
font-weight: 600;
font-size: clamp(14px, 4.2vw, 16px);
line-height: 1.35;
animation: line var(--t) calc(80ms / var(--speed)) infinite both;
}
.tail {
position: absolute;
left: 18px;
bottom: -22px;
width: 22px;
height: 22px;
overflow: visible;
}
.tail-fill { fill: var(--paper); }
.tail-line { fill: none; stroke: var(--slate); stroke-width: 3; stroke-linejoin: miter; }
.who {
display: flex;
align-items: center;
gap: 10px;
padding-left: 2px;
}
.avatar {
width: 44px;
height: 44px;
flex: none;
border-radius: 50%;
background: var(--_yellow);
border: 3px solid var(--slate);
display: grid;
place-items: center;
font-weight: 900;
font-size: 15px;
}
.name { font-weight: 800; font-size: 14px; }
.when { font-size: 12px; opacity: 0.6; }
/* 8% of 3.2s = 256ms in; 5.5% = 176ms out — exit faster than enter. */
@keyframes pop {
0% { opacity: 0; transform: scale(0.9); animation-timing-function: var(--ease-out); }
8% { opacity: 1; transform: scale(1); }
82% { opacity: 1; transform: scale(1); animation-timing-function: var(--ease-out); }
87.5% { opacity: 0; transform: scale(0.97); }
100% { opacity: 0; transform: scale(0.97); }
}
@keyframes print {
0% { opacity: 0; transform: translate(4px, 4px); animation-timing-function: var(--ease-out); }
8% { opacity: 1; transform: translate(8px, 8px); }
82% { opacity: 1; transform: translate(8px, 8px); animation-timing-function: var(--ease-out); }
87.5% { opacity: 0; transform: translate(8px, 8px); }
100% { opacity: 0; transform: translate(8px, 8px); }
}
@keyframes line {
0% { opacity: 0; transform: translateY(4px); animation-timing-function: var(--ease-out); }
7% { opacity: 1; transform: translateY(0); }
82% { opacity: 1; transform: translateY(0); animation-timing-function: var(--ease-out); }
86% { opacity: 0; transform: translateY(0); }
100% { opacity: 0; transform: translateY(0); }
}
@keyframes pop-rm {
0%, 100% { opacity: 0.35; }
40%, 80% { opacity: 1; }
}
@media (max-width: 380px) {
.stage { width: min(280px, 88vw); gap: 24px; }
.bubble { padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) {
.wrap { animation: pop-rm calc(var(--t) * 2) ease infinite both; }
.dots { animation: none; opacity: 1; transform: translate(8px, 8px); }
.h, .b { animation: none; }
}
</style>
</head>
<body>
<div class="stage" role="status" aria-live="polite">
<div class="wrap">
<div class="dots" aria-hidden="true"></div>
<div class="bubble">
<p class="h"><span>New reply!</span></p>
<p class="b">Love the new layout — ship it.</p>
<svg class="tail" viewBox="0 0 22 22" aria-hidden="true"><path class="tail-fill" d="M3.5 0V19L20 0Z"/><path class="tail-line" d="M3.5 1V19L20 1"/></svg>
</div>
</div>
<div class="who">
<div class="avatar" aria-hidden="true">AL</div>
<div>
<p class="name">Ada Lowe</p>
<p class="when">just now</p>
</div>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.