Filling statement
A centred condensed statement whose words fill from faint orange to ink one after another, with a few words left orange and tilted pill notes popping onto it.
Part of the style
Tangerine Pill Parade
7 parts that belong together, with their tokens, type and rules.
https://kitbash.me/components/tangerine-pill-parade/statement/figma.html?palette=bb1d56ab5c0d2d8a
Use the Figma MCP server (https://mcp.figma.com/mcp). Download https://kitbash.me/components/tangerine-pill-parade/statement/figma.html?palette=bb1d56ab5c0d2d8a and pass that whole HTML document to the html_to_figma tool, so the part "Filling statement" lands as editable layers in my open Figma file. Fonts come from Google Fonts: if a face is missing in Figma, pick the closest one.
Code
<style>
/* Goes after the pack's base.css */
:root {
--blush: #f0eee9;
--cream: #ffffff;
--sand: #eeebe5;
--shell: #f7f6f3;
--ink: #0e0001;
--ink-soft: #59121b;
--white: #ffffff;
--orange: #a18b17;
--orange-deep: #907b10;
--orange-faint: rgba(161, 139, 23, 0.45);
}
</style>
<section class="statement">
<p class="statement__label">A word from the bench</p>
<div class="statement__body">
<p class="statement__text">We keep the workshop small on purpose. Two pairs of hands, one repair stand, and every bike gets <span class="statement__hot">the whole afternoon.</span> We fix what you already ride, or make it <span class="statement__hot">ride better.</span></p>
<span class="statement__pill" style="--x: 58%; --y: 6%; --tilt: 6deg; --order: 0">Two mechanics, no robots</span>
<span class="statement__pill" style="--x: 4%; --y: 46%; --tilt: -8deg; --order: 1">Coffee on the bench</span>
<span class="statement__pill" style="--x: 62%; --y: 70%; --tilt: -4deg; --order: 2">Allergic to upsells</span>
</div>
</section>
<style>
.statement {
overflow-x: clip;
padding: var(--section-space) var(--edge);
background: var(--cream);
text-align: center;
}
.statement__label {
margin: 0 0 var(--space-l);
color: var(--ink);
font-size: var(--text-xs);
font-weight: 500;
letter-spacing: 0.02em;
text-transform: uppercase;
}
.statement__body {
position: relative;
max-width: 17em;
margin: 0 auto;
font-size: var(--display-m);
}
.statement__text {
margin: 0;
color: var(--ink);
font-family: var(--font-display);
font-stretch: var(--display-width);
font-size: 1em;
font-weight: 700;
line-height: 1.08;
letter-spacing: -0.01em;
text-wrap: balance;
}
.statement__word {
color: var(--orange-faint);
transition: color 300ms var(--ease);
transition-delay: calc(var(--i, 0) * 45ms);
}
.statement.is-seen .statement__word { color: var(--ink); }
.statement.is-seen .statement__hot .statement__word { color: var(--orange); }
.statement__pill {
position: absolute;
left: var(--x);
top: var(--y);
padding: 7px 14px;
border-radius: var(--pill);
background: var(--orange);
color: var(--white);
font-family: var(--font-body);
font-size: clamp(11px, 1.1vw, 14px);
font-weight: 500;
white-space: nowrap;
rotate: var(--tilt);
scale: 0;
transition: scale 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
transition-delay: calc(1300ms + var(--order) * 160ms);
}
.statement.is-seen .statement__pill { scale: 1; }
@media (prefers-reduced-motion: reduce) {
.statement__word { color: var(--ink); transition: none; }
.statement__hot .statement__word { color: var(--orange); }
.statement__pill { scale: 1; transition: none; }
}
</style>
<script>
(() => {
const split = (node, counter) => {
for (const child of [...node.childNodes]) {
if (child.nodeType === Node.ELEMENT_NODE) {
split(child, counter);
continue;
}
if (child.nodeType !== Node.TEXT_NODE) continue;
const fragment = document.createDocumentFragment();
for (const part of child.textContent.split(/(\s+)/)) {
if (!part) continue;
if (/^\s+$/.test(part)) {
fragment.append(part);
continue;
}
const word = document.createElement('span');
word.className = 'statement__word';
word.style.setProperty('--i', counter.n++);
word.textContent = part;
fragment.append(word);
}
child.replaceWith(fragment);
}
};
const seen = new IntersectionObserver((entries) => {
for (const entry of entries) {
if (!entry.isIntersecting) continue;
entry.target.classList.add('is-seen');
seen.unobserve(entry.target);
}
}, { threshold: 0.2 });
for (const root of document.querySelectorAll('.statement')) {
split(root.querySelector('.statement__text'), { n: 0 });
seen.observe(root);
}
})();
</script>