Marquee Statement Band 1
Marquee statement band: two giant tilted type bands loop one short phrase each (outlined, moving left; solid, moving right and filling with the accent as it crosses the centre) around one static line that lands the point, so the idea reads with or without motion.
Use it in a prompt
Use content/marquee-statement-band from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/content/marquee-statement-band.tsx. - Import it and pass your copy and images (Props tab):
import { MarqueeStatementBand } from "@/components/funneldna/content/marquee-statement-band"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/marquee-statement-band/component.tsx 455 lines
// layout: ledger-receipt
// Marquee statement band: two giant tilted type bands loop one short phrase each (outlined, moving left; solid, moving right and filling with the accent as it crosses the centre) around one static line that lands the point, so the idea reads with or without motion.
// Adapted ledger-receipt: the static line is the ledger's bold total, the bottom line set between two hairline leaders.
import * as React from "react";
import { Pause, Play } from "lucide-react";
import type { LucideIcon } from "lucide-react";
import { Divider, FX_HOST, Pattern } from "../fx/fx";
import torn from "../fx/dividers/torn";
type EdgeTone = React.ComponentProps<typeof Divider>["tone"];
export type MarqueeStatementBandProps = {
/** Short phrase looped in the top, outlined band (moves left). */
topPhrase?: string;
/** Short phrase looped in the bottom, solid band (moves right; fills with the accent at the centre). */
bottomPhrase?: string;
/** Optional bold lead-in at the start of the static line. */
statementLead?: React.ReactNode;
/** The static line that states the point in normal type. */
statement?: React.ReactNode;
/** Separator between repeats: a lucide icon; a dot when omitted. */
icon?: LucideIcon;
/** "band" = dark stage (default), "surface" = light page band. */
tone?: "band" | "surface";
/** Torn paper edge into the next section (defaults on for the dark stage). */
edge?: boolean;
/** Token of the section below, used by the torn edge. */
edgeTone?: EdgeTone;
/** Accessible label of the pause control while moving. */
pauseLabel?: string;
/** Accessible label of the pause control while paused. */
playLabel?: string;
/** Forces the pause control's hover or pressed look (studio states). */
state?: "default" | "hover" | "active";
className?: string;
};
const SPEED = 0.085; // phrase units per second at rest
export function MarqueeStatementBand({
topPhrase = "Do less.",
bottomPhrase = "Get more.",
statementLead,
statement = "Put your hours into the few moves that pay, and let the rest go.",
icon,
tone = "band",
edge,
edgeTone = "surface" as EdgeTone,
pauseLabel = "Pause the moving headline",
playLabel = "Play the moving headline",
state = "default",
className,
}: MarqueeStatementBandProps) {
const rootRef = React.useRef<HTMLElement>(null);
const topRef = React.useRef<HTMLDivElement>(null);
const bottomRef = React.useRef<HTMLDivElement>(null);
const passRef = React.useRef<HTMLDivElement>(null);
const pos = React.useRef({ top: 0, bottom: 0 });
const [paused, setPaused] = React.useState(false);
const [motionOk, setMotionOk] = React.useState(false);
React.useEffect(() => {
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
const sync = () => setMotionOk(!mq.matches);
sync();
mq.addEventListener("change", sync);
return () => mq.removeEventListener("change", sync);
}, []);
React.useEffect(() => {
const apply = () => {
const { top, bottom } = pos.current;
if (topRef.current) topRef.current.style.transform = `translate3d(calc(-50% + ${top}px), 0, 0)`;
const b = `translate3d(calc(-50% + ${bottom}px), 0, 0)`;
if (bottomRef.current) bottomRef.current.style.transform = b;
if (passRef.current) passRef.current.style.transform = b;
};
if (!motionOk) {
pos.current = { top: 0, bottom: 0 };
apply();
return;
}
const root = rootRef.current;
if (!root || paused) return;
const w = { top: 0, bottom: 0 };
const measure = () => {
w.top = topRef.current ? topRef.current.offsetWidth / copiesFor(topPhrase) : 0;
w.bottom = bottomRef.current ? bottomRef.current.offsetWidth / copiesFor(bottomPhrase) : 0;
const p = pos.current;
if (w.top > 0) p.top = -(-p.top % w.top);
if (w.bottom > 0) p.bottom = p.bottom % w.bottom;
};
measure();
let raf = 0;
let last = 0;
let lastY = window.scrollY;
let vel = 0;
const tick = (now: number) => {
const dt = last ? Math.min(now - last, 64) / 1000 : 0;
last = now;
const y = window.scrollY;
if (dt > 0) vel += ((y - lastY) / dt - vel) * 0.12;
lastY = y;
const boost = 1 + Math.min(Math.abs(vel) / 700, 3.5);
const p = pos.current;
if (w.top > 0) {
p.top -= w.top * SPEED * boost * dt;
if (p.top <= -w.top) p.top += w.top;
}
if (w.bottom > 0) {
p.bottom += w.bottom * SPEED * boost * dt;
if (p.bottom >= w.bottom) p.bottom -= w.bottom;
}
apply();
raf = requestAnimationFrame(tick);
};
const start = () => {
if (raf) return;
last = 0;
lastY = window.scrollY;
vel = 0;
raf = requestAnimationFrame(tick);
};
const stop = () => {
if (!raf) return;
cancelAnimationFrame(raf);
raf = 0;
};
const ro = typeof ResizeObserver !== "undefined" ? new ResizeObserver(measure) : null;
[topRef.current, bottomRef.current].forEach((el) => el && ro?.observe(el));
let io: IntersectionObserver | null = null;
if (typeof IntersectionObserver !== "undefined") {
io = new IntersectionObserver(
(entries) => {
const entry = entries[0];
if (entry && entry.isIntersecting) start();
else stop();
},
{ rootMargin: "120px 0px" }
);
io.observe(root);
} else {
start();
}
return () => {
stop();
io?.disconnect();
ro?.disconnect();
};
}, [motionOk, paused, topPhrase, bottomPhrase]);
const hasBands = Boolean(topPhrase || bottomPhrase);
if (!hasBands && !statement) return null;
const showEdge = edge ?? tone === "band";
const spoken = [topPhrase, bottomPhrase].filter(Boolean).join(" ");
return (
<section
ref={rootRef}
className={["cf-marquee-statement-band", className].filter(Boolean).join(" ")}
data-tone={tone}
data-edge={showEdge ? "true" : "false"}
data-state={state}
style={FX_HOST}
>
<style>{CSS}</style>
<div className="msb-pattern" aria-hidden="true">
<Pattern name="rings" fade="corner" />
</div>
{spoken ? <h2 className="msb-sr">{spoken}</h2> : null}
<div className="msb-stage">
{topPhrase ? (
<div className="msb-strip msb-strip--top" aria-hidden="true">
<Track phrase={topPhrase} copies={copiesFor(topPhrase)} icon={icon} trackRef={topRef} />
</div>
) : null}
{statement ? (
<div className="msb-line">
<span className="msb-rule" aria-hidden="true" />
<p className="msb-statement">
{statementLead ? (
<>
<strong>{statementLead}</strong>{" "}
</>
) : null}
{statement}
</p>
<span className="msb-rule" aria-hidden="true" />
</div>
) : null}
{bottomPhrase ? (
<div className="msb-strip msb-strip--bottom" aria-hidden="true">
<Track phrase={bottomPhrase} copies={copiesFor(bottomPhrase)} icon={icon} trackRef={bottomRef} />
<div className="msb-pass">
<Track phrase={bottomPhrase} copies={copiesFor(bottomPhrase)} icon={icon} trackRef={passRef} />
</div>
</div>
) : null}
</div>
{hasBands ? (
<button
type="button"
className="msb-pause"
hidden={!motionOk}
aria-label={paused ? playLabel : pauseLabel}
onClick={() => setPaused((p) => !p)}
>
{paused ? <Play size={18} strokeWidth={2.5} aria-hidden="true" /> : <Pause size={18} strokeWidth={2.5} aria-hidden="true" />}
</button>
) : null}
{showEdge ? (
<div className="msb-edge" aria-hidden="true">
<Divider shape="torn" src={torn} tone={edgeTone} height={56} />
</div>
) : null}
</section>
);
}
export default MarqueeStatementBand;
// Odd counts keep the middle repeat exactly centred for the still composition.
function copiesFor(phrase: string) {
return phrase.length < 8 ? 15 : 11;
}
function Track({
phrase,
copies,
icon: Icon,
trackRef,
}: {
phrase: string;
copies: number;
icon?: LucideIcon;
trackRef: React.Ref<HTMLDivElement>;
}) {
return (
<div className="msb-track" ref={trackRef}>
{Array.from({ length: copies }, (_, i) => (
<span className="msb-unit" key={i}>
{phrase}
<span className="msb-sep">
{Icon ? <Icon strokeWidth={2.5} aria-hidden="true" /> : <span className="msb-dot" />}
</span>
</span>
))}
</div>
);
}
// Mask gradients use black/transparent as alpha only (not theme colours).
const CSS = `
.cf-marquee-statement-band {
--msb-bg: var(--band, oklch(0.27 0.067 256));
--msb-ink: var(--band-ink, oklch(1 0 0));
--msb-pass: color-mix(in oklab, var(--accent-fill, var(--accent, oklch(0.5 0.17 257))) 62%, var(--msb-ink));
--msb-size: clamp(3.5rem, 2rem + 8vw, 10rem);
--msb-stroke: clamp(1.25px, 0.15vw, 2.5px);
--msb-edge: 56px;
--msb-gutter: clamp(16px, 5vw, 48px);
--msb-strip-pad: clamp(10px, 1.3vw, 20px);
--msb-tint-top: oklch(from var(--msb-ink) l c h / 0.05);
--msb-tint-bottom: oklch(from var(--msb-ink) l c h / 0.08);
position: relative;
overflow: hidden;
overflow: clip;
background: var(--msb-bg);
color: var(--msb-ink);
font-family: var(--font-body, system-ui, sans-serif);
padding: clamp(56px, 8vw, 112px) 0 calc(clamp(64px, 8.5vw, 120px) + var(--msb-edge));
}
.cf-marquee-statement-band[data-tone="surface"] {
--msb-bg: var(--surface, oklch(0.985 0.003 260));
--msb-ink: var(--ink, oklch(0.21 0.034 263));
--msb-pass: var(--accent, oklch(0.5 0.17 257));
--msb-tint-top: oklch(from var(--msb-ink) l c h / 0.04);
--msb-tint-bottom: oklch(from var(--msb-ink) l c h / 0.06);
}
.cf-marquee-statement-band[data-edge="false"] { --msb-edge: 0px; }
.cf-marquee-statement-band .msb-sr {
position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cf-marquee-statement-band .msb-pattern {
position: absolute; top: 0; right: 0; z-index: 0;
width: min(64%, 760px); height: 78%;
color: var(--msb-ink); pointer-events: none;
}
.cf-marquee-statement-band .msb-stage { position: relative; z-index: 1; }
.cf-marquee-statement-band .msb-strip {
position: relative;
width: 112%;
margin-left: -6%;
padding-block: var(--msb-strip-pad);
overflow: hidden;
background: var(--msb-strip-bg);
transform: rotate(var(--msb-tilt));
}
.cf-marquee-statement-band .msb-strip--top { --msb-tilt: -2.5deg; --msb-strip-bg: var(--msb-tint-top); }
.cf-marquee-statement-band .msb-strip--bottom { --msb-tilt: 2.5deg; --msb-strip-bg: var(--msb-tint-bottom); }
.cf-marquee-statement-band .msb-strip + .msb-strip { margin-top: clamp(32px, 4vw, 56px); }
.cf-marquee-statement-band .msb-track {
position: relative;
left: 50%;
display: flex;
width: max-content;
transform: translate3d(-50%, 0, 0);
will-change: transform;
backface-visibility: hidden;
}
.cf-marquee-statement-band .msb-unit {
position: relative;
flex: none;
padding-inline: 0.45em;
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
font-size: var(--msb-size);
font-weight: var(--display-weight, 800);
line-height: 1.02;
letter-spacing: var(--display-tracking, -0.025em);
text-transform: var(--display-case, none);
white-space: nowrap;
}
.cf-marquee-statement-band .msb-sep {
position: absolute; top: 52%; right: 0;
display: inline-flex;
transform: translate(50%, -50%);
color: var(--msb-ink);
}
.cf-marquee-statement-band .msb-sep svg { display: block; width: 0.4em; height: 0.4em; }
.cf-marquee-statement-band .msb-dot {
display: block; width: 0.16em; height: 0.16em; border-radius: 999px;
background: var(--accent-fill, var(--accent, oklch(0.5 0.17 257)));
}
.cf-marquee-statement-band .msb-strip--top .msb-unit {
color: transparent;
-webkit-text-stroke: var(--msb-stroke) var(--msb-ink);
}
@supports not (-webkit-text-stroke: 1px currentColor) {
.cf-marquee-statement-band .msb-strip--top .msb-unit { color: var(--msb-ink); }
}
.cf-marquee-statement-band .msb-strip--bottom .msb-unit { color: var(--msb-ink); }
.cf-marquee-statement-band .msb-pass {
position: absolute; inset: 0;
padding-block: var(--msb-strip-pad);
pointer-events: none;
-webkit-mask-image: linear-gradient(90deg, transparent 22%, black 40%, black 60%, transparent 78%);
mask-image: linear-gradient(90deg, transparent 22%, black 40%, black 60%, transparent 78%);
}
.cf-marquee-statement-band .msb-pass .msb-unit,
.cf-marquee-statement-band .msb-pass .msb-sep { color: var(--msb-pass); }
.cf-marquee-statement-band .msb-line {
display: grid;
grid-template-columns: minmax(24px, 1fr) minmax(0, 44rem) minmax(24px, 1fr);
align-items: center;
gap: clamp(16px, 2.5vw, 32px);
max-width: 1120px;
margin: clamp(40px, 5.5vw, 72px) auto;
padding-inline: var(--msb-gutter);
}
.cf-marquee-statement-band .msb-rule { height: 1px; background: oklch(from var(--msb-ink) l c h / 0.3); }
.cf-marquee-statement-band .msb-statement {
margin: 0;
text-align: center;
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.35;
font-weight: 500;
text-wrap: balance;
}
.cf-marquee-statement-band .msb-statement strong { font-weight: 800; }
.cf-marquee-statement-band .msb-pause {
position: absolute;
left: var(--msb-gutter);
bottom: calc(var(--msb-edge) + 16px);
z-index: 3;
display: inline-flex; align-items: center; justify-content: center;
width: 44px; height: 44px; padding: 0;
border-radius: 999px;
border: 1px solid oklch(from var(--msb-ink) l c h / 0.28);
background: oklch(from var(--msb-ink) l c h / 0.1);
color: var(--msb-ink);
cursor: pointer;
transition: background .16s ease, transform .16s ease, border-color .16s ease;
}
.cf-marquee-statement-band .msb-pause[hidden] { display: none; }
.cf-marquee-statement-band .msb-pause:hover,
.cf-marquee-statement-band[data-state="hover"] .msb-pause {
background: oklch(from var(--msb-ink) l c h / 0.18);
border-color: oklch(from var(--msb-ink) l c h / 0.42);
}
.cf-marquee-statement-band .msb-pause:active,
.cf-marquee-statement-band[data-state="active"] .msb-pause {
background: oklch(from var(--msb-ink) l c h / 0.24);
transform: scale(0.95);
}
.cf-marquee-statement-band .msb-pause:focus-visible {
outline: 3px solid var(--msb-ink);
outline-offset: 3px;
}
.cf-marquee-statement-band .msb-edge {
position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
height: var(--msb-edge); line-height: 0; pointer-events: none;
}
@keyframes msb-rise {
from { opacity: .82; transform: translateY(8px); }
to { opacity: 1; transform: none; }
}
@supports (animation-timeline: view()) {
@media (prefers-reduced-motion: no-preference) {
.cf-marquee-statement-band .msb-line {
animation: msb-rise linear both;
animation-timeline: view();
animation-range: entry 0% entry 60%;
}
}
}
@media (max-width: 720px) {
.cf-marquee-statement-band .msb-line { grid-template-columns: minmax(0, 1fr); }
.cf-marquee-statement-band .msb-rule { display: none; }
.cf-marquee-statement-band .msb-pattern { width: 92%; height: 55%; }
.cf-marquee-statement-band .msb-pass {
-webkit-mask-image: linear-gradient(90deg, transparent 10%, black 36%, black 64%, transparent 90%);
mask-image: linear-gradient(90deg, transparent 10%, black 36%, black 64%, transparent 90%);
}
}
@media (prefers-reduced-motion: reduce) {
.cf-marquee-statement-band .msb-track { will-change: auto; transform: translate3d(-50%, 0, 0); }
.cf-marquee-statement-band .msb-pause { display: none; }
}
`;
pieces/content/marquee-statement-band/specimen.tsx 22 lines
// Specimen: the fictional Sourdough at Scale masterclass as a dark marquee statement band.
import { Wheat } from "lucide-react";
import { MarqueeStatementBand } from "../marquee-statement-band";
export const states = ["default", "hover", "active"];
export default function MarqueeStatementBandSpecimen({
state = "default",
}: {
state?: "default" | "hover" | "active";
}) {
return (
<MarqueeStatementBand
state={state}
topPhrase="Bake less."
bottomPhrase="Sell more."
icon={Wheat}
statementLead="The bottom line:"
statement="Sourdough at Scale shows you how to plan a smaller bake schedule around a bigger, pre-sold order book."
/>
);
}
| Name | Type | Details |
|---|---|---|
topPhrase OptionalMarqueeStatementBand |
string |
Default "Do less."
|
bottomPhrase OptionalMarqueeStatementBand |
string |
Default "Get more."
|
statementLead OptionalMarqueeStatementBand |
React.ReactNode |
|
statement OptionalMarqueeStatementBand |
React.ReactNode |
Default "Put your hours into the few moves that pay, and let the rest go."
|
icon OptionalMarqueeStatementBand |
LucideIcon |
|
tone OptionalMarqueeStatementBand |
"band" | "surface" |
Default "band"
|
edge OptionalMarqueeStatementBand |
boolean |
|
edgeTone OptionalMarqueeStatementBand |
EdgeTone |
Default "surface" as EdgeTone
|
pauseLabel OptionalMarqueeStatementBand |
string |
Default "Pause the moving headline"
|
playLabel OptionalMarqueeStatementBand |
string |
Default "Play the moving headline"
|
state OptionalMarqueeStatementBand |
"default" | "hover" | "active" |
Default "default"
|
className OptionalMarqueeStatementBand |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
9a2ebdab5ff4fcc4.webp
image/webp · 3.64 KB