Magazine Cover Hero 1
Magazine cover hero: the offer staged as an editorial cover (masthead, subject, cover lines and one call-out), so the promise reads at a glance and the one action sits on the cover.
Use it in a prompt
Use hero/magazine-cover-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/magazine-cover-hero.tsx. - Import it and pass your copy and images (Props tab):
import { MagazineCoverHero } from "@/components/funneldna/hero/magazine-cover-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/magazine-cover-hero/component.tsx 397 lines
// layout: magazine-spread
// Magazine cover hero: the offer staged as an editorial cover (masthead, subject, cover lines and one call-out), so the promise reads at a glance and the one action sits on the cover.
import * as React from "react";
import { ShieldCheck, Users } from "lucide-react";
import { motion, useReducedMotion, useScroll, useTransform } from "motion/react";
import { Pattern, FX_HOST } from "../fx/fx";
export type MagazineCoverLine = {
/** Big punchy part in the display face (a number or a short phrase), optional. */
big?: string;
text: string;
/** Cover-line weight: xl and lg carry a big part, md is a plain teaser, sm is a small caps line. */
size?: "xl" | "lg" | "md" | "sm";
};
export type MagazineCoverHeroProps = {
/** Masthead: the product or show name, fitted to the cover width. */
masthead?: string;
/** Main cover line, the page's h1. */
headline?: string;
/** Part of the headline set one step bigger (must appear in the headline). */
headlineEmphasis?: string;
lead?: string;
/** Small proof line under the lead; renders nothing when empty. */
proof?: string;
coverLines?: MagazineCoverLine[];
/** One selling sentence at the top of the call-out. */
offerLine?: string;
valueLabel?: string;
/** Total value, shown first and big when a price is also supplied. */
totalValue?: string;
/** The turn between value and price, swiped with the marker. */
revealLine?: string;
priceLabel?: string;
price?: string;
label?: string;
/** Reassurance line under the button. */
note?: string;
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
disabled?: boolean;
/** Full cover portrait (slot: presenter), used when no cut-out is supplied. */
presenterImage?: string;
/** Subject on a transparent background (slot: presenter-cutout); the masthead slides behind it on scroll. */
presenterCutoutImage?: string;
presenterAlt?: string;
/** Backdrop photo behind a cut-out subject (slot: scene), dimmed into the band. */
sceneImage?: string;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_LINES: MagazineCoverLine[] = [
{ big: "3", text: "tools in one download: guide, workbook and checklist", size: "xl" },
{ big: "1 map", text: "for every page your funnel needs", size: "lg" },
{ text: "How to write the headline your offer deserves", size: "md" },
{ text: "Check every link before you launch", size: "sm" },
];
export function MagazineCoverHero(props: MagazineCoverHeroProps) {
const {
masthead = "Funnel Starter",
headline = "Build your first funnel with a clear plan",
headlineEmphasis = "Build your first funnel",
lead = "Plan your funnel, write your page copy, and check every step before you launch.",
proof = "",
coverLines = DEFAULT_LINES,
offerLine = "Get the guide, workbook, and checklist in one download. One payment. Yours to keep.",
valueLabel = "Everything inside is worth",
totalValue = "$97",
revealLine = "But you won't pay that.",
priceLabel = "Your price today",
price = "$47",
label = "Send me the kit",
note = "Instant download · 30-day money-back guarantee",
href,
onAction,
disabled = false,
presenterImage,
presenterCutoutImage,
presenterAlt = "",
sceneImage,
state = "default",
className,
} = props;
const headingId = React.useId();
const rootRef = React.useRef<HTMLElement>(null);
const boxRef = React.useRef<HTMLDivElement>(null);
const textRef = React.useRef<HTMLSpanElement>(null);
const reduce = useReducedMotion();
const mode = presenterCutoutImage ? "cutout" : presenterImage ? "photo" : "none";
const { scrollYProgress } = useScroll({ target: rootRef, offset: ["start start", "end start"] });
const mastY = useTransform(scrollYProgress, [0, 0.6], ["0%", "28%"]);
const animate = mode === "cutout" && !reduce;
// Fit the masthead to the cover width; on narrow covers stack its words and fit the widest one.
React.useEffect(() => {
const root = rootRef.current;
const box = boxRef.current;
const text = textRef.current;
if (!root || !box || !text) return;
let alive = true;
let lastWidth = -1;
const fit = (force?: boolean) => {
const avail = box.clientWidth;
if (!avail || (!force && avail === lastWidth)) return;
lastWidth = avail;
root.removeAttribute("data-mast");
const current = parseFloat(getComputedStyle(text).fontSize) || 16;
const width = text.getBoundingClientRect().width;
if (!width) return;
let size = ((current * avail) / width) * 0.985;
const words = Array.from(text.querySelectorAll<HTMLElement>(".cf-mch-w"));
if (size < 44 && words.length > 1) {
const widest = Math.max(...words.map((el) => el.getBoundingClientRect().width));
const stacked = Math.min(((current * avail) / widest) * 0.985, avail * 0.19);
if (stacked > size) {
size = stacked;
root.setAttribute("data-mast", "stack");
}
}
if (size < 20) {
size = 20;
root.setAttribute("data-mast", "wrap");
}
size = Math.min(size, 220);
root.style.setProperty("--mch-mast-fs", size.toFixed(2) + "px");
root.style.setProperty("--mch-mast-h", box.getBoundingClientRect().height.toFixed(2) + "px");
};
const refit = () => {
if (alive) fit(true);
};
fit(true);
const observer = new ResizeObserver(() => fit());
observer.observe(box);
const fonts = document.fonts;
fonts?.ready.then(refit);
fonts?.addEventListener?.("loadingdone", refit);
return () => {
alive = false;
observer.disconnect();
fonts?.removeEventListener?.("loadingdone", refit);
};
}, [masthead]);
const words = masthead.split(" ").filter(Boolean);
const parts = splitPhrase(headline, headlineEmphasis);
const showValue = Boolean(totalValue && price);
const isDisabled = disabled || state === "disabled";
const forced = state === "hover" || state === "active" ? state : undefined;
const rootStyle = { ...FX_HOST, "--mch-chars": Math.max(masthead.length, 4) } as React.CSSProperties;
const handle = (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled) {
event.preventDefault();
return;
}
onAction?.(event);
};
const button = href ? (
<a
className="cf-mch-btn"
href={isDisabled ? undefined : href}
aria-disabled={isDisabled || undefined}
data-state={forced}
onClick={handle}
>
{label}
</a>
) : (
<button type="button" className="cf-mch-btn" disabled={isDisabled} data-state={forced} onClick={handle}>
{label}
</button>
);
return (
<section
ref={rootRef}
className={["cf-mch", className].filter(Boolean).join(" ")}
style={rootStyle}
data-subject={mode}
aria-labelledby={headingId}
>
<style>{CSS}</style>
<div className="cf-mch-layer" aria-hidden="true">
{mode === "cutout" && sceneImage ? <img className="cf-mch-scene" src={sceneImage} alt="" /> : null}
{mode === "cutout" && sceneImage ? <div className="cf-mch-scrim" /> : null}
<div className="cf-mch-pat">
<Pattern name="rings" fade="corner" />
</div>
</div>
{mode === "photo" ? (
<div className="cf-mch-photobox">
<img className="cf-mch-photo" src={presenterImage} alt={presenterAlt} loading="eager" decoding="async" />
<div className="cf-mch-photofade" aria-hidden="true" />
</div>
) : null}
<div className="cf-mch-in">
<div className="cf-mch-mastbox" ref={boxRef}>
<motion.p className="cf-mch-mast" style={animate ? { y: mastY } : undefined}>
<span className="cf-mch-mast-t" ref={textRef}>
{words.map((word, i) => (
<React.Fragment key={i}>
{i > 0 ? " " : null}
<span className="cf-mch-w">{word}</span>
</React.Fragment>
))}
</span>
</motion.p>
</div>
{mode === "cutout" ? (
<div className="cf-mch-subj">
<img src={presenterCutoutImage} alt={presenterAlt} width={1024} height={1024} loading="eager" decoding="async" />
</div>
) : null}
<div className="cf-mch-main cf-mch-rise">
<h1 id={headingId} className="cf-mch-h1">
{parts ? (
<>
{parts[0]}
<span className={parts[0] ? "cf-mch-em cf-mch-em-in" : "cf-mch-em"}>{parts[1]}</span>
{parts[2]}
</>
) : (
headline
)}
</h1>
{lead ? <p className="cf-mch-lead">{lead}</p> : null}
{proof ? (
<p className="cf-mch-proof">
<Users className="cf-mch-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{proof}
</p>
) : null}
</div>
{coverLines.length > 0 ? (
<ul className="cf-mch-lines">
{coverLines.map((line, i) => (
<li
key={i}
className="cf-mch-line cf-mch-rise"
data-size={line.size ?? "md"}
style={{ "--i": Math.min(i + 1, 4) } as React.CSSProperties}
>
{line.big ? <span className="cf-mch-line-big">{line.big}</span> : null}
<span className="cf-mch-line-t">{line.text}</span>
</li>
))}
</ul>
) : null}
<div className="cf-mch-call cf-mch-rise" style={{ "--i": 2 } as React.CSSProperties}>
{offerLine ? <p className="cf-mch-offer">{offerLine}</p> : null}
{showValue ? (
<div className="cf-mch-value">
{valueLabel ? <p className="cf-mch-vlab">{valueLabel}</p> : null}
<p className="cf-mch-vnum">{totalValue}</p>
{revealLine ? (
<p className="cf-mch-rev">
<span className="cf-mch-mark">{revealLine}</span>
</p>
) : null}
</div>
) : null}
{price ? (
<div className="cf-mch-today">
{priceLabel ? <span className="cf-mch-tlab">{priceLabel}</span> : null}
<span className="cf-mch-tnum">{price}</span>
</div>
) : null}
{button}
{note ? (
<p className="cf-mch-note">
<ShieldCheck className="cf-mch-ico cf-mch-ico-ok" size={16} strokeWidth={2.5} aria-hidden="true" />
{note}
</p>
) : null}
</div>
</div>
</section>
);
}
export default MagazineCoverHero;
function splitPhrase(text: string, phrase?: string): [string, string, string] | null {
if (!phrase) return null;
const at = text.indexOf(phrase);
if (at < 0) return null;
return [text.slice(0, at), phrase, text.slice(at + phrase.length)];
}
const CSS = `
.cf-mch{--mch-g:clamp(16px,5vw,48px);--mch-pt:clamp(32px,4.5vw,64px);--mch-pb:clamp(56px,7vw,104px);--mch-gap:clamp(32px,4vw,56px);--mch-subj-h:clamp(220px,66cqi,520px);--mch-mfs:var(--mch-mast-fs,clamp(1.75rem,calc(min(100cqi - 2 * var(--mch-g),1120px) / (var(--mch-chars,14) * .7)),12rem));--mch-mh:var(--mch-mast-h,calc(var(--mch-mfs) * .9));--mch-marker:var(--marker,#fae37c);--mch-shadow:var(--shadow,oklch(.22 .03 260));position:relative;isolation:isolate;overflow:clip;container:mch / inline-size;background:var(--band);color:var(--band-ink);font-family:var(--font-body)}
.cf-mch *,.cf-mch *::before,.cf-mch *::after{box-sizing:border-box}
.cf-mch-layer{position:absolute;inset:0;z-index:0;pointer-events:none}
.cf-mch-scene{position:absolute;inset:0;inline-size:100%;block-size:100%;object-fit:cover;object-position:50% 40%;filter:grayscale(1) contrast(1.05);opacity:.24}
.cf-mch-scrim{position:absolute;inset:0;background:linear-gradient(180deg,oklch(from var(--band) l c h / .2) 0%,oklch(from var(--band) l c h / .78) 55%,var(--band) 100%)}
.cf-mch-pat{position:absolute;inset-block-start:0;inset-inline-end:0;inline-size:min(72%,900px);block-size:78%}
.cf-mch-photobox{position:absolute;z-index:0;inset-inline:0;inset-block-start:0;block-size:calc(var(--mch-pt) + var(--mch-mh) + var(--mch-subj-h))}
.cf-mch-photo{position:absolute;inset:0;display:block;inline-size:100%;block-size:100%;object-fit:cover;object-position:50% 18%}
.cf-mch-photofade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,oklch(from var(--band) l c h / .6) 0%,oklch(from var(--band) l c h / 0) 32%,oklch(from var(--band) l c h / 0) 62%,var(--band) 100%)}
.cf-mch-in{position:relative;z-index:1;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto var(--mch-subj-h) auto auto auto;max-inline-size:calc(1120px + 2 * var(--mch-g));margin-inline:auto;padding:var(--mch-pt) var(--mch-g) var(--mch-pb)}
.cf-mch[data-subject="none"] .cf-mch-in{grid-template-rows:auto 0 auto auto auto}
.cf-mch-mastbox{grid-row:1;grid-column:1 / -1;position:relative;z-index:1;min-inline-size:0}
.cf-mch-mast{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:var(--mch-mfs);line-height:.86;letter-spacing:-.02em;text-transform:uppercase;text-align:center;color:var(--band-ink);white-space:nowrap}
.cf-mch-mast-t{display:inline-block}
.cf-mch[data-mast="stack"] .cf-mch-mast{white-space:normal;text-wrap:balance}
.cf-mch[data-mast="stack"] .cf-mch-mast-t{display:block}
.cf-mch[data-mast="wrap"] .cf-mch-mast{white-space:normal;text-wrap:balance;overflow-wrap:anywhere;hyphens:auto}
.cf-mch[data-mast="wrap"] .cf-mch-mast-t{display:block}
.cf-mch-subj{grid-row:1 / 3;grid-column:1;position:relative;z-index:2;align-self:end;justify-self:center;inline-size:min(100%,calc(var(--mch-subj-h) + var(--mch-mfs) * .42));margin-top:calc(var(--mch-mh) - var(--mch-mfs) * .42);min-inline-size:0;pointer-events:none}
.cf-mch-subj img{display:block;inline-size:100%;block-size:auto;aspect-ratio:1 / 1;object-fit:contain;object-position:50% 100%;filter:drop-shadow(0 2px 3px oklch(from var(--mch-shadow) l c h / .3)) drop-shadow(0 12px 18px oklch(from var(--mch-shadow) l c h / .3))}
.cf-mch-subj::after{content:"";position:absolute;inset-inline:0;inset-block-end:0;block-size:26%;background:linear-gradient(0deg,var(--band) 0%,oklch(from var(--band) l c h / 0) 100%)}
.cf-mch-main{grid-row:3;grid-column:1;position:relative;z-index:3;min-inline-size:0;margin-top:20px}
.cf-mch[data-subject="none"] .cf-mch-main{margin-top:28px}
.cf-mch-h1{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);font-size:clamp(2.5rem,3.8cqi,3.375rem);line-height:1.04;color:var(--band-ink);text-wrap:balance;overflow-wrap:break-word;hyphens:manual}
.cf-mch-em{display:block;font-size:1.12em;line-height:1.04}
.cf-mch-em-in{display:inline;font-size:1.06em}
.cf-mch-lead{margin:18px 0 0;max-inline-size:38rem;font-size:clamp(1.125rem,1.5cqi,1.375rem);font-weight:500;line-height:1.4;color:var(--band-ink);text-wrap:pretty;overflow-wrap:anywhere}
.cf-mch-proof{margin:16px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--band-ink);text-wrap:pretty}
.cf-mch-ico{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-mch-ico-ok{color:var(--success)}
.cf-mch-lines{grid-row:5;grid-column:1;position:relative;z-index:3;min-inline-size:0;list-style:none;margin:36px 0 0;padding:0}
.cf-mch-line{padding-block:16px;min-inline-size:0;color:var(--band-ink)}
.cf-mch-line:first-child{padding-top:0}
.cf-mch-line + .cf-mch-line{border-top:1px solid oklch(from var(--band-ink) l c h / .2)}
.cf-mch-line-big{display:block;margin-block-end:calc(.34em + 6px);font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-.03em;line-height:1.1;font-variant-numeric:tabular-nums;overflow-wrap:break-word}
.cf-mch-line-t{display:block;font-weight:700;line-height:1.35;text-wrap:pretty;overflow-wrap:break-word}
.cf-mch-line-big + .cf-mch-line-t{margin-top:0}
.cf-mch-line[data-size="xl"] .cf-mch-line-big{font-size:clamp(2.5rem,4.2cqi,3.75rem)}
.cf-mch-line[data-size="xl"] .cf-mch-line-t{font-size:clamp(1.125rem,1.5cqi,1.375rem)}
.cf-mch-line[data-size="lg"] .cf-mch-line-big{font-size:clamp(2rem,3.2cqi,2.75rem)}
.cf-mch-line[data-size="lg"] .cf-mch-line-t,.cf-mch-line[data-size="md"] .cf-mch-line-t{font-size:clamp(1.0625rem,1.25cqi,1.125rem)}
.cf-mch-line[data-size="md"] .cf-mch-line-big,.cf-mch-line[data-size="sm"] .cf-mch-line-big{font-size:clamp(1.3125rem,1.8cqi,1.625rem)}
.cf-mch-line[data-size="sm"] .cf-mch-line-t{font-size:.875rem;font-weight:800;line-height:1.3;letter-spacing:.06em;text-transform:uppercase}
.cf-mch-call{grid-row:4;grid-column:1;position:relative;z-index:3;justify-self:start;inline-size:100%;max-inline-size:30rem;min-inline-size:0;margin-top:28px;padding:clamp(20px,3cqi,28px);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(--mch-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--mch-shadow) l c h / .32)))}
.cf-mch-offer{margin:0 0 16px;font-size:clamp(1.0625rem,1.25cqi,1.125rem);font-weight:600;line-height:1.45;text-wrap:pretty;overflow-wrap:anywhere}
.cf-mch-vlab{margin:0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted)}
.cf-mch-vnum{margin:calc(.16em + 12px) 0 0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-.03em;font-size:clamp(2.5rem,4.2cqi,3.25rem);line-height:1.1;font-variant-numeric:tabular-nums;overflow-wrap:break-word}
.cf-mch-rev{margin:24px 0 0;font-size:clamp(1.125rem,1.5cqi,1.25rem);font-weight:700;line-height:1.4;text-wrap:pretty}
.cf-mch-mark{padding-inline:.18em;margin-inline:-.18em;border-radius:.2em .45em .3em .5em;background:linear-gradient(180deg,transparent 0 44%,var(--mch-marker) 44% 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-mch-today{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px;margin-top:16px;padding:14px 16px;border-radius:10px;background:color-mix(in oklch,var(--ink) 5%,var(--card))}
.cf-mch-tlab{min-inline-size:0;font-size:1.0625rem;font-weight:700;line-height:1.3}
.cf-mch-tnum{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-.03em;font-size:clamp(2.5rem,4.2cqi,3.75rem);line-height:1.05;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-mch-btn{--b:var(--button-bg,var(--cta));--b2:var(--button-bg-2,var(--cta-2));display:flex;align-items:center;justify-content:center;inline-size:100%;min-block-size:64px;margin-top:24px;padding:10px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--b) calc(l + .04) c h),oklch(from var(--b2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);font-size:clamp(1.125rem,1.55cqi,1.375rem);line-height:1.15;text-transform:var(--button-case,none);text-align:center;text-decoration:none;text-wrap:balance;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - .16) c h),0 1px 2px oklch(from var(--mch-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--mch-shadow) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-mch-btn:hover:not(:disabled):not([aria-disabled="true"]),.cf-mch-btn[data-state="hover"]{transform:translateY(-1px);background:linear-gradient(oklch(from var(--b) calc(l - .01) c h),oklch(from var(--b2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--b) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - .2) c h),0 1px 2px oklch(from var(--mch-shadow) l c h / .32),0 10px 18px -6px oklch(from var(--mch-shadow) l c h / .55))}
.cf-mch-btn:active:not(:disabled):not([aria-disabled="true"]),.cf-mch-btn[data-state="active"]{transform:translateY(1px);background:linear-gradient(oklch(from var(--b) calc(l - .06) c h),oklch(from var(--b2) calc(l - .1) c h));box-shadow:inset 0 2px 4px oklch(from var(--mch-shadow) l c h / .35),inset 0 -2px 0 oklch(from var(--b) calc(l - .18) c h),0 1px 2px oklch(from var(--mch-shadow) l c h / .3)}
.cf-mch-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:3px}
.cf-mch-btn:disabled,.cf-mch-btn[aria-disabled="true"]{background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:not-allowed;transform:none}
.cf-mch-note{margin:12px 0 0;text-align:center;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
@keyframes cf-mch-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-mch-rise{animation:cf-mch-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(min(var(--i,0),4) * .07s)}
@container mch (min-width: 980px){
.cf-mch-scrim{background:linear-gradient(90deg,oklch(from var(--band) l c h / .9) 0%,oklch(from var(--band) l c h / .62) 34%,oklch(from var(--band) l c h / 0) 62%),linear-gradient(0deg,oklch(from var(--band) l c h / .75) 0%,oklch(from var(--band) l c h / 0) 42%)}
.cf-mch-photobox{inset-block:0;inset-inline-start:44%;inset-inline-end:0;block-size:auto}
.cf-mch-photofade{background:linear-gradient(90deg,var(--band) 0%,oklch(from var(--band) l c h / 0) 38%),linear-gradient(180deg,oklch(from var(--band) l c h / .6) 0%,oklch(from var(--band) l c h / 0) 30%)}
.cf-mch-in{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto 1fr;column-gap:var(--mch-gap)}
.cf-mch[data-subject="none"] .cf-mch-in{grid-template-rows:auto auto 1fr}
.cf-mch-main{grid-row:2;grid-column:1;margin-top:calc(var(--mch-mfs) * .36 + 12px)}
.cf-mch[data-subject="none"] .cf-mch-main{margin-top:calc(var(--mch-mfs) * .36 + 12px)}
.cf-mch-lines{grid-row:3;grid-column:1;align-self:start;margin-top:40px}
.cf-mch-subj{grid-row:1 / 4;grid-column:2;align-self:start;justify-self:stretch;inline-size:100%}
.cf-mch-subj::after{block-size:18%}
.cf-mch-call{grid-row:3;grid-column:2;align-self:end;justify-self:end;inline-size:min(100%,24rem);margin-top:32px}
.cf-mch[data-subject="none"] .cf-mch-call{grid-row:2 / 4;align-self:start;margin-top:calc(var(--mch-mfs) * .36 + 12px)}
}
@container mch (min-width: 1200px){
.cf-mch-photobox{inset-inline-start:30%;inset-inline-end:16%}
.cf-mch-photofade{background:linear-gradient(90deg,var(--band) 0%,oklch(from var(--band) l c h / 0) 30%,oklch(from var(--band) l c h / 0) 70%,var(--band) 100%),linear-gradient(180deg,oklch(from var(--band) l c h / .6) 0%,oklch(from var(--band) l c h / 0) 30%)}
.cf-mch-in{grid-template-columns:minmax(0,1.45fr) minmax(0,.85fr) minmax(0,21.5rem)}
.cf-mch-subj{grid-column:2 / 4;justify-self:start;inline-size:90%}
.cf-mch-call{grid-row:2 / 4;grid-column:3;align-self:end;justify-self:stretch;inline-size:100%;margin-top:0}
.cf-mch[data-subject="none"] .cf-mch-main,.cf-mch[data-subject="none"] .cf-mch-lines{grid-column:1 / 3}
.cf-mch[data-subject="none"] .cf-mch-call{grid-column:3}
}
@media (prefers-reduced-motion: reduce){
.cf-mch-rise{animation:none}
.cf-mch-btn{transition:none}
.cf-mch-btn:hover:not(:disabled):not([aria-disabled="true"]),.cf-mch-btn[data-state="hover"],.cf-mch-btn:active:not(:disabled):not([aria-disabled="true"]),.cf-mch-btn[data-state="active"]{transform:none}
}
`;
pieces/hero/magazine-cover-hero/specimen.tsx 44 lines
import __studioImagea289dcb8 from "../assets/cff2d5aeb8b7d6aa.webp";
// Specimen: Strong After Forty, a fictional 12-week strength plan for women over forty, staged as a magazine cover.
import { MagazineCoverHero } from "../magazine-cover-hero";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
import gym from "../../fx/backdrops/gym";
export const states = ["default", "hover", "active", "disabled"] as const;
type SpecimenState = (typeof states)[number];
export default function MagazineCoverHeroSpecimen({ state = "default" }: { state?: SpecimenState }) {
const sample = defaults.sample;
return (
<MagazineCoverHero
state={state}
masthead="Strong After Forty"
headline="Get strong again in 20 minutes a day"
headlineEmphasis="Get strong again"
lead="A 12-week coached plan for women over forty: three short lifting sessions a week, simple protein meals and a tracker for your progress."
proof="2,300 women have finished the 12-week plan"
coverLines={[
{ big: "3", text: "lifts that rebuild strength after forty", size: "xl" },
{ big: "20 min", text: "sessions you can do at home", size: "lg" },
{ text: "Why endless cardio stalls your progress", size: "md" },
{ text: "The protein rule nobody told you", size: "sm" },
]}
offerLine="The complete 12-week plan: workouts, protein guide and progress tracker in one download."
valueLabel="Everything inside is worth"
totalValue={sample.regularPrice}
revealLine="But you won't pay that."
priceLabel="Your price today"
price={sample.price}
label="Send me the plan"
note={`Instant download · ${sample.guarantee}`}
presenterCutoutImage={slot(
"presenter-cutout",
__studioImagea289dcb8
)}
presenterAlt="Strength coach in her late forties with her arms folded, smiling at the camera"
sceneImage={slot("scene", gym)}
/>
);
}
| Name | Type | Details |
|---|---|---|
masthead OptionalMagazineCoverHero |
string |
|
headline OptionalMagazineCoverHero |
string |
|
headlineEmphasis OptionalMagazineCoverHero |
string |
|
lead OptionalMagazineCoverHero |
string |
|
proof OptionalMagazineCoverHero |
string |
|
coverLines OptionalMagazineCoverHero |
MagazineCoverLine[] |
|
offerLine OptionalMagazineCoverHero |
string |
|
valueLabel OptionalMagazineCoverHero |
string |
|
totalValue OptionalMagazineCoverHero |
string |
|
revealLine OptionalMagazineCoverHero |
string |
|
priceLabel OptionalMagazineCoverHero |
string |
|
price OptionalMagazineCoverHero |
string |
|
label OptionalMagazineCoverHero |
string |
|
note OptionalMagazineCoverHero |
string |
|
href OptionalMagazineCoverHero |
string |
|
onAction OptionalMagazineCoverHero |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalMagazineCoverHero |
boolean |
|
presenterImage OptionalMagazineCoverHero |
string |
|
presenterCutoutImage OptionalMagazineCoverHero |
string |
|
presenterAlt OptionalMagazineCoverHero |
string |
|
sceneImage OptionalMagazineCoverHero |
string |
|
state OptionalMagazineCoverHero |
"default" | "hover" | "active" | "disabled" |
|
className OptionalMagazineCoverHero |
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-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.
presenter-cutout- The presenter on a transparent background.
scene- A wide atmosphere photo behind or beside the copy.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
cff2d5aeb8b7d6aa.webp
image/webp · 129 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
d6298af761bd1067.webp
image/webp · 41.4 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB