Infomercial Hero 1
Presents the offer like a TV infomercial: the product, the price and one click-now action.
Use it in a prompt
Use attention/infomercial-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/attention/infomercial-hero.tsx. - Import it and pass your copy and images (Props tab):
import { InfomercialHero } from "@/components/funneldna/attention/infomercial-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/attention/infomercial-hero/component.tsx 828 lines
// Presents the offer like a TV infomercial: the product, the price and one click-now action.
// layout: photo-overlap-card
// Infomercial hero: the kit turns once on a lit turntable inside a broadcast frame, the price stamp pops in, the lower third
// crawls the benefits in once, and the offer card breaks the frame with a "Click now" strip that pulses once.
// Theme: every colour is a token or an OKLCH recipe on a token. Documented exception: the yellow marker default (#fae37c) as the last var() fallback.
import * as React from "react";
import { Check, CircleAlert, LockKeyhole, MousePointerClick } from "lucide-react";
export type InfomercialHeroState = "default" | "hover" | "active" | "disabled" | "error";
export type InfomercialStamp = {
/** Small line above the big value, e.g. "Only" */
top?: string;
/** The big value, e.g. "$47" */
value: string;
/** Small line under the big value */
bottom?: string;
};
export type InfomercialHeroProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke */
highlight?: string;
/** The offer card's sub-head */
subhead?: string;
salutation?: string;
/** Short letter paragraphs */
letter?: React.ReactNode[];
signoff?: string;
signature?: string;
productName?: string;
price?: string;
/** Line above the price */
priceLabel?: string;
/** Line beside the price */
priceNote?: string;
/** Per-day breakdown; {perDay} and {days} are replaced */
breakdown?: string;
/** Days the price is spread over in the breakdown */
breakdownDays?: number;
/** Starburst stamps that pop over the broadcast frame (up to 3) */
stamps?: InfomercialStamp[];
/** Corner bug on the broadcast frame */
liveLabel?: string;
/** Tag at the start of the lower third */
tickerLabel?: string;
/** Benefit phrases that crawl into the lower third once */
ticker?: string[];
/** Commit checkbox line above the button */
commitLabel?: string;
/** Inline error when the button is clicked without the tick */
commitError?: string;
/** Button label */
label?: string;
/** Accessible button name; {label}, {name} and {price} are replaced */
actionAriaLabel?: string;
/** One reassurance line under the button */
sublabel?: string;
/** Product shot on a transparent background (slot: product) */
productImage?: string;
productAlt?: string;
/** Studio backdrop photo, tinted by the band colour (slot: scene) */
sceneImage?: string;
/** Starburst silhouette on a transparent background, used as the stamp shape (slot: stamp) */
burstImage?: string;
href?: string;
onAction?: () => void;
disabled?: boolean;
state?: InfomercialHeroState;
className?: string;
};
const DEFAULT_LETTER: React.ReactNode[] = [
"You don't need another theory. You need a plan you can follow, one page at a time.",
"Get the guide, workbook, and checklist in one download. One payment. Yours to keep.",
];
const DEFAULT_TICKER = ["Plan your funnel", "Write your copy", "Check your launch"];
const STAMP_SPOTS = [
{ left: "3%", top: "15%", size: 1, tilt: -9 },
{ left: "57%", top: "-5%", size: 0.86, tilt: 8 },
{ left: "31%", top: "-3%", size: 0.78, tilt: -5 },
];
export function InfomercialHero(props: InfomercialHeroProps) {
const {
headline = "Build your first funnel with a clear plan",
highlight = "a clear plan",
subhead = "But wait, there's more!",
salutation = "Dear friend,",
letter = DEFAULT_LETTER,
signoff = "Talk soon,",
signature = "The Funnel Starter Kit team",
productName = "The Funnel Starter Kit",
price = "$47",
priceLabel = "Get the complete kit for",
priceNote = "One payment · Lifetime access",
breakdown = "Works out to about {perDay} a day across your {days}-day guarantee.",
breakdownDays = 30,
stamps,
liveLabel = "Live",
tickerLabel = "One download",
ticker = DEFAULT_TICKER,
commitLabel = "I understand I'm covered by the 30-day money-back guarantee.",
commitError = "Tick the box to confirm, then click again.",
label = "Click now",
actionAriaLabel = "{label}: get {name} for {price}",
sublabel = "",
productImage,
productAlt = "The Funnel Starter Kit: planning guide, copy workbook and launch checklist",
sceneImage,
burstImage,
href,
onAction,
disabled = false,
state,
className,
} = props;
const uid = React.useId();
const headId = `${uid}-headline`;
const tagId = `${uid}-ticker`;
const boxId = `${uid}-commit`;
const errId = `${uid}-error`;
const boxRef = React.useRef<HTMLInputElement>(null);
const [committed, setCommitted] = React.useState(state !== "error");
const [showError, setShowError] = React.useState(state === "error");
React.useEffect(() => {
if (state === undefined) return;
setCommitted(state !== "error");
setShowError(state === "error");
}, [state]);
const isDisabled = disabled || state === "disabled";
const perDay = perDayOf(price, breakdownDays);
const stampList = (stamps ?? [{ top: "Only", value: price }]).slice(0, STAMP_SPOTS.length);
const ariaLabel = fill(actionAriaLabel, { label, name: productName, price });
const mask = burstImage
? ({
WebkitMaskImage: `url(${JSON.stringify(burstImage)})`,
maskImage: `url(${JSON.stringify(burstImage)})`,
} as React.CSSProperties)
: undefined;
const handleAction = (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled) {
event.preventDefault();
return;
}
if (!committed) {
event.preventDefault();
setShowError(true);
boxRef.current?.focus();
return;
}
onAction?.();
};
const buttonClass = ["ih-btn", state === "hover" ? "is-hover" : "", state === "active" ? "is-active" : ""]
.filter(Boolean)
.join(" ");
const buttonBody = (
<>
<span className="ih-btn-icon" aria-hidden="true">
<span>
<MousePointerClick strokeWidth={2.5} />
</span>
</span>
<span className="ih-btn-main">{label}</span>
<span className="ih-btn-price">{price}</span>
</>
);
return (
<section className={`cf-infomercial-hero${className ? ` ${className}` : ""}`} aria-labelledby={headId}>
<style>{CSS}</style>
<h1 id={headId} className="ih-headline">
{markPhrase(headline, highlight)}
</h1>
<div className="ih-stage">
<div className="ih-visual">
<div className="ih-frame">
<div className="ih-screen">
<div className="ih-screen-inner">
{sceneImage ? <img className="ih-scene" src={sceneImage} alt="" decoding="async" /> : null}
<span className="ih-tint" aria-hidden="true" />
<span className="ih-spot" aria-hidden="true" />
<span className="ih-beam" aria-hidden="true" />
<span className="ih-table" aria-hidden="true">
<span className="ih-table-shadow" />
<span className="ih-rim" />
<span className="ih-disc" />
</span>
{productImage ? (
<img className="ih-product" src={productImage} alt={productAlt} decoding="async" />
) : null}
<span className="ih-scan" aria-hidden="true" />
</div>
{liveLabel ? (
<span className="ih-live" aria-hidden="true">
<i />
{liveLabel}
</span>
) : null}
</div>
{ticker.length ? (
<div className="ih-lower">
{tickerLabel ? (
<span className="ih-lower-tag" id={tagId}>
{tickerLabel}
</span>
) : null}
<div className="ih-ticker">
<ul className="ih-track" aria-labelledby={tickerLabel ? tagId : undefined}>
{ticker.map((item, index) => (
<li key={`${index}-${item}`} style={{ "--i": index } as React.CSSProperties}>
{item}
</li>
))}
</ul>
</div>
</div>
) : null}
</div>
{stampList.length ? (
<div className="ih-stamps" aria-hidden="true">
{stampList.map((stamp, index) => {
const spot = STAMP_SPOTS[index];
const len = stamp.value.length;
const valueSize = len <= 2 ? 40 : len <= 3 ? 31 : len <= 4 ? 25 : 19;
const tone = index % 2 === 0 ? "action" : "accent";
return (
<div
key={`${index}-${stamp.value}`}
className={`ih-stamp ih-stamp--${tone}${burstImage ? "" : " is-round"}`}
style={
{
left: spot.left,
top: spot.top,
"--i": index,
"--s": spot.size,
"--tilt": `${spot.tilt}deg`,
} as React.CSSProperties
}
>
<span className="ih-burst" style={mask} />
<span className="ih-burst ih-burst--inner" style={mask} />
<span className="ih-stamp-text">
{stamp.top ? <small>{stamp.top}</small> : null}
<b style={{ fontSize: `${valueSize}cqi` }}>{stamp.value}</b>
{stamp.bottom ? <small>{stamp.bottom}</small> : null}
</span>
</div>
);
})}
</div>
) : null}
</div>
<div className="ih-card">
<h2 className="ih-subhead">{subhead}</h2>
<div className="ih-letter">
<p className="ih-salute">{salutation}</p>
{letter.map((paragraph, index) => (
<p key={index}>{paragraph}</p>
))}
<div className="ih-sign">
<span>{signoff}</span>
<strong>{signature}</strong>
</div>
</div>
<div className="ih-price">
<p className="ih-price-label">{priceLabel}</p>
<p className="ih-amount">{price}</p>
<div className="ih-price-detail">
<p className="ih-price-note">{priceNote}</p>
{perDay ? (
<p className="ih-perday">
{renderTemplate(breakdown, { perDay: <strong>{perDay}</strong>, days: String(breakdownDays) })}
</p>
) : null}
</div>
</div>
<div className="ih-action">
<label className={`ih-commit${showError ? " is-error" : ""}`} htmlFor={boxId}>
<input
ref={boxRef}
id={boxId}
className="ih-input"
type="checkbox"
checked={committed}
aria-invalid={showError || undefined}
aria-describedby={showError ? errId : undefined}
onChange={(event) => {
setCommitted(event.target.checked);
if (event.target.checked) setShowError(false);
}}
/>
<span className="ih-tick" aria-hidden="true">
<Check strokeWidth={3} />
</span>
<span>{commitLabel}</span>
</label>
{showError ? (
<p id={errId} className="ih-error" role="alert">
<CircleAlert aria-hidden="true" strokeWidth={2.5} />
<span>{commitError}</span>
</p>
) : null}
{href ? (
<a
className={buttonClass}
href={isDisabled ? undefined : href}
role={isDisabled ? "link" : undefined}
aria-disabled={isDisabled || undefined}
aria-label={ariaLabel}
onClick={handleAction}
>
{buttonBody}
</a>
) : (
<button type="button" className={buttonClass} disabled={isDisabled} aria-label={ariaLabel} onClick={handleAction}>
{buttonBody}
</button>
)}
{sublabel ? (
<p className="ih-sub">
<LockKeyhole aria-hidden="true" strokeWidth={2.5} />
{sublabel}
</p>
) : null}
</div>
</div>
</div>
</section>
);
}
export default InfomercialHero;
function markPhrase(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text;
const at = text.toLowerCase().indexOf(phrase.toLowerCase());
if (at < 0) return text;
const end = at + phrase.length;
return (
<>
{text.slice(0, at)}
<span className="ih-mark">{text.slice(at, end)}</span>
{text.slice(end)}
</>
);
}
function perDayOf(price: string, days: number): string | null {
if (!days || days <= 0) return null;
const match = price.trim().match(/^([^0-9]*)([0-9,]+(?:[.][0-9]+)?)([^0-9]*)$/);
if (!match) return null;
const amount = Number(match[2].split(",").join(""));
if (!Number.isFinite(amount) || amount <= 0) return null;
return `${match[1]}${(amount / days).toFixed(2)}${match[3]}`;
}
function fill(template: string, values: Record<string, string>): string {
return template.replace(/[{]([a-zA-Z]+)[}]/g, (whole: string, key: string) => (key in values ? values[key] : whole));
}
function renderTemplate(template: string, values: Record<string, React.ReactNode>): React.ReactNode[] {
return template.split(/([{][a-zA-Z]+[}])/).map((part, index) => {
const key = part.startsWith("{") && part.endsWith("}") ? part.slice(1, -1) : "";
return <React.Fragment key={index}>{key && key in values ? values[key] : part}</React.Fragment>;
});
}
const CSS = `
@property --ih-spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.cf-infomercial-hero {
--ih-r: var(--radius, 12px);
--ih-overlap: 3.5rem;
--ih-ink: var(--ink, #101828);
--ih-muted: var(--muted, #475467);
--ih-card: var(--card, #ffffff);
--ih-band: var(--band, #13213d);
--ih-band-ink: var(--band-ink, #ffffff);
--ih-shadow: var(--shadow, oklch(0.22 0.03 260));
--ih-cta: var(--button-bg, var(--cta, #d92d20));
--ih-cta-2: var(--button-bg-2, var(--cta-2, #b42318));
--ih-cta-ink: var(--button-ink, var(--cta-ink, #ffffff));
--ih-accent: var(--accent, #2563eb);
--ih-fill: var(--accent-fill, var(--ih-accent));
--ih-fill-ink: var(--accent-fill-ink, var(--ih-card));
--ih-focus: var(--field-focus, var(--ih-accent));
--ih-marker: color-mix(in oklch, var(--marker, #fae37c) 80%, transparent);
position: relative;
width: 100%;
max-width: 75rem;
margin-inline: auto;
color: var(--ih-ink);
font-family: var(--font-body, system-ui, sans-serif);
}
.cf-infomercial-hero *, .cf-infomercial-hero *::before, .cf-infomercial-hero *::after { box-sizing: border-box; }
.cf-infomercial-hero .ih-headline {
margin: 0 0 clamp(2rem, 4vw, 3rem);
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
letter-spacing: var(--display-tracking, -0.025em);
font-size: clamp(2.5rem, 5.4vw, 4.875rem);
line-height: 1.04;
text-align: center;
text-wrap: balance;
color: var(--ih-ink);
}
.cf-infomercial-hero .ih-mark {
color: var(--marker-ink, var(--ih-ink));
background-image: linear-gradient(var(--ih-marker), var(--ih-marker));
background-repeat: no-repeat;
background-position: 0 88%;
background-size: 100% 0.62em;
padding-inline: 0.08em;
border-radius: 0.2em 0.45em 0.3em 0.5em;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-infomercial-hero .ih-stage {
display: grid;
grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
align-items: start;
}
.cf-infomercial-hero .ih-visual { position: relative; grid-column: 1; grid-row: 1; min-width: 0; }
.cf-infomercial-hero .ih-frame {
position: relative;
padding: clamp(0.5rem, 0.9vw, 0.75rem);
border-radius: calc(var(--ih-r) + 6px);
background: var(--ih-band);
box-shadow:
inset 0 1px 0 oklch(from var(--ih-band) calc(l + 0.14) c h),
inset 0 0 0 1px oklch(from var(--ih-band-ink) l c h / 0.1),
var(--shadow-lg, 0 2px 4px oklch(from var(--ih-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--ih-shadow) l c h / 0.32));
}
.cf-infomercial-hero .ih-screen {
position: relative;
aspect-ratio: 16 / 10.5;
overflow: hidden;
border-radius: var(--ih-r);
background: oklch(from var(--ih-band) calc(l - 0.07) c h);
}
.cf-infomercial-hero .ih-screen-inner { position: absolute; inset: 0; perspective: 1000px; }
.cf-infomercial-hero .ih-scene {
position: absolute; inset: 0; width: 100%; height: 100%;
object-fit: cover; object-position: 50% 40%;
filter: grayscale(1) contrast(1.1);
}
.cf-infomercial-hero .ih-tint { position: absolute; inset: 0; background: oklch(from var(--ih-band) l c h / 0.66); }
.cf-infomercial-hero .ih-spot {
position: absolute; left: calc(50% - var(--ih-overlap) / 2); bottom: 8%; width: 74%; aspect-ratio: 1.6;
translate: -50% 0;
background: radial-gradient(closest-side, oklch(from var(--ih-band-ink) l c h / 0.14), transparent);
}
.cf-infomercial-hero .ih-beam {
position: absolute; top: -8%; left: calc(50% - var(--ih-overlap) / 2); width: 44%; height: 96%;
translate: -50% 0; transform-origin: 50% 0;
background: linear-gradient(to bottom, oklch(from var(--ih-band-ink) l c h / 0.16), transparent 85%);
clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
}
.cf-infomercial-hero .ih-table {
position: absolute; left: calc(50% - var(--ih-overlap) / 2); bottom: 5%; width: 68%; aspect-ratio: 4 / 1.3;
translate: -50% 0;
}
.cf-infomercial-hero .ih-table-shadow {
position: absolute; left: 3%; right: 3%; bottom: -8%; height: 40%; border-radius: 50%;
background: oklch(from var(--ih-shadow) l c h / 0.6); filter: blur(5px);
}
.cf-infomercial-hero .ih-rim {
position: absolute; inset: 16% 0 0; border-radius: 50%;
background: linear-gradient(to bottom, oklch(from var(--ih-band) calc(l + 0.18) c h), oklch(from var(--ih-band) calc(l - 0.02) c h) 70%);
box-shadow: inset 0 -2px 0 oklch(from var(--ih-band-ink) l c h / 0.22);
}
.cf-infomercial-hero .ih-disc {
position: absolute; inset: 0 0 16%; border-radius: 50%;
background: conic-gradient(from var(--ih-spin),
oklch(from var(--ih-band) calc(l + 0.22) c h) 0deg,
oklch(from var(--ih-band) calc(l + 0.05) c h) 50deg,
oklch(from var(--ih-band) calc(l + 0.30) c h) 100deg,
oklch(from var(--ih-band) calc(l + 0.08) c h) 170deg,
oklch(from var(--ih-band) calc(l + 0.26) c h) 230deg,
oklch(from var(--ih-band) calc(l + 0.04) c h) 300deg,
oklch(from var(--ih-band) calc(l + 0.22) c h) 360deg);
box-shadow: inset 0 0 0 1px oklch(from var(--ih-band-ink) l c h / 0.35), inset 0 2px 0 oklch(from var(--ih-band-ink) l c h / 0.3);
}
.cf-infomercial-hero .ih-disc::before {
content: ''; position: absolute; inset: 16% 12%; border-radius: 50%;
border: 1px solid oklch(from var(--ih-band-ink) l c h / 0.18);
}
.cf-infomercial-hero .ih-disc::after {
content: ''; position: absolute; inset: 0; border-radius: 50%;
background: radial-gradient(ellipse 60% 70% at 38% 30%, oklch(from var(--ih-band-ink) l c h / 0.22), transparent 70%);
}
.cf-infomercial-hero .ih-product {
position: absolute; left: calc(50% - var(--ih-overlap) / 2); bottom: 16%; width: 50%; height: auto; aspect-ratio: 1;
translate: -50% 0;
object-fit: contain; object-position: 50% 100%;
filter: drop-shadow(0 2px 3px oklch(from var(--ih-shadow) l c h / 0.45)) drop-shadow(0 12px 12px oklch(from var(--ih-shadow) l c h / 0.35));
}
.cf-infomercial-hero .ih-scan {
position: absolute; inset: 0; pointer-events: none;
background:
repeating-linear-gradient(to bottom, oklch(from var(--ih-band-ink) l c h / 0.04) 0 1px, transparent 1px 3px),
radial-gradient(ellipse 80% 75% at 50% 45%, transparent 55%, oklch(from var(--ih-shadow) l c h / 0.5));
}
.cf-infomercial-hero .ih-live {
position: absolute; z-index: 3;
top: clamp(0.6rem, 1.4vw, 1rem); left: clamp(0.6rem, 1.4vw, 1rem);
display: inline-flex; align-items: center; gap: 0.5rem;
min-height: 1.75rem; padding: 0.25rem 0.75rem;
border-radius: 999px;
background: oklch(from var(--ih-band) calc(l - 0.1) c h);
box-shadow: inset 0 0 0 1px oklch(from var(--ih-band-ink) l c h / 0.22);
color: var(--ih-band-ink);
font-family: var(--font-display, var(--font-body, system-ui, sans-serif)); font-weight: 800; font-size: 0.875rem; line-height: 1.2;
letter-spacing: 0.08em; text-transform: uppercase;
}
.cf-infomercial-hero .ih-live i { display: block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ih-cta); }
.cf-infomercial-hero .ih-lower {
display: flex; align-items: stretch;
margin-top: clamp(0.5rem, 0.9vw, 0.75rem); min-height: 3rem;
overflow: hidden; border-radius: calc(var(--ih-r) * 0.75);
background: oklch(from var(--ih-band) calc(l - 0.07) c h);
box-shadow: inset 0 0 0 1px oklch(from var(--ih-band-ink) l c h / 0.08);
}
.cf-infomercial-hero .ih-lower-tag {
position: relative; z-index: 1;
flex: none; display: flex; align-items: center; padding: 0.5rem 1rem;
background: var(--ih-fill); color: var(--ih-fill-ink);
font-family: var(--font-display, var(--font-body, system-ui, sans-serif)); font-weight: 800; font-size: 0.875rem; line-height: 1.2;
letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.cf-infomercial-hero .ih-ticker {
flex: 1 1 auto; min-width: 0; display: flex; align-items: center; overflow: hidden;
margin-inline-end: var(--ih-overlap);
padding: 0.625rem 1rem;
}
.cf-infomercial-hero .ih-track {
display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 1.25rem;
margin: 0; padding: 0; list-style: none;
color: var(--ih-band-ink);
font-family: var(--font-display, var(--font-body, system-ui, sans-serif)); font-weight: 800; font-size: 0.875rem; line-height: 1.25;
letter-spacing: 0.05em; text-transform: uppercase;
}
.cf-infomercial-hero .ih-track li { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.cf-infomercial-hero .ih-track li::before {
content: ''; flex: none; display: block; width: 0.45rem; height: 0.45rem; rotate: 45deg;
border-radius: 1px;
background: oklch(from var(--ih-fill) max(l, 0.78) c h);
}
.cf-infomercial-hero .ih-stamps { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.cf-infomercial-hero .ih-stamp {
position: absolute; width: calc(clamp(6.75rem, 13vw, 9.75rem) * var(--s, 1)); aspect-ratio: 1;
container-type: inline-size; rotate: var(--tilt, 0deg);
filter: drop-shadow(0 2px 2px oklch(from var(--ih-shadow) l c h / 0.4)) drop-shadow(0 8px 8px oklch(from var(--ih-shadow) l c h / 0.3));
}
.cf-infomercial-hero .ih-burst {
position: absolute; inset: 0;
-webkit-mask-size: contain; mask-size: contain;
-webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
-webkit-mask-position: center; mask-position: center;
}
.cf-infomercial-hero .ih-stamp.is-round .ih-burst { border-radius: 50%; }
.cf-infomercial-hero .ih-stamp--action .ih-burst { background: oklch(from var(--ih-cta) calc(l - 0.13) c h); }
.cf-infomercial-hero .ih-stamp--action .ih-burst--inner {
inset: 6.5%;
background: radial-gradient(circle at 34% 28%, oklch(from var(--ih-cta) calc(l + 0.08) c h), var(--ih-cta) 55%, oklch(from var(--ih-cta) calc(l - 0.04) c h));
}
.cf-infomercial-hero .ih-stamp--action .ih-stamp-text { color: var(--ih-cta-ink); text-shadow: var(--button-text-shadow, none); }
.cf-infomercial-hero .ih-stamp--accent .ih-burst { background: oklch(from var(--ih-fill) calc(l - 0.13) c h); }
.cf-infomercial-hero .ih-stamp--accent .ih-burst--inner {
inset: 6.5%;
background: radial-gradient(circle at 34% 28%, oklch(from var(--ih-fill) calc(l + 0.06) c h), var(--ih-fill) 55%, oklch(from var(--ih-fill) calc(l - 0.04) c h));
}
.cf-infomercial-hero .ih-stamp--accent .ih-stamp-text { color: var(--ih-fill-ink); }
.cf-infomercial-hero .ih-stamp-text {
position: absolute; inset: 15%;
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1cqi;
text-align: center; font-family: var(--font-display, var(--font-body, system-ui, sans-serif)); text-transform: uppercase; line-height: 0.92;
}
.cf-infomercial-hero .ih-stamp-text small { font-size: max(0.8125rem, 13cqi); font-weight: 800; letter-spacing: 0.04em; }
.cf-infomercial-hero .ih-stamp-text b { font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cf-infomercial-hero .ih-card {
position: relative; z-index: 3; grid-column: 2; grid-row: 1; min-width: 0;
margin-top: clamp(1.5rem, 3vw, 2.5rem);
margin-inline-start: calc(var(--ih-overlap) * -1);
padding: clamp(1.25rem, 3vw, 2rem);
background: var(--ih-card);
color: var(--ih-ink);
border: 1px solid var(--card-border, oklch(from var(--ih-ink) l c h / 0.12));
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--ih-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--ih-shadow) l c h / 0.32)));
}
.cf-infomercial-hero .ih-subhead {
margin: 0 0 1rem;
font-family: var(--font-display, var(--font-body, system-ui, sans-serif));
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
letter-spacing: var(--display-tracking, -0.025em);
font-size: clamp(2rem, 3.6vw, 3.25rem);
line-height: 1.06;
text-wrap: balance;
color: var(--ih-ink);
}
.cf-infomercial-hero .ih-letter { max-width: 64ch; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.5; }
.cf-infomercial-hero .ih-letter p { margin: 0 0 0.75rem; text-wrap: pretty; }
.cf-infomercial-hero .ih-salute { font-weight: 700; }
.cf-infomercial-hero .ih-sign { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 1rem; }
.cf-infomercial-hero .ih-sign span { color: var(--ih-muted); }
.cf-infomercial-hero .ih-sign strong { font-family: var(--font-display, var(--font-body, system-ui, sans-serif)); font-weight: 800; font-size: 1.125rem; line-height: 1.3; color: var(--ih-ink); }
.cf-infomercial-hero .ih-price {
display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.5rem 1.25rem;
margin-top: 1.5rem; padding: 1rem 1.25rem 1.125rem;
border-radius: 10px;
background: color-mix(in oklch, var(--ih-ink) 4%, var(--ih-card));
}
.cf-infomercial-hero .ih-price p { margin: 0; }
.cf-infomercial-hero .ih-price-label { grid-column: 1 / -1; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--ih-muted); }
.cf-infomercial-hero .ih-amount {
font-family: var(--font-display, var(--font-body, system-ui, sans-serif)); font-weight: 800;
font-size: clamp(2.5rem, 4.2vw, 3.75rem); line-height: 1; letter-spacing: -0.03em;
font-variant-numeric: tabular-nums; color: var(--ih-ink);
}
.cf-infomercial-hero .ih-price-detail { display: grid; gap: 0.25rem; min-width: 0; }
.cf-infomercial-hero .ih-price-note { font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--ih-ink); text-wrap: pretty; }
.cf-infomercial-hero .ih-perday { font-size: 0.9375rem; line-height: 1.4; color: var(--ih-muted); text-wrap: pretty; }
.cf-infomercial-hero .ih-perday strong { font-weight: 800; color: var(--ih-ink); }
.cf-infomercial-hero .ih-action { margin-top: 1.25rem; container-type: inline-size; }
.cf-infomercial-hero .ih-commit {
position: relative; display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer;
font-size: 1rem; font-weight: 600; line-height: 1.45; color: var(--label-ink, var(--ih-ink)); text-wrap: pretty;
}
.cf-infomercial-hero .ih-input {
position: absolute; top: 0; left: 0; width: 1.5rem; height: 1.5rem; margin: 0; opacity: 0; cursor: pointer;
background: var(--field, #ffffff); color: var(--field-ink, var(--ih-ink));
accent-color: var(--field-focus, var(--ih-accent));
}
.cf-infomercial-hero .ih-tick {
flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem;
border-radius: 6px;
border: 2px solid var(--field-border, color-mix(in oklch, var(--ih-ink) 35%, transparent));
background: var(--field, #ffffff); color: transparent;
}
.cf-infomercial-hero .ih-tick svg { width: 1rem; height: 1rem; }
.cf-infomercial-hero .ih-input:checked + .ih-tick {
background: var(--success, #15803d); border-color: var(--success, #15803d);
color: oklch(from var(--success, #15803d) clamp(0, (0.565 - l) * 1000, 1) 0 0);
}
.cf-infomercial-hero .ih-commit:hover .ih-input:not(:checked) + .ih-tick { border-color: var(--ih-focus); }
.cf-infomercial-hero .ih-input:focus-visible + .ih-tick { outline: 3px solid oklch(from var(--ih-focus) l c h / 0.55); outline-offset: 2px; }
.cf-infomercial-hero .ih-commit.is-error .ih-tick { border-color: var(--danger, #b42318); }
.cf-infomercial-hero .ih-error {
display: flex; align-items: flex-start; gap: 0.5rem;
margin: 0.75rem 0 0; padding: 0.5rem 0.75rem;
border-radius: 10px;
background: var(--danger-soft, #fde8e6);
color: var(--danger, #b42318);
font-size: 0.9375rem; font-weight: 700; line-height: 1.4;
}
.cf-infomercial-hero .ih-error svg { flex: none; width: 1rem; height: 1rem; margin-top: 0.15rem; }
.cf-infomercial-hero .ih-btn {
position: relative; display: flex; align-items: stretch; width: 100%; min-height: 4.5rem;
margin-top: 1rem; padding: 0; border: 0;
border-radius: var(--button-radius, var(--ih-r));
background: linear-gradient(oklch(from var(--ih-cta) calc(l + 0.04) c h), oklch(from var(--ih-cta-2) calc(l - 0.02) c h));
color: var(--ih-cta-ink);
font-family: var(--button-font, var(--font-display, var(--font-body, system-ui, sans-serif)));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, uppercase);
text-decoration: none;
text-shadow: var(--button-text-shadow, none);
cursor: pointer;
-webkit-tap-highlight-color: transparent;
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--ih-cta) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--ih-cta) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--ih-shadow) l c h / 0.3), 0 8px 16px -6px oklch(from var(--ih-shadow) l c h / 0.45));
}
.cf-infomercial-hero .ih-btn:hover:not(:disabled):not([aria-disabled='true']),
.cf-infomercial-hero .ih-btn.is-hover {
background: linear-gradient(oklch(from var(--ih-cta) calc(l - 0.01) c h), oklch(from var(--ih-cta-2) calc(l - 0.07) c h));
transform: translateY(-1px);
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--ih-cta) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--ih-cta) calc(l - 0.2) c h), 0 2px 3px oklch(from var(--ih-shadow) l c h / 0.32), 0 12px 20px -6px oklch(from var(--ih-shadow) l c h / 0.5));
}
.cf-infomercial-hero .ih-btn:active:not(:disabled):not([aria-disabled='true']),
.cf-infomercial-hero .ih-btn.is-active {
background: linear-gradient(oklch(from var(--ih-cta) calc(l - 0.08) c h), oklch(from var(--ih-cta-2) calc(l - 0.08) c h));
transform: translateY(1px);
box-shadow: inset 0 2px 3px oklch(from var(--ih-shadow) l c h / 0.3), inset 0 -2px 0 oklch(from var(--ih-cta) calc(l - 0.2) c h), 0 1px 1px oklch(from var(--ih-shadow) l c h / 0.3);
}
.cf-infomercial-hero .ih-btn:focus-visible { outline: 3px solid var(--ih-focus); outline-offset: 3px; }
.cf-infomercial-hero .ih-btn:disabled,
.cf-infomercial-hero .ih-btn[aria-disabled='true'] {
cursor: not-allowed; transform: none; text-shadow: none;
background: var(--button-2-bg, var(--secondary, #e4e7ec));
color: var(--button-2-ink, var(--secondary-ink, #101828));
box-shadow: var(--button-2-shadow, var(--shadow-sm));
}
.cf-infomercial-hero .ih-btn:disabled .ih-btn-icon > span,
.cf-infomercial-hero .ih-btn[aria-disabled='true'] .ih-btn-icon > span,
.cf-infomercial-hero .ih-btn:disabled .ih-btn-price,
.cf-infomercial-hero .ih-btn[aria-disabled='true'] .ih-btn-price {
background: color-mix(in oklch, var(--ih-ink) 8%, var(--button-2-bg, var(--secondary, #e4e7ec)));
box-shadow: none;
}
.cf-infomercial-hero .ih-btn-icon { flex: none; display: grid; place-items: center; width: 4.25rem; padding-bottom: 3px; }
.cf-infomercial-hero .ih-btn-icon > span {
display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
background: oklch(from var(--ih-cta) calc(l - 0.1) c h);
box-shadow: inset 0 2px 2px oklch(from var(--ih-shadow) l c h / 0.3), inset 0 -1px 0 oklch(from var(--ih-cta) calc(l + 0.1) c h / 0.6);
}
.cf-infomercial-hero .ih-btn-icon svg { width: 1.25rem; height: 1.25rem; }
.cf-infomercial-hero .ih-btn-main {
flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center;
padding: 0.75rem 0.5rem calc(0.75rem + 3px);
font-size: clamp(1.25rem, 7cqi, 2rem); line-height: 1; letter-spacing: 0.02em; white-space: nowrap;
}
.cf-infomercial-hero .ih-btn-price {
flex: none; display: flex; align-items: center; justify-content: center;
padding: 0 clamp(0.875rem, 4cqi, 1.25rem) 3px;
border-radius: 0 var(--button-radius, var(--ih-r)) var(--button-radius, var(--ih-r)) 0;
background: oklch(from var(--ih-cta-2) calc(l - 0.05) c h);
box-shadow: inset 1px 0 0 oklch(from var(--ih-cta) calc(l + 0.12) c h / 0.45), inset 0 -3px 0 oklch(from var(--ih-cta-2) calc(l - 0.12) c h);
font-size: clamp(1.125rem, 5.2cqi, 1.5rem); font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.cf-infomercial-hero .ih-sub {
margin: 0.75rem 0 0;
font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--ih-muted);
text-align: center; text-wrap: pretty;
}
.cf-infomercial-hero .ih-sub svg {
display: inline-block; vertical-align: -0.15em; margin-inline-end: 0.4em;
width: 1rem; height: 1rem; color: var(--success, #15803d);
}
@media (max-width: 900px) {
.cf-infomercial-hero { --ih-overlap: 0rem; }
.cf-infomercial-hero .ih-stage { grid-template-columns: minmax(0, 1fr); }
.cf-infomercial-hero .ih-frame { padding-bottom: 2rem; }
.cf-infomercial-hero .ih-card {
grid-column: 1; grid-row: 2; justify-self: center;
width: min(calc(100% - 1rem), 40rem);
margin: -1.5rem 0 0;
}
}
@media (max-width: 560px) {
.cf-infomercial-hero .ih-headline { margin-bottom: 1.5rem; }
.cf-infomercial-hero .ih-screen { aspect-ratio: 4 / 3; }
.cf-infomercial-hero .ih-table { width: 76%; }
.cf-infomercial-hero .ih-product { width: 58%; bottom: 15%; }
.cf-infomercial-hero .ih-lower { flex-direction: column; }
.cf-infomercial-hero .ih-lower-tag { padding: 0.5rem 0.875rem; }
.cf-infomercial-hero .ih-ticker { padding: 0.625rem 0.875rem; }
.cf-infomercial-hero .ih-track { gap: 0.375rem 1rem; }
.cf-infomercial-hero .ih-card { padding: 1.25rem; }
.cf-infomercial-hero .ih-price { padding: 0.875rem 1rem 1rem; gap: 0.5rem 1rem; }
.cf-infomercial-hero .ih-btn-icon { width: 3.25rem; }
.cf-infomercial-hero .ih-btn-icon > span { width: 2.25rem; height: 2.25rem; }
.cf-infomercial-hero .ih-btn-icon svg { width: 1.125rem; height: 1.125rem; }
}
@keyframes cf-ih-mark { from { background-size: 0% 0.62em; } to { background-size: 100% 0.62em; } }
@keyframes cf-ih-power {
0% { clip-path: inset(49% 0 49% 0); filter: brightness(1.8); }
40% { clip-path: inset(0 0 0 0); filter: brightness(1.25); }
100% { clip-path: inset(0 0 0 0); filter: none; }
}
@keyframes cf-ih-beam { from { transform: rotate(-24deg); opacity: 0.4; } to { transform: rotate(0deg); opacity: 1; } }
@keyframes cf-ih-spin { from { --ih-spin: 0deg; } to { --ih-spin: 540deg; } }
@keyframes cf-ih-present {
0% { opacity: 0; transform: translateY(10%) rotateY(-26deg) scale(0.94); }
30% { opacity: 1; }
68% { transform: translateY(0) rotateY(9deg) scale(1.01); }
100% { opacity: 1; transform: none; }
}
@keyframes cf-ih-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
@keyframes cf-ih-pop {
0% { opacity: 0; transform: scale(0.2) rotate(-30deg); }
60% { opacity: 1; transform: scale(1.1) rotate(5deg); }
100% { opacity: 1; transform: none; }
}
@keyframes cf-ih-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes cf-ih-crawl { from { opacity: 0; transform: translateX(2rem); } to { opacity: 1; transform: none; } }
@keyframes cf-ih-pulse { 0%, 100% { transform: none; } 45% { transform: scale(1.03); } }
@media (prefers-reduced-motion: no-preference) {
.cf-infomercial-hero .ih-mark { animation: cf-ih-mark 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both; }
.cf-infomercial-hero .ih-screen-inner { animation: cf-ih-power 0.7s ease-out both; }
.cf-infomercial-hero .ih-beam { animation: cf-ih-beam 2.4s cubic-bezier(0.25, 0.7, 0.3, 1) 0.3s both; }
.cf-infomercial-hero .ih-disc { animation: cf-ih-spin 5.5s cubic-bezier(0.22, 0.7, 0.25, 1) 0.25s both; }
.cf-infomercial-hero .ih-product { animation: cf-ih-present 2.6s cubic-bezier(0.22, 0.8, 0.3, 1) 0.35s both; }
.cf-infomercial-hero .ih-live i { animation: cf-ih-blink 0.9s ease-in-out 0.4s 3; }
.cf-infomercial-hero .ih-stamp { animation: cf-ih-pop 0.6s cubic-bezier(0.3, 1.45, 0.55, 1) calc(0.75s + var(--i, 0) * 0.4s) both; }
.cf-infomercial-hero .ih-lower-tag { animation: cf-ih-wipe 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) 0.7s both; }
.cf-infomercial-hero .ih-track li { animation: cf-ih-crawl 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.9s + var(--i, 0) * 0.14s) both; }
.cf-infomercial-hero .ih-btn {
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
animation: cf-ih-pulse 0.7s ease-in-out 2.4s 1;
}
.cf-infomercial-hero .ih-btn:disabled,
.cf-infomercial-hero .ih-btn[aria-disabled='true'] { animation: none; }
.cf-infomercial-hero .ih-tick { transition: background-color 0.16s ease, border-color 0.16s ease; }
}
`;
pieces/attention/infomercial-hero/specimen.tsx 50 lines
import __studioImagee6996e83 from "../assets/caa236e3e1f3b0be.webp";
import __studioImage6c6e55e4 from "../assets/fddf84b78fccd780.webp";
import __studioImage45fccf90 from "../assets/de7fc57be9936577.webp";
import * as React from "react";
import { InfomercialHero, type InfomercialHeroState } from "../infomercial-hero";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled", "error"];
export default function InfomercialHeroSpecimen({ state }: { state?: InfomercialHeroState }) {
const s = defaults.sample;
return (
<InfomercialHero
state={state}
headline={s.headline}
highlight="a clear plan"
subhead="But wait, there's more!"
salutation="Dear friend,"
letter={["You don't need another theory. You need a plan you can follow, one page at a time.", s.reason]}
signoff="Talk soon,"
signature={`${s.name} team`}
productName={s.name}
price={s.price}
priceLabel={s.todayLabel}
priceNote={s.note}
breakdownDays={30}
stamps={[{ top: "Only", value: s.price }]}
liveLabel="Live"
tickerLabel="One download"
ticker={["Plan your funnel", "Write your copy", "Check your launch"]}
commitLabel={`I understand I'm covered by the ${s.guarantee}.`}
label="Click now"
sublabel={s.sublabel}
productAlt={`${s.name}: ${s.items.map((item) => item.name).join(", ")}`}
productImage={slot(
"product",
__studioImagee6996e83
)}
sceneImage={slot(
"scene",
__studioImage6c6e55e4
)}
burstImage={slot(
"stamp",
__studioImage45fccf90
)}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalInfomercialHero |
string |
|
highlight OptionalInfomercialHero |
string |
|
subhead OptionalInfomercialHero |
string |
|
salutation OptionalInfomercialHero |
string |
|
letter OptionalInfomercialHero |
React.ReactNode[] |
|
signoff OptionalInfomercialHero |
string |
|
signature OptionalInfomercialHero |
string |
|
productName OptionalInfomercialHero |
string |
|
price OptionalInfomercialHero |
string |
|
priceLabel OptionalInfomercialHero |
string |
|
priceNote OptionalInfomercialHero |
string |
|
breakdown OptionalInfomercialHero |
string |
|
breakdownDays OptionalInfomercialHero |
number |
|
stamps OptionalInfomercialHero |
InfomercialStamp[] |
|
liveLabel OptionalInfomercialHero |
string |
|
tickerLabel OptionalInfomercialHero |
string |
|
ticker OptionalInfomercialHero |
string[] |
|
commitLabel OptionalInfomercialHero |
string |
|
commitError OptionalInfomercialHero |
string |
|
label OptionalInfomercialHero |
string |
|
actionAriaLabel OptionalInfomercialHero |
string |
|
sublabel OptionalInfomercialHero |
string |
|
productImage OptionalInfomercialHero |
string |
|
productAlt OptionalInfomercialHero |
string |
|
sceneImage OptionalInfomercialHero |
string |
|
burstImage OptionalInfomercialHero |
string |
|
href OptionalInfomercialHero |
string |
|
onAction OptionalInfomercialHero |
() => void |
|
disabled OptionalInfomercialHero |
boolean |
|
state OptionalInfomercialHero |
InfomercialHeroState |
|
className OptionalInfomercialHero |
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--field-border--field-focus--field-ink- 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.
product- The main product shot or cover (ebook, kit, bottle).
scene- A wide atmosphere photo behind or beside the copy.
stamp- A stamp or badge graphic, on a transparent background.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
caa236e3e1f3b0be.webp
image/webp · 139 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
de7fc57be9936577.webp
image/webp · 56.8 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
fddf84b78fccd780.webp
image/webp · 46.7 KB