Live Grid Hero 1
Live-grid hero: one big promise and a two-line action over a framed "Fig. 1" of work flowing through four stages,
Use it in a prompt
Use hero/live-grid-hero 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/hero/live-grid-hero.tsx. - Import it and pass your copy and images (Props tab):
import { LiveGridHero } from "@/components/funneldna/hero/live-grid-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/live-grid-hero/component.tsx 528 lines
// layout: magazine-spread
// Live-grid hero: one big promise and a two-line action over a framed "Fig. 1" of work flowing through four stages,
// so capacity and momentum read at a glance without a single claim. The figure is always labelled illustrative.
import * as React from "react";
import { Pause, Play, ShieldCheck } from "lucide-react";
import { Pattern, FX_HOST } from "../fx/fx";
export type LiveGridCounter = {
value: string; // the supplied number, shown exactly as written ("1,864")
label: string;
};
export type LiveGridHeroCopy = {
live: string;
paused: string;
still: string; // status shown when the visitor prefers reduced motion
pause: string; // accessible label of the pause control
play: string;
illustrative: string;
figureAlt: string; // "{count}" and "{stages}" are replaced
};
export type LiveGridHeroProps = {
headline?: string;
highlight?: string; // phrase inside the headline that gets the marker stroke
lead?: string;
pullLine?: string; // large editorial line in the second column; empty (with no aside) hides the column
aside?: string; // italic aside in the founder's voice
asideBy?: string;
primaryLabel?: string;
primarySublabel?: string; // short benefit line inside the main button
href?: string;
onAction?: () => void;
secondaryLabel?: string; // empty hides the second button
secondaryHref?: string;
onSecondaryAction?: () => void;
note?: string; // one reassurance line under the buttons
figureNumber?: string;
figureLabel?: string;
stages?: string[]; // four labels in order: waiting, in progress, done, shipped
counters?: LiveGridCounter[]; // supplied figures only; empty hides them
columns?: number;
rows?: number;
phoneRows?: number; // rows shown at 12 columns on phones
copy?: Partial<LiveGridHeroCopy>;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_STAGES = ["Waiting", "In progress", "Done", "Shipped"];
const DEFAULT_COPY: LiveGridHeroCopy = {
live: "Live view",
paused: "Paused",
still: "Still view",
pause: "Pause the figure",
play: "Play the figure",
illustrative: "Illustrative",
figureAlt: "Illustrative figure: {count} jobs moving through four stages, {stages}.",
};
// Chance a picked cell moves on to its next stage; keeps most work waiting and a steady trickle shipping.
const ADVANCE = [0.16, 0.5, 1, 1];
export function LiveGridHero(props: LiveGridHeroProps) {
const {
headline = "Watch every job move from queue to shipped",
highlight = "queue to shipped",
lead = "See what's waiting, what's in progress and what's already out the door, in one live view.",
pullLine = "",
aside = "",
asideBy = "",
primaryLabel = "Book a walkthrough",
primarySublabel = "See your setup in one call",
href,
onAction,
secondaryLabel = "See how it works",
secondaryHref,
onSecondaryAction,
note = "",
figureNumber = "Fig. 1",
figureLabel = "A working day, from first order to shipped",
stages = DEFAULT_STAGES,
counters = [],
columns = 28,
rows = 8,
phoneRows = 12,
state = "default",
className,
} = props;
const copy: LiveGridHeroCopy = { ...DEFAULT_COPY, ...props.copy };
const stageLabels = [0, 1, 2, 3].map((i) => stages[i] ?? DEFAULT_STAGES[i]);
const total = Math.max(1, Math.round(columns) * Math.round(rows));
const phoneCap = 12 * Math.max(1, Math.round(phoneRows));
const disabled = state === "disabled";
const hasPull = Boolean(pullLine || aside);
const [cells, setCells] = React.useState<number[]>(() => seedCells(total));
const [reduced, setReduced] = React.useState(false);
const [userPaused, setUserPaused] = React.useState(false);
const [hovered, setHovered] = React.useState(false);
const [inView, setInView] = React.useState(true);
const figRef = React.useRef<HTMLElement>(null);
React.useEffect(() => {
setCells((prev) => (prev.length === total ? prev : seedCells(total)));
}, [total]);
React.useEffect(() => {
if (typeof window === "undefined" || !window.matchMedia) return;
const mq = window.matchMedia("(prefers-reduced-motion: reduce)");
const sync = () => setReduced(mq.matches);
sync();
mq.addEventListener?.("change", sync);
return () => mq.removeEventListener?.("change", sync);
}, []);
React.useEffect(() => {
const el = figRef.current;
if (!el || typeof IntersectionObserver === "undefined") return;
const io = new IntersectionObserver(([entry]) => setInView(entry.isIntersecting), { threshold: 0.05 });
io.observe(el);
return () => io.disconnect();
}, []);
const running = !reduced && !userPaused && !hovered && state !== "hover" && inView;
React.useEffect(() => {
if (!running) return;
const picks = Math.max(6, Math.round(total * 0.05));
const id = window.setInterval(() => {
setCells((prev) => {
const next = prev.length === total ? prev.slice() : seedCells(total);
for (let k = 0; k < picks; k++) {
const i = Math.floor(Math.random() * total);
if (Math.random() < ADVANCE[next[i]]) next[i] = (next[i] + 1) % 4;
}
return next;
});
}, 1100);
return () => window.clearInterval(id);
}, [running, total]);
const shown = cells.length === total ? cells : seedCells(total);
const status = reduced ? copy.still : running ? copy.live : copy.paused;
const figureAlt = copy.figureAlt.replace("{count}", String(total)).replace("{stages}", stageLabels.join(", "));
return (
<section
className={["cf-live-grid-hero", className].filter(Boolean).join(" ")}
data-state={state}
style={FX_HOST}
>
<Pattern name="grid" fade="edges" />
<style>{CSS}</style>
<div className="lgh-inner">
<div className="lgh-head lgh-rise">
<h1 className="lgh-h1">{withMarker(headline, highlight)}</h1>
</div>
<div className={"lgh-deck lgh-rise" + (hasPull ? "" : " is-single")}>
<div className="lgh-copy">
{lead ? <p className="lgh-lead">{lead}</p> : null}
<div className="lgh-actions">
<Action variant="primary" href={href} onAction={onAction} disabled={disabled}>
<span className="lgh-btn-label">{primaryLabel}</span>
{primarySublabel ? <span className="lgh-btn-sub">{primarySublabel}</span> : null}
</Action>
{secondaryLabel ? (
<Action
variant="secondary"
href={secondaryHref}
onAction={onSecondaryAction}
disabled={disabled}
>
<span className="lgh-btn-label">{secondaryLabel}</span>
</Action>
) : null}
</div>
{note ? (
<p className="lgh-note">
<ShieldCheck className="lgh-note-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{note}
</p>
) : null}
</div>
{hasPull ? (
<div className="lgh-pullcol">
{pullLine ? <p className="lgh-pull">{pullLine}</p> : null}
{aside ? (
<p className="lgh-aside">
{aside}
{asideBy ? <span className="lgh-by">{asideBy}</span> : null}
</p>
) : null}
</div>
) : null}
</div>
<figure
ref={figRef}
className="lgh-fig lgh-rise"
onPointerEnter={(e) => {
if (e.pointerType === "mouse") setHovered(true);
}}
onPointerLeave={() => setHovered(false)}
>
<div className="lgh-fig-head">
<figcaption className="lgh-cap">
{figureNumber ? <strong>{figureNumber}</strong> : null}
{figureLabel ? <span>{figureLabel}</span> : null}
<span className="lgh-chip">{copy.illustrative}</span>
</figcaption>
<div className="lgh-status">
<span className="lgh-live" data-on={running ? "true" : "false"}>
<span className="lgh-live-dot" aria-hidden="true" />
{status}
</span>
{!reduced ? (
<button
type="button"
className="lgh-pause"
aria-label={userPaused ? copy.play : copy.pause}
onClick={() => setUserPaused((p) => !p)}
>
{userPaused ? (
<Play size={18} strokeWidth={2.5} aria-hidden="true" />
) : (
<Pause size={18} strokeWidth={2.5} aria-hidden="true" />
)}
</button>
) : null}
</div>
</div>
<div
className="lgh-grid"
role="img"
aria-label={figureAlt}
style={{ ["--lgh-cols" as string]: Math.round(columns) } as React.CSSProperties}
>
{shown.map((s, i) => (
<span key={i} className={"lgh-cell" + (i >= phoneCap ? " is-wide" : "")} data-s={s}>
<span className="lgh-sq" />
</span>
))}
</div>
<div className="lgh-foot">
<ul className="lgh-legend">
{stageLabels.map((label, i) => (
<li key={i}>
<span className="lgh-sq lgh-sq--key" data-s={i} aria-hidden="true" />
{label}
</li>
))}
</ul>
{counters.length > 0 ? (
<dl className="lgh-counters">
{counters.map((c, i) => (
<div className="lgh-counter" key={i}>
<dt>{c.label}</dt>
<dd>{c.value}</dd>
</div>
))}
</dl>
) : null}
</div>
</figure>
</div>
</section>
);
}
export default LiveGridHero;
// Primary reads the --button-* roles, secondary the --button-2-* roles (see .lgh-btn--primary / --secondary).
function Action({
variant,
href,
onAction,
disabled,
children,
}: {
variant: "primary" | "secondary";
href?: string;
onAction?: () => void;
disabled?: boolean;
children: React.ReactNode;
}) {
const click = onAction ? () => onAction() : undefined;
if (href && !disabled) {
return variant === "primary" ? (
<a className="lgh-btn lgh-btn--primary" href={href} onClick={click}>
{children}
</a>
) : (
<a className="lgh-btn lgh-btn--secondary" href={href} onClick={click}>
{children}
</a>
);
}
return variant === "primary" ? (
<button type="button" className="lgh-btn lgh-btn--primary" onClick={click} disabled={disabled}>
{children}
</button>
) : (
<button type="button" className="lgh-btn lgh-btn--secondary" onClick={click} disabled={disabled}>
{children}
</button>
);
}
function withMarker(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text;
const at = text.toLowerCase().indexOf(phrase.toLowerCase());
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="lgh-mark">{text.slice(at, at + phrase.length)}</span>
{text.slice(at + phrase.length)}
</>
);
}
function mulberry32(seed: number) {
let a = seed;
return function () {
a |= 0;
a = (a + 0x6d2b79f5) | 0;
let t = Math.imul(a ^ (a >>> 15), 1 | a);
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
};
}
// The same distribution on every first render: the figure reads complete before anything moves.
function seedCells(total: number): number[] {
const rand = mulberry32(20271122);
const out: number[] = [];
for (let i = 0; i < total; i++) {
const x = rand();
out.push(x < 0.58 ? 0 : x < 0.78 ? 1 : x < 0.88 ? 2 : 3);
}
return out;
}
const CSS = `
.cf-live-grid-hero{
--lgh-sh:var(--shadow, oklch(0.22 0.03 260));
--lgh-s0:oklch(from var(--ink) l c h / .16);
--lgh-s1:var(--accent-fill, var(--accent));
--lgh-s2:oklch(from var(--accent-fill, var(--accent)) l c h / .4);
--lgh-s3:var(--success);
--lgh-marker:color-mix(in oklch, var(--marker, #fae37c) 62%, transparent);
position:relative;isolation:isolate;overflow:hidden;
background:var(--surface);color:var(--ink);font-family:var(--font-body);
padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);
}
.cf-live-grid-hero *,.cf-live-grid-hero *::before,.cf-live-grid-hero *::after{box-sizing:border-box}
.cf-live-grid-hero .lgh-inner{position:relative;z-index:1;max-width:1120px;margin:0 auto}
.cf-live-grid-hero .lgh-head{max-width:62rem}
.cf-live-grid-hero .lgh-h1{
margin:0;color:var(--ink);font-family:var(--font-display);
font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);
text-transform:var(--display-case,none);font-size:clamp(2.5rem,5.4vw,4.875rem);line-height:1.04;
text-wrap:balance;
}
.cf-live-grid-hero .lgh-mark{
background:linear-gradient(to bottom,transparent 48%,var(--lgh-marker) 48%,var(--lgh-marker) 94%,transparent 94%);
-webkit-box-decoration-break:clone;box-decoration-break:clone;
padding:0 .06em;margin:0 -.03em;border-radius:.08em .16em .1em .14em;
}
.cf-live-grid-hero .lgh-deck{
display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:clamp(32px,5vw,72px);
align-items:start;margin-top:clamp(16px,1.8vw,24px);
}
.cf-live-grid-hero .lgh-deck.is-single{grid-template-columns:minmax(0,46rem)}
.cf-live-grid-hero .lgh-copy{min-width:0}
.cf-live-grid-hero .lgh-lead{
margin:0 0 clamp(24px,2.4vw,32px);max-width:60ch;color:var(--muted);
font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;
}
.cf-live-grid-hero .lgh-actions{display:inline-grid;grid-template-columns:minmax(0,1fr);gap:12px;max-width:100%}
.cf-live-grid-hero .lgh-btn{
display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;
min-height:64px;padding:10px 28px;border:0;text-align:center;text-decoration:none;cursor:pointer;
border-radius:var(--button-radius,var(--radius,12px));
font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);
text-transform:var(--button-case,none);-webkit-tap-highlight-color:transparent;
transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.cf-live-grid-hero .lgh-btn-label{font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-wrap:balance}
.cf-live-grid-hero .lgh-btn-sub{
font-family:var(--font-body);font-size:.9375rem;line-height:1.3;font-weight:600;
text-transform:none;letter-spacing:0;text-wrap:pretty;
}
.cf-live-grid-hero .lgh-btn--primary{
color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);
background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));
box-shadow:var(--button-shadow,
inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),
inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),
0 1px 2px oklch(from var(--lgh-sh) l c h / .3),
0 8px 16px -6px oklch(from var(--lgh-sh) l c h / .4));
}
.cf-live-grid-hero .lgh-btn--primary:hover,
.cf-live-grid-hero[data-state="hover"] .lgh-btn--primary{
background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));
box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .1) c h / .7),
inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),
0 1px 2px oklch(from var(--lgh-sh) l c h / .34),
0 12px 20px -8px oklch(from var(--lgh-sh) l c h / .48);
}
.cf-live-grid-hero .lgh-btn--primary:active,
.cf-live-grid-hero[data-state="active"] .lgh-btn--primary{
transform:translateY(1px);
background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .08) c h));
box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - .22) c h / .5),
inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .18) c h),
0 1px 2px oklch(from var(--lgh-sh) l c h / .3);
}
.cf-live-grid-hero .lgh-btn--secondary{
min-height:56px;
color:var(--button-2-ink,var(--secondary-ink));background:var(--button-2-bg,var(--secondary));
border:1px solid var(--button-2-border,transparent);box-shadow:var(--button-2-shadow,var(--shadow-sm));
}
.cf-live-grid-hero .lgh-btn--secondary:hover,
.cf-live-grid-hero[data-state="hover"] .lgh-btn--secondary{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
.cf-live-grid-hero .lgh-btn--secondary:active,
.cf-live-grid-hero[data-state="active"] .lgh-btn--secondary{transform:translateY(1px);background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .07) c h)}
.cf-live-grid-hero .lgh-btn:focus-visible,.cf-live-grid-hero .lgh-pause:focus-visible{
outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:3px;
}
.cf-live-grid-hero .lgh-btn:disabled,
.cf-live-grid-hero .lgh-btn:disabled:hover{
cursor:not-allowed;transform:none;text-shadow:none;
background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:none;
}
.cf-live-grid-hero .lgh-note{margin:16px 0 0;color:var(--muted);font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-live-grid-hero .lgh-note-ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;color:var(--success)}
.cf-live-grid-hero .lgh-pullcol{min-width:0;padding-top:2px}
.cf-live-grid-hero .lgh-pull{
margin:0;color:var(--ink);font-family:var(--font-display);font-weight:var(--display-weight,800);
font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.22;letter-spacing:-0.01em;text-wrap:balance;
}
.cf-live-grid-hero .lgh-aside{
margin:12px 0 0;color:var(--muted);font-style:italic;
font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;text-wrap:pretty;
}
.cf-live-grid-hero .lgh-by{display:block;margin-top:8px;font-style:normal;font-size:.9375rem;font-weight:600;color:var(--muted)}
.cf-live-grid-hero .lgh-by::before{content:"— "}
.cf-live-grid-hero .lgh-fig{
margin:clamp(40px,5vw,64px) 0 0;padding:clamp(20px,3vw,32px);
background:var(--card);color:var(--ink);
border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));
border-radius:var(--card-radius,var(--radius,14px));
box-shadow:var(--card-shadow,var(--shadow-lg));
}
.cf-live-grid-hero .lgh-fig-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 16px;margin-bottom:clamp(12px,2vw,20px)}
.cf-live-grid-hero .lgh-cap{flex:1 1 20rem;min-width:0;margin:0;color:var(--muted);font-size:.9375rem;line-height:1.75;font-weight:600;text-wrap:pretty}
.cf-live-grid-hero .lgh-cap strong{margin-inline-end:8px;color:var(--ink);font-weight:800;font-variant-numeric:tabular-nums}
.cf-live-grid-hero .lgh-cap .lgh-chip{margin-inline-start:12px;vertical-align:middle}
.cf-live-grid-hero .lgh-chip{
display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;white-space:nowrap;
background:color-mix(in oklch, var(--ink) 6%, var(--card));color:var(--ink);font-size:.875rem;line-height:1.2;font-weight:800;
}
.cf-live-grid-hero .lgh-status{display:flex;align-items:center;gap:12px}
.cf-live-grid-hero .lgh-live{display:inline-flex;align-items:center;gap:8px;color:var(--ink);font-size:.875rem;line-height:1.2;font-weight:800;white-space:nowrap}
.cf-live-grid-hero .lgh-live-dot{width:10px;height:10px;border-radius:2px;background:var(--lgh-s0);transition:background .16s ease}
.cf-live-grid-hero .lgh-live[data-on="true"] .lgh-live-dot{background:var(--success)}
.cf-live-grid-hero .lgh-pause{
display:inline-grid;place-items:center;width:44px;height:44px;padding:0;cursor:pointer;
border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));
background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));
box-shadow:var(--button-2-shadow,var(--shadow-sm));transition:background .16s ease,transform .16s ease;
}
.cf-live-grid-hero .lgh-pause:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
.cf-live-grid-hero .lgh-pause:active{transform:translateY(1px)}
.cf-live-grid-hero .lgh-grid{display:grid;grid-template-columns:repeat(var(--lgh-cols,28),minmax(0,1fr));padding:4px 0}
.cf-live-grid-hero .lgh-cell{display:grid;place-items:center;aspect-ratio:1;min-width:0}
.cf-live-grid-hero .lgh-sq{
display:block;width:clamp(7px,32%,12px);aspect-ratio:1;border-radius:2px;background:var(--lgh-s0);
transition:background-color .6s ease,box-shadow .6s ease;
}
.cf-live-grid-hero .lgh-sq--key{width:10px;height:10px;flex:0 0 auto}
.cf-live-grid-hero .lgh-cell[data-s="1"] > .lgh-sq,.cf-live-grid-hero .lgh-sq[data-s="1"]{background:var(--lgh-s1)}
.cf-live-grid-hero .lgh-cell[data-s="2"] > .lgh-sq,.cf-live-grid-hero .lgh-sq[data-s="2"]{background:var(--lgh-s2)}
.cf-live-grid-hero .lgh-cell[data-s="3"] > .lgh-sq,.cf-live-grid-hero .lgh-sq[data-s="3"]{background:transparent;box-shadow:inset 0 0 0 2px var(--lgh-s3)}
.cf-live-grid-hero .lgh-foot{
display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px 32px;
margin-top:clamp(16px,2vw,24px);padding-top:clamp(16px,2vw,20px);
border-top:1px solid oklch(from var(--ink) l c h / .12);
}
.cf-live-grid-hero .lgh-legend{display:flex;flex-wrap:wrap;gap:8px 20px;margin:0;padding:0;list-style:none}
.cf-live-grid-hero .lgh-legend li{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:.9375rem;line-height:1.4;font-weight:600}
.cf-live-grid-hero .lgh-counters{display:flex;flex-wrap:wrap;gap:16px 32px;margin:0}
.cf-live-grid-hero .lgh-counter{display:flex;flex-direction:column-reverse;gap:4px;min-width:0}
.cf-live-grid-hero .lgh-counter dd{
margin:0;color:var(--ink);font-family:var(--font-display);font-weight:var(--display-weight,800);
font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.1;letter-spacing:-0.01em;font-variant-numeric:tabular-nums;
}
.cf-live-grid-hero .lgh-counter dt{color:var(--muted);font-size:.9375rem;line-height:1.35;font-weight:600;text-wrap:pretty}
.cf-live-grid-hero .lgh-rise{animation:lgh-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-live-grid-hero .lgh-deck.lgh-rise{animation-delay:.07s}
.cf-live-grid-hero .lgh-fig.lgh-rise{animation-delay:.14s}
@keyframes lgh-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:860px){
.cf-live-grid-hero .lgh-deck{grid-template-columns:minmax(0,1fr);gap:32px}
}
@media (max-width:640px){
.cf-live-grid-hero .lgh-actions{display:grid;width:100%}
.cf-live-grid-hero .lgh-btn{padding:10px 20px}
.cf-live-grid-hero .lgh-grid{grid-template-columns:repeat(12,minmax(0,1fr))}
.cf-live-grid-hero .lgh-cell.is-wide{display:none}
.cf-live-grid-hero .lgh-legend{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;width:100%}
.cf-live-grid-hero .lgh-counters{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;width:100%}
.cf-live-grid-hero .lgh-counter{flex-direction:row-reverse;justify-content:flex-end;align-items:baseline;gap:12px}
.cf-live-grid-hero .lgh-counter dd{min-width:4.2em}
}
@media (prefers-reduced-motion: reduce){
.cf-live-grid-hero .lgh-rise{animation:none}
.cf-live-grid-hero .lgh-sq,.cf-live-grid-hero .lgh-btn,.cf-live-grid-hero .lgh-pause,.cf-live-grid-hero .lgh-live-dot{transition:none}
.cf-live-grid-hero .lgh-btn:active,.cf-live-grid-hero[data-state="active"] .lgh-btn,.cf-live-grid-hero .lgh-pause:active{transform:none}
}
`;
pieces/hero/live-grid-hero/specimen.tsx 35 lines
import LiveGridHero from "../live-grid-hero";
export const states = ["default", "hover", "active", "disabled"];
export default function LiveGridHeroSpecimen({
state,
}: {
state?: "default" | "hover" | "active" | "disabled";
}) {
return (
<LiveGridHero
state={state}
headline="Every order printed, packed and shipped in 48 hours"
highlight="in 48 hours"
lead="We print your designs on tees, mugs and posters the day the order lands, then ship them in your branded box. Connect your store once and stop packing orders at midnight."
pullLine="Orders in by 2 pm are on press the same afternoon."
aside="(I know. Our old printer quoted us ten days, too.)"
asideBy="Mara Okafor, founder of Harbor Print Co."
primaryLabel="Get my free sample pack"
primarySublabel="Five products, shipped to your door"
href="#sample-pack"
secondaryLabel="See wholesale pricing"
secondaryHref="#pricing"
note="No minimums · No setup fees · Your brand on every box"
figureNumber="Fig. 1"
figureLabel="Today's orders, from queue to doorstep"
stages={["Queued", "On press", "Packed", "Shipped"]}
counters={[
{ value: "1,864", label: "orders on today's board" },
{ value: "312", label: "on press right now" },
{ value: "41,207", label: "shipped this quarter" },
]}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalLiveGridHero |
string |
|
highlight OptionalLiveGridHero |
string |
|
lead OptionalLiveGridHero |
string |
|
pullLine OptionalLiveGridHero |
string |
|
aside OptionalLiveGridHero |
string |
|
asideBy OptionalLiveGridHero |
string |
|
primaryLabel OptionalLiveGridHero |
string |
|
primarySublabel OptionalLiveGridHero |
string |
|
href OptionalLiveGridHero |
string |
|
onAction OptionalLiveGridHero |
() => void |
|
secondaryLabel OptionalLiveGridHero |
string |
|
secondaryHref OptionalLiveGridHero |
string |
|
onSecondaryAction OptionalLiveGridHero |
() => void |
|
note OptionalLiveGridHero |
string |
|
figureNumber OptionalLiveGridHero |
string |
|
figureLabel OptionalLiveGridHero |
string |
|
stages OptionalLiveGridHero |
string[] |
|
counters OptionalLiveGridHero |
LiveGridCounter[] |
|
columns OptionalLiveGridHero |
number |
|
rows OptionalLiveGridHero |
number |
|
phoneRows OptionalLiveGridHero |
number |
|
copy OptionalLiveGridHero |
Partial<LiveGridHeroCopy> |
|
state OptionalLiveGridHero |
"default" | "hover" | "active" | "disabled" |
|
className OptionalLiveGridHero |
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.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.