Stacked Nouns Hero 1
Stacked-nouns hero: the headline lists what the offer includes, one bold line each, and lands on the one offer in the accent.
Use it in a prompt
Use hero/stacked-nouns-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/stacked-nouns-hero.tsx. - Import it and pass your copy and images (Props tab):
import { StackedNounsHero } from "@/components/funneldna/hero/stacked-nouns-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/stacked-nouns-hero/component.tsx 460 lines
// layout: interview-qa
// Stacked-nouns hero: the headline lists what the offer includes, one bold line each, and lands on the one offer in the accent.
// A two-question interview answers the price and the "ready?" question with the button, beside a soft-focus product scene that bleeds off the edge.
import React, { useId, useState } from "react";
import { Aperture, Pause, Play, ShieldCheck } from "lucide-react";
import { FX_HOST, Glow } from "../fx/fx";
export type StackedNounsHeroLogo = {
src: string;
alt: string;
/** Width in px at the 32px marquee height (default 132). */
width?: number;
};
export type StackedNounsHeroProps = {
/** One short noun per line, each a thing the offer includes. */
lines?: string[];
/** Final line in the accent colour: the one offer that holds them all. */
accentLine?: string;
lead?: string;
/** Exact phrase inside `lead` that gets the marker highlight. */
highlight?: string;
priceQuestion?: string;
/** Today's price; the price answer renders only when it is supplied. */
price?: string;
priceUnit?: string;
/** What the supplied alternative costs, e.g. "vs. $180 for one private lesson". */
priceAlternative?: string;
/** The question the button answers. */
actionQuestion?: string;
ctaLabel?: string;
href?: string;
onAction?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
secondaryLabel?: string;
secondaryHref?: string;
onSecondaryAction?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
/** One reassurance line under the button (supplied facts only). */
note?: string;
/** Product scene (slot "scene"), shown soft-focus and bleeding off the right edge. */
sceneImage?: string;
sceneAlt?: string;
/** Optional crisp UI note floating over the blurred scene (desktop). */
sceneNote?: { title: string; detail?: string };
/** One-line label above the logo marquee. */
trustedLabel?: string;
/** Supplied customer or press logos; the marquee renders nothing without them. */
logos?: StackedNounsHeroLogo[];
pauseLabel?: string;
playLabel?: string;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_LINES = ["Course.", "Coaching.", "Community."];
const NO_LOGOS: StackedNounsHeroLogo[] = [];
export function StackedNounsHero(props: StackedNounsHeroProps) {
const {
lines = DEFAULT_LINES,
accentLine = "One membership.",
lead = "Everything you need to get results lives in one place. Join today and start with your first lesson.",
highlight = "lives in one place",
priceQuestion = "What does it cost?",
price,
priceUnit = "/month",
priceAlternative,
actionQuestion = "Ready to get started?",
ctaLabel = "I'm ready, show me how",
href,
onAction,
secondaryLabel = "See what's inside",
secondaryHref,
onSecondaryAction,
note,
sceneImage,
sceneAlt = "Member dashboard preview",
sceneNote,
trustedLabel = "Trusted by people like you",
logos = NO_LOGOS,
pauseLabel = "Pause the logo scroll",
playLabel = "Play the logo scroll",
state = "default",
className,
} = props;
const [paused, setPaused] = useState(false);
const trustId = useId();
// Size the stacked lines so the longest noun (or accent word) always fits its column.
const longest = Math.max(
4,
...lines.map((line) => line.trim().length),
...accentLine.split(" ").map((word) => word.length),
);
const rootStyle = { "--snh-fit": (longest * 0.8 + 0.2).toFixed(2) } as React.CSSProperties;
const disabled = state === "disabled";
const ctaClass = ["snh-cta", state === "hover" ? "is-hover" : "", state === "active" ? "is-active" : ""]
.filter(Boolean)
.join(" ");
const fillers: StackedNounsHeroLogo[] = [];
for (let i = 0; logos.length > 0 && logos.length + fillers.length < 8; i += 1) fillers.push(logos[i % logos.length]);
const loop = [...logos, ...fillers];
const duration = `${Math.max(28, loop.length * 4)}s`;
const showSecondary = Boolean(secondaryLabel && (secondaryHref || onSecondaryAction));
const hasScene = Boolean(sceneImage);
return (
<section className={["cf-stacked-nouns-hero", className].filter(Boolean).join(" ")} style={rootStyle}>
<style>{CSS}</style>
<div className="snh-inner">
<div className={hasScene ? "snh-grid" : "snh-grid no-scene"}>
<div className="snh-copy">
<h1 className="snh-h1">
{lines.map((line, i) => (
<React.Fragment key={`${line}-${i}`}>
<span className="snh-line" style={{ "--i": i } as React.CSSProperties}>
{line}
</span>{" "}
</React.Fragment>
))}
<span className="snh-line is-accent" style={{ "--i": Math.min(lines.length, 4) } as React.CSSProperties}>
{accentLine}
</span>
</h1>
{lead ? <p className="snh-lead snh-rise">{withHighlight(lead, highlight)}</p> : null}
<dl className="snh-qa snh-rise">
{price ? (
<div className="snh-qa-row">
<dt>{priceQuestion}</dt>
<dd>
<p className="snh-price">
<span className="snh-price-amount">
<strong className="snh-price-num">{price}</strong>
{priceUnit ? <span className="snh-price-unit">{priceUnit}</span> : null}
</span>
{priceAlternative ? <span className="snh-price-vs">{priceAlternative}</span> : null}
</p>
</dd>
</div>
) : null}
<div className="snh-qa-row">
<dt>{actionQuestion}</dt>
<dd className="snh-act">
<div className="snh-actions">
{href && !disabled ? (
<a className={ctaClass} href={href} onClick={onAction}>
{ctaLabel}
</a>
) : (
<button type="button" className={ctaClass} disabled={disabled} onClick={onAction}>
{ctaLabel}
</button>
)}
{showSecondary ? (
secondaryHref ? (
<a className="snh-link" href={secondaryHref} onClick={onSecondaryAction}>
{secondaryLabel}
</a>
) : (
<button type="button" className="snh-link" onClick={onSecondaryAction}>
{secondaryLabel}
</button>
)
) : null}
</div>
{note ? (
<p className="snh-note-line">
<ShieldCheck aria-hidden="true" size={16} strokeWidth={2.5} className="snh-inline-icon" />
{note}
</p>
) : null}
</dd>
</div>
</dl>
</div>
{hasScene ? (
<div className="snh-scene">
<div className="snh-stage">
<div className="snh-stage-host" style={FX_HOST}>
<Glow />
<img className="snh-photo" src={sceneImage} alt={sceneAlt} width={1536} height={1024} decoding="async" />
</div>
</div>
{sceneNote ? (
<div className="snh-note">
<p className="snh-note-title">
<Aperture aria-hidden="true" size={18} strokeWidth={2.5} className="snh-inline-icon" />
{sceneNote.title}
</p>
{sceneNote.detail ? <p className="snh-note-detail">{sceneNote.detail}</p> : null}
</div>
) : null}
</div>
) : null}
</div>
{logos.length > 0 ? (
<div className={paused ? "snh-trust is-paused" : "snh-trust"}>
<div className="snh-trust-head">
<p className="snh-trust-label" id={trustId}>
{trustedLabel}
</p>
<button
type="button"
className="snh-pause"
aria-label={paused ? playLabel : pauseLabel}
onClick={() => setPaused((value) => !value)}
>
{paused ? (
<Play aria-hidden="true" size={16} strokeWidth={2.5} />
) : (
<Pause aria-hidden="true" size={16} strokeWidth={2.5} />
)}
</button>
</div>
<div className="snh-viewport" role="region" aria-labelledby={trustId} tabIndex={0}>
<div className="snh-track" style={{ animationDuration: duration }}>
<ul className="snh-logos" aria-labelledby={trustId}>
{logos.map((logo, i) => (
<li key={`logo-${i}`}>
<LogoMark logo={logo} />
</li>
))}
{fillers.map((logo, i) => (
<li key={`fill-${i}`} className="snh-dup" aria-hidden="true">
<LogoMark logo={logo} hidden />
</li>
))}
</ul>
<ul className="snh-logos is-dup" aria-hidden="true">
{loop.map((logo, i) => (
<li key={`loop-${i}`}>
<LogoMark logo={logo} hidden />
</li>
))}
</ul>
</div>
</div>
</div>
) : null}
</div>
</section>
);
}
export default StackedNounsHero;
function withHighlight(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<mark className="snh-mark">{phrase}</mark>
{text.slice(at + phrase.length)}
</>
);
}
// Logos render as a mask filled from the band ink, so any supplied mark takes the theme.
function LogoMark({ logo, hidden = false }: { logo: StackedNounsHeroLogo; hidden?: boolean }) {
const url = `url(${JSON.stringify(logo.src)})`;
const style = { "--snh-lw": logo.width ?? 132, maskImage: url, WebkitMaskImage: url } as React.CSSProperties;
return (
<span
className="snh-logo"
role={hidden ? undefined : "img"}
aria-label={hidden ? undefined : logo.alt}
style={style}
/>
);
}
const CSS = `
.cf-stacked-nouns-hero{
--snh-gutter:clamp(16px,5vw,48px);
--snh-soft:color-mix(in oklch,var(--band-ink) 86%,var(--band));
--snh-accent:color-mix(in oklch,var(--accent) 52%,var(--band-ink));
--snh-rule:oklch(from var(--band-ink) l c h / .16);
--snh-shadow:var(--shadow,oklch(.22 .03 260));
position:relative;overflow:hidden;overflow:clip;
background:var(--band);color:var(--band-ink);font-family:var(--font-body);
padding:clamp(56px,8vw,112px) 0 clamp(64px,8.5vw,120px);
}
.cf-stacked-nouns-hero *,.cf-stacked-nouns-hero *::before,.cf-stacked-nouns-hero *::after{box-sizing:border-box}
.cf-stacked-nouns-hero .snh-inner{position:relative;z-index:1;width:min(1120px,100% - 2 * var(--snh-gutter));margin-inline:auto}
.cf-stacked-nouns-hero .snh-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);column-gap:clamp(32px,5vw,72px);align-items:start}
.cf-stacked-nouns-hero .snh-grid.no-scene{grid-template-columns:minmax(0,46rem)}
.cf-stacked-nouns-hero .snh-copy{position:relative;z-index:2;min-width:0;container-type:inline-size}
.cf-stacked-nouns-hero .snh-h1{
margin:0;color:var(--band-ink);font-family:var(--font-display);font-weight:var(--display-weight,800);
letter-spacing:var(--display-tracking,-0.025em);line-height:1.04;text-transform:uppercase;text-wrap:balance;
font-size:clamp(2.25rem,8.5vw,4.5rem);
font-size:clamp(2rem,calc(100cqi / var(--snh-fit,8.8)),4.875rem);
}
.cf-stacked-nouns-hero .snh-line{display:block;animation:snh-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(min(var(--i,0),4) * .07s)}
.cf-stacked-nouns-hero .snh-line.is-accent{color:var(--snh-accent)}
.cf-stacked-nouns-hero .snh-rise{animation:snh-rise .45s cubic-bezier(.2,.7,.2,1) .28s both}
.cf-stacked-nouns-hero .snh-lead{margin:clamp(16px,2vw,24px) 0 0;max-width:36rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--snh-soft);text-wrap:pretty}
.cf-stacked-nouns-hero .snh-mark{
--snh-marker:oklch(from var(--marker,#fae37c) max(l,.89) min(c,.14) h);
color:var(--ink);color:oklch(from var(--marker,#fae37c) .24 .05 h);
background-color:transparent;
background-image:linear-gradient(100deg,transparent .12em,var(--snh-marker) .2em,var(--snh-marker) calc(100% - .2em),transparent calc(100% - .12em));
background-repeat:no-repeat;background-size:100% 100%;
padding:.04em .3em .06em;margin:0 -.1em;border-radius:.12em;font-weight:600;
-webkit-box-decoration-break:clone;box-decoration-break:clone;
}
.cf-stacked-nouns-hero .snh-qa{margin:clamp(24px,3vw,32px) 0 0;padding:0;max-width:36rem}
.cf-stacked-nouns-hero .snh-qa-row+.snh-qa-row{margin-top:20px;padding-top:20px;border-top:1px solid var(--snh-rule)}
.cf-stacked-nouns-hero .snh-qa dt{margin:0;color:var(--band-ink);font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;letter-spacing:-0.01em;text-wrap:balance}
.cf-stacked-nouns-hero .snh-qa dd{margin:12px 0 0}
.cf-stacked-nouns-hero .snh-qa dd.snh-act{margin-top:16px}
.cf-stacked-nouns-hero .snh-price{display:flex;flex-wrap:wrap;align-items:baseline;gap:12px 16px;margin:0;color:var(--snh-soft);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.4;text-wrap:pretty}
.cf-stacked-nouns-hero .snh-price-amount{display:inline-flex;align-items:baseline;white-space:nowrap}
.cf-stacked-nouns-hero .snh-price-num{color:var(--band-ink);font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums}
.cf-stacked-nouns-hero .snh-price-unit{margin-left:4px;font-weight:700;color:var(--band-ink)}
.cf-stacked-nouns-hero .snh-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px}
.cf-stacked-nouns-hero .snh-cta{
display:inline-flex;align-items:center;justify-content:center;min-height:72px;padding:0 28px;border:0;
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);
font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;cursor:pointer;
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(--snh-shadow) l c h / .45),0 8px 16px -6px oklch(from var(--snh-shadow) l c h / .55));
transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.cf-stacked-nouns-hero .snh-cta:not(:disabled):hover,.cf-stacked-nouns-hero .snh-cta.is-hover:not(:disabled){
transform:translateY(-1px);
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 / .6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),0 1px 2px oklch(from var(--snh-shadow) l c h / .5),0 12px 20px -8px oklch(from var(--snh-shadow) l c h / .65);
}
.cf-stacked-nouns-hero .snh-cta:not(:disabled):active,.cf-stacked-nouns-hero .snh-cta.is-active:not(:disabled){
transform:translateY(1px);
background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .06) 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-2,var(--cta-2)) calc(l - .2) c h / .55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 1px oklch(from var(--snh-shadow) l c h / .4);
}
.cf-stacked-nouns-hero .snh-cta:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-stacked-nouns-hero .snh-cta:disabled{
cursor:not-allowed;transform:none;text-shadow:none;box-shadow:none;
background:color-mix(in oklch,var(--band-ink) 16%,var(--band));color:color-mix(in oklch,var(--band-ink) 82%,var(--band));
}
.cf-stacked-nouns-hero .snh-link{
display:inline-flex;align-items:center;min-height:44px;padding:0;border:0;background:none;cursor:pointer;font:inherit;
font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;color:var(--band-ink);
text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:.22em;text-decoration-color:oklch(from var(--band-ink) l c h / .45);
transition:text-decoration-color .16s ease;
}
.cf-stacked-nouns-hero .snh-link:hover{text-decoration-color:var(--band-ink)}
.cf-stacked-nouns-hero .snh-link:focus-visible{outline:3px solid var(--band-ink);outline-offset:4px;border-radius:4px}
.cf-stacked-nouns-hero .snh-note-line{margin:14px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--snh-soft);text-wrap:pretty}
.cf-stacked-nouns-hero .snh-inline-icon{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em;color:var(--band-ink)}
.cf-stacked-nouns-hero .snh-scene{position:relative;align-self:stretch;min-height:440px}
.cf-stacked-nouns-hero .snh-stage{position:absolute;top:-10%;bottom:-10%;left:-8%;right:calc((100vw - min(1120px,100vw - 2 * var(--snh-gutter))) / -2)}
.cf-stacked-nouns-hero .snh-stage-host{width:100%;height:100%}
.cf-stacked-nouns-hero .snh-photo{
position:absolute;inset:0;z-index:1;display:block;width:100%;height:100%;object-fit:cover;object-position:left center;
color:var(--band-ink);filter:blur(var(--snh-blur,4px)) saturate(1.1);transform:scale(1.04);
-webkit-mask-image:linear-gradient(to right,transparent,currentColor 32%),linear-gradient(to bottom,transparent,currentColor 18%,currentColor 82%,transparent);
-webkit-mask-composite:source-in;
mask-image:linear-gradient(to right,transparent,currentColor 32%),linear-gradient(to bottom,transparent,currentColor 18%,currentColor 82%,transparent);
mask-composite:intersect;
}
.cf-stacked-nouns-hero .snh-note{
position:absolute;z-index:3;left:0;top:34%;width:min(340px,100%);padding:16px 20px;
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,0 2px 4px oklch(from var(--snh-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--snh-shadow) l c h / .32)));
transform-origin:left center;animation:snh-pop .3s cubic-bezier(.2,.7,.2,1) .3s both;
}
.cf-stacked-nouns-hero .snh-note-title{margin:0;font-size:1.0625rem;line-height:1.3;font-weight:700;color:var(--ink);text-wrap:balance}
.cf-stacked-nouns-hero .snh-note-title .snh-inline-icon{color:var(--accent)}
.cf-stacked-nouns-hero .snh-note-detail{margin:6px 0 0;font-size:.9375rem;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-stacked-nouns-hero .snh-trust{margin-top:clamp(56px,7vw,88px)}
.cf-stacked-nouns-hero .snh-trust-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 12px;margin-bottom:16px}
.cf-stacked-nouns-hero .snh-trust-label{margin:0;font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--snh-soft);text-align:center;text-wrap:balance}
.cf-stacked-nouns-hero .snh-pause{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:0;border-radius:999px;cursor:pointer;background:oklch(from var(--band-ink) l c h / .12);color:var(--band-ink);transition:background .16s ease}
.cf-stacked-nouns-hero .snh-pause:hover{background:oklch(from var(--band-ink) l c h / .2)}
.cf-stacked-nouns-hero .snh-pause:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-stacked-nouns-hero .snh-viewport{
overflow:hidden;color:var(--band-ink);border-radius:8px;
-webkit-mask-image:linear-gradient(to right,transparent,currentColor 8%,currentColor 92%,transparent);
mask-image:linear-gradient(to right,transparent,currentColor 8%,currentColor 92%,transparent);
}
.cf-stacked-nouns-hero .snh-viewport:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px;-webkit-mask-image:none;mask-image:none}
.cf-stacked-nouns-hero .snh-track{display:flex;width:max-content;animation:snh-marquee 32s linear infinite}
.cf-stacked-nouns-hero .snh-viewport:hover .snh-track,.cf-stacked-nouns-hero .snh-viewport:focus-within .snh-track,.cf-stacked-nouns-hero .snh-trust.is-paused .snh-track{animation-play-state:paused}
.cf-stacked-nouns-hero .snh-logos{display:flex;flex:0 0 auto;align-items:center;gap:var(--snh-logo-gap,64px);margin:0;padding:12px var(--snh-logo-gap,64px) 12px 0;list-style:none}
.cf-stacked-nouns-hero .snh-logos li{display:flex;flex:0 0 auto}
.cf-stacked-nouns-hero .snh-logo{
display:block;height:calc(32px * var(--snh-logo-scale,1));width:calc(var(--snh-lw,132) * 1px * var(--snh-logo-scale,1));
background-color:color-mix(in oklch,var(--band-ink) 74%,var(--band));
-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;
transition:background-color .16s ease;
}
.cf-stacked-nouns-hero .snh-logos li:hover .snh-logo{background-color:var(--band-ink)}
@keyframes snh-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes snh-pop{from{transform:scale(.9)}to{transform:none}}
@keyframes snh-marquee{to{transform:translateX(-50%)}}
@media (max-width:899px){
.cf-stacked-nouns-hero .snh-grid{grid-template-columns:minmax(0,1fr)}
.cf-stacked-nouns-hero .snh-scene{align-self:auto;min-height:0;height:clamp(220px,62vw,320px);margin:clamp(32px,8vw,48px) calc(-1 * var(--snh-gutter)) 0}
.cf-stacked-nouns-hero .snh-stage{top:0;bottom:0;left:0;right:0}
.cf-stacked-nouns-hero .snh-photo{
--snh-blur:2px;object-position:center 40%;
-webkit-mask-image:linear-gradient(to right,transparent,currentColor 12%,currentColor 88%,transparent),linear-gradient(to bottom,transparent,currentColor 20%,currentColor 80%,transparent);
-webkit-mask-composite:source-in;
mask-image:linear-gradient(to right,transparent,currentColor 12%,currentColor 88%,transparent),linear-gradient(to bottom,transparent,currentColor 20%,currentColor 80%,transparent);
mask-composite:intersect;
}
.cf-stacked-nouns-hero .snh-note{inset:0;margin:auto;width:min(340px,100% - 2 * var(--snh-gutter));height:fit-content;transform-origin:center}
.cf-stacked-nouns-hero .snh-actions{flex-direction:column;align-items:stretch;gap:8px}
.cf-stacked-nouns-hero .snh-cta{width:100%;min-height:64px}
.cf-stacked-nouns-hero .snh-link{align-self:center}
.cf-stacked-nouns-hero .snh-note-line{text-align:center}
.cf-stacked-nouns-hero .snh-trust{margin-top:clamp(40px,10vw,56px)}
.cf-stacked-nouns-hero .snh-trust-head{margin-bottom:12px}
.cf-stacked-nouns-hero .snh-logos{--snh-logo-gap:44px;padding-block:8px}
.cf-stacked-nouns-hero .snh-logo{--snh-logo-scale:.8}
}
@media (prefers-reduced-motion:reduce){
.cf-stacked-nouns-hero .snh-line,.cf-stacked-nouns-hero .snh-rise,.cf-stacked-nouns-hero .snh-note{animation:none}
.cf-stacked-nouns-hero .snh-cta,.cf-stacked-nouns-hero .snh-cta:not(:disabled):hover,.cf-stacked-nouns-hero .snh-cta.is-hover:not(:disabled),.cf-stacked-nouns-hero .snh-cta:not(:disabled):active,.cf-stacked-nouns-hero .snh-cta.is-active:not(:disabled){transform:none;transition:none}
.cf-stacked-nouns-hero .snh-track{animation:none;width:100%;justify-content:center}
.cf-stacked-nouns-hero .snh-logos{flex:1 1 100%;min-width:0;flex-wrap:wrap;justify-content:center;gap:20px var(--snh-logo-gap,56px);padding:8px 0}
.cf-stacked-nouns-hero .snh-logos.is-dup,.cf-stacked-nouns-hero .snh-dup,.cf-stacked-nouns-hero .snh-pause{display:none}
.cf-stacked-nouns-hero .snh-viewport{-webkit-mask-image:none;mask-image:none}
}
/* Phones without motion: one static swipeable row (same height as the marquee) instead of a tall wrapped stack. */
@media (prefers-reduced-motion:reduce) and (max-width:899px){
.cf-stacked-nouns-hero .snh-viewport{
overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none;
-webkit-mask-image:linear-gradient(to right,currentColor 82%,transparent);
mask-image:linear-gradient(to right,currentColor 82%,transparent);
}
.cf-stacked-nouns-hero .snh-viewport::-webkit-scrollbar{display:none}
.cf-stacked-nouns-hero .snh-track{width:max-content;justify-content:flex-start}
.cf-stacked-nouns-hero .snh-logos{flex:0 0 auto;flex-wrap:nowrap;justify-content:flex-start;gap:0 var(--snh-logo-gap,44px);padding:8px 48px 8px 0}
.cf-stacked-nouns-hero .snh-logos li{scroll-snap-align:start}
}
`;
pieces/hero/stacked-nouns-hero/specimen.tsx 70 lines
import __studioImageecc288bf from "../assets/7b9380b26bbd83a8.webp";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
import { StackedNounsHero, type StackedNounsHeroLogo, type StackedNounsHeroProps } from "../stacked-nouns-hero";
export const states = ["default", "hover", "active", "disabled"];
type Shape = "ring" | "square" | "bars" | "none";
// Fictional publication wordmarks for the sample. Drawn as alpha masks; the hero recolours them from the theme.
function wordmark(
name: string,
shape: Shape,
options: { caps?: boolean; italic?: boolean; weight?: number; serif?: boolean } = {},
): StackedNounsHeroLogo {
const size = 24;
const text = options.caps ? name.toUpperCase() : name;
const textWidth = Math.round(text.length * size * (options.caps ? 0.68 : 0.52));
const markWidth = shape === "none" ? 0 : 34;
const width = markWidth + textWidth + 4;
const marks: Record<Shape, string> = {
ring: "<circle cx='13' cy='20' r='10' fill='none' stroke='currentColor' stroke-width='4'/><circle cx='13' cy='20' r='3.5' fill='currentColor'/>",
square: "<rect x='3' y='10' width='20' height='20' rx='5' fill='none' stroke='currentColor' stroke-width='4'/><rect x='10' y='17' width='6' height='6' rx='1' fill='currentColor'/>",
bars: "<rect x='2' y='12' width='6' height='18' rx='2' fill='currentColor'/><rect x='11' y='8' width='6' height='22' rx='2' fill='currentColor'/><rect x='20' y='16' width='6' height='14' rx='2' fill='currentColor'/>",
none: "",
};
const family = options.serif ? "Georgia, serif" : "Helvetica, Arial, sans-serif";
const style = `${options.italic ? " font-style='italic'" : ""} font-family='${family}'`;
const svg = `<svg xmlns='http://www.w3.org/2000/svg' width='${width}' height='40' viewBox='0 0 ${width} 40'>${marks[shape]}<text x='${markWidth}' y='28' font-size='${size}' font-weight='${options.weight ?? 700}'${style} textLength='${textWidth}' lengthAdjust='spacingAndGlyphs' fill='currentColor'>${text}</text></svg>`;
return { src: `data:image/svg+xml,${encodeURIComponent(svg)}`, alt: name, width: Math.round(width * 0.8) };
}
const logos: StackedNounsHeroLogo[] = [
wordmark("Lens Quarterly", "ring", { serif: true }),
wordmark("Darkroom Post", "none", { caps: true, weight: 800 }),
wordmark("Open Shutter", "square", { italic: true }),
wordmark("Golden Hour Review", "bars", { serif: true }),
wordmark("Northfield Camera Club", "ring", { weight: 600 }),
wordmark("Prime Frame", "square", { caps: true }),
];
export default function StackedNounsHeroSpecimen({ state = "default" }: { state?: StackedNounsHeroProps["state"] }) {
return (
<StackedNounsHero
state={state}
lines={["Lessons.", "Critiques.", "Community."]}
accentLine="One membership."
lead="Field Notes Academy gives you weekly lessons, honest critiques from working photographers, and a crew that shoots with you. Post your first photo this week."
highlight="honest critiques from working photographers"
priceQuestion="What does it cost?"
price="$29"
priceUnit="/month"
priceAlternative="vs. $180 for a single private lesson"
actionQuestion="Ready to shoot with a plan every week?"
ctaLabel="I'm ready, let me in"
href="#join"
secondaryLabel="See what's inside"
secondaryHref="#inside"
note={defaults.sample.guarantee}
sceneImage={slot(
"scene",
__studioImageecc288bf,
)}
sceneAlt="Field Notes Academy member dashboard with weekly lessons and photo critiques"
sceneNote={{ title: "Assignment 1: window-light portraits", detail: "Post yours by Friday for a live critique." }}
trustedLabel="Field Notes members have been featured in"
logos={logos}
/>
);
}
| Name | Type | Details |
|---|---|---|
lines OptionalStackedNounsHero |
string[] |
|
accentLine OptionalStackedNounsHero |
string |
|
lead OptionalStackedNounsHero |
string |
|
highlight OptionalStackedNounsHero |
string |
|
priceQuestion OptionalStackedNounsHero |
string |
|
price OptionalStackedNounsHero |
string |
|
priceUnit OptionalStackedNounsHero |
string |
|
priceAlternative OptionalStackedNounsHero |
string |
|
actionQuestion OptionalStackedNounsHero |
string |
|
ctaLabel OptionalStackedNounsHero |
string |
|
href OptionalStackedNounsHero |
string |
|
onAction OptionalStackedNounsHero |
(event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void |
|
secondaryLabel OptionalStackedNounsHero |
string |
|
secondaryHref OptionalStackedNounsHero |
string |
|
onSecondaryAction OptionalStackedNounsHero |
(event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void |
|
note OptionalStackedNounsHero |
string |
|
sceneImage OptionalStackedNounsHero |
string |
|
sceneAlt OptionalStackedNounsHero |
string |
|
sceneNote OptionalStackedNounsHero |
{ title: string; detail?: string } |
|
trustedLabel OptionalStackedNounsHero |
string |
|
logos OptionalStackedNounsHero |
StackedNounsHeroLogo[] |
|
pauseLabel OptionalStackedNounsHero |
string |
|
playLabel OptionalStackedNounsHero |
string |
|
state OptionalStackedNounsHero |
"default" | "hover" | "active" | "disabled" |
|
className OptionalStackedNounsHero |
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.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
7b9380b26bbd83a8.webp
image/webp · 80.4 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB