Offer Stack Hero 1
Offer Stack Hero: a sales-page first screen. The promise sits on the light half and the whole offer sits on an angled
Use it in a prompt
Use hero/offer-stack-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/offer-stack-hero.tsx. - Import it and pass your copy and images (Props tab):
import { OfferStackHero } from "@/components/funneldna/hero/offer-stack-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/offer-stack-hero/component.tsx 608 lines
// layout: diagonal-split
// Offer Stack Hero: a sales-page first screen. The promise sits on the light half and the whole offer sits on an angled
// dark field: product shot, starburst price, valued stack, struck total, first-person yes, guarantee and a P.S.
// Theme: every colour, face and main-element style reads the theme-contract tokens (base + role tokens with full
// fallback chains). The starburst mask core is drawn with an opaque token colour and used as alpha only, so it never
// paints a visible colour of its own. The marker keeps the contract's documented #fae37c fallback.
import * as React from 'react';
import { ChevronDown, Lock, ShieldCheck } from 'lucide-react';
import { AnimatePresence, motion, useReducedMotion } from 'motion/react';
export type OfferStackHeroItem = {
name: string;
/** One benefit line under the name (hidden on small phones). */
detail?: string;
/** Stated value, for example $49. */
value?: string;
/** Item photo (slot item-n). */
image?: string;
imageAlt?: string;
};
export type OfferStackHeroCopy = {
/** Word on the starburst above the price. */
priceLabel: string;
totalLabel: string;
/** Line under the struck total; {price} is replaced with today’s price. */
todayLine: string;
psLabel: string;
/** Read by screen readers after each item value. */
valueWord: string;
/** Sticky bar value line; {value} is replaced with the struck total value. */
barValue: string;
/** Sticky bar price line; {price} is replaced with today’s price. */
barToday: string;
/** Sticky bar toggle that opens the stack. */
insideLabel: string;
/** Accessible name of the sticky bar; {name} is replaced with the product name. */
barLabel: string;
};
export type OfferStackHeroState = 'default' | 'hover' | 'active' | 'disabled';
export type OfferStackHeroProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string;
deck?: string;
/** Fascination bullets under the deck. */
promises?: React.ReactNode[];
productName?: string;
/** Slot product: transparent product composite. */
productImage?: string;
productImageAlt?: string;
/** Slot stamp: transparent starburst cut-out, used as the sticker’s outline and filled solid with the theme accent. */
starburstImage?: string;
price?: string;
totalValue?: string;
stackTitle?: string;
items?: OfferStackHeroItem[];
/** {name} is replaced with productName. */
ctaLabel?: string;
stickyCtaLabel?: string;
reassurance?: string;
guarantee?: string;
ps?: React.ReactNode;
copy?: Partial<OfferStackHeroCopy>;
href?: string;
onAction?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
disabled?: boolean;
/** Show a top offer bar once the main button scrolls out of view. */
sticky?: boolean;
state?: OfferStackHeroState;
className?: string;
};
const DEFAULT_COPY: OfferStackHeroCopy = {
priceLabel: 'Today',
totalLabel: 'Total value',
todayLine: 'Yours today for one payment of {price}',
psLabel: 'P.S.',
valueWord: 'value',
barValue: '{value} value',
barToday: 'Today {price}',
insideLabel: 'What’s inside',
barLabel: '{name} offer',
};
const DEFAULT_PROMISES: React.ReactNode[] = [
'How to map your offer and every page your funnel needs',
'The fill-in prompts that draft your headline, offer and call to action',
'The pre-launch check that catches broken links and forms before your visitors do',
];
const DEFAULT_ITEMS: OfferStackHeroItem[] = [
{ name: 'Funnel Planning Guide', detail: 'Map your offer and the pages your funnel needs.', value: '$49' },
{ name: 'Page Copy Workbook', detail: 'Draft your headline, offer, and call to action.', value: '$29' },
{ name: 'Launch Checklist', detail: 'Review the links, forms, and next steps before launch.', value: '$19' },
];
export function OfferStackHero(props: OfferStackHeroProps) {
const {
headline = 'Build your first funnel with a clear plan',
highlight = 'a clear plan',
deck = 'Plan your funnel, write your page copy, and check every step before you launch.',
promises = DEFAULT_PROMISES,
productName = 'The Funnel Starter Kit',
productImage,
productImageAlt = 'The Funnel Starter Kit',
starburstImage,
price = '$47',
totalValue = '$97',
stackTitle = 'Everything you need to plan, write and launch your funnel',
items = DEFAULT_ITEMS,
ctaLabel = 'Yes! I want {name}',
stickyCtaLabel = 'Yes! I want it',
reassurance = 'Secure checkout · Instant download',
guarantee = '30-day money-back guarantee',
ps = 'You have 30 days to try the guide, workbook and checklist. If the kit isn’t right for you, ask for your money back.',
copy: copyIn,
href,
onAction,
disabled = false,
sticky = false,
state = 'default',
className,
} = props;
const copy: OfferStackHeroCopy = { ...DEFAULT_COPY, ...copyIn };
const isDisabled = disabled || state === 'disabled';
const forced = state === 'hover' || state === 'active' ? state : undefined;
const reduce = useReducedMotion();
const uid = React.useId();
const headingId = uid + '-heading';
const panelId = uid + '-panel';
const ctaWrap = React.useRef<HTMLDivElement>(null);
const toggleRef = React.useRef<HTMLButtonElement>(null);
const panelRef = React.useRef<HTMLDivElement>(null);
const [showBar, setShowBar] = React.useState(false);
const [open, setOpen] = React.useState(false);
React.useEffect(() => {
if (!sticky) {
setShowBar(false);
return;
}
const el = ctaWrap.current;
if (!el || typeof IntersectionObserver === 'undefined') return;
const io = new IntersectionObserver((entries) => {
const entry = entries[0];
if (entry) setShowBar(!entry.isIntersecting && entry.boundingClientRect.top < 0);
});
io.observe(el);
return () => io.disconnect();
}, [sticky]);
React.useEffect(() => {
if (!showBar) setOpen(false);
}, [showBar]);
React.useEffect(() => {
if (!open) return;
const onKey = (event: KeyboardEvent) => {
if (event.key === 'Escape') {
setOpen(false);
toggleRef.current?.focus();
}
};
const onDown = (event: PointerEvent) => {
const target = event.target as Node | null;
if (!target || panelRef.current?.contains(target) || toggleRef.current?.contains(target)) return;
setOpen(false);
};
document.addEventListener('keydown', onKey);
document.addEventListener('pointerdown', onDown);
return () => {
document.removeEventListener('keydown', onKey);
document.removeEventListener('pointerdown', onDown);
};
}, [open]);
const label = fillText(ctaLabel, { name: productName });
const maskUrl = starburstImage ? 'url(' + String.fromCharCode(39) + starburstImage.replace(/'/g, '%27') + String.fromCharCode(39) + ')' : undefined;
const burst = price ? (
<div className={['osh-burst', maskUrl ? '' : 'is-plain', productImage ? '' : 'is-card'].filter(Boolean).join(' ')}>
{maskUrl ? <span className='osh-burst-shape' aria-hidden='true' style={{ '--osh-burst-mask': maskUrl } as React.CSSProperties} /> : null}
<span className='osh-burst-text'>
<span className='osh-burst-label'>{copy.priceLabel}</span>
<span className='osh-burst-price'>{price}</span>
</span>
</div>
) : null;
const total = totalValue ? (
<div className='osh-total'>
<p className='osh-total-row'>
<span>{copy.totalLabel}</span>
<s className='osh-struck'>{totalValue}</s>
</p>
{price ? <p className='osh-today'>{fillTemplate(copy.todayLine, { price: <strong>{price}</strong> })}</p> : null}
</div>
) : null;
return (
<section className={['cf-offer-stack-hero', className].filter(Boolean).join(' ')} aria-labelledby={headingId}>
<style>{STYLES}</style>
<div className='osh-inner'>
<div className='osh-lead'>
<div className='osh-copy'>
<h1 id={headingId} className='osh-h1 osh-rise'>
{renderHeadline(headline, highlight)}
</h1>
{deck ? (
<p className='osh-deck osh-rise' style={rise(1)}>
{deck}
</p>
) : null}
</div>
{promises.length ? (
<ol className='osh-promises'>
{promises.map((promise, i) => (
<li key={i} className='osh-promise osh-rise' style={rise(i + 2)}>
<span className='osh-num' aria-hidden='true'>
{i + 1}
</span>
<span className='osh-promise-text'>{promise}</span>
</li>
))}
</ol>
) : null}
</div>
<div className='osh-offer'>
{productImage ? (
<figure className='osh-figure osh-rise' style={rise(1)}>
<img src={productImage} alt={productImageAlt} width={520} height={390} fetchPriority='high' />
{burst}
</figure>
) : null}
<div className={'osh-card osh-rise' + (productImage ? ' has-figure' : '')} style={rise(2)}>
{productImage ? null : burst}
<h2 className='osh-card-title'>{stackTitle}</h2>
{items.length ? <ItemRows items={items} valueWord={copy.valueWord} /> : null}
{total}
<div className='osh-action' ref={ctaWrap}>
<Action href={href} onAction={onAction} disabled={isDisabled} forced={forced}>
{label}
</Action>
</div>
{reassurance ? (
<p className='osh-reassure'>
<Lock className='osh-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
{guarantee ? (
<p className='osh-guarantee'>
<ShieldCheck className='osh-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{guarantee}
</p>
) : null}
{ps ? (
<p className='osh-ps'>
<strong>{copy.psLabel}</strong>
{ps}
</p>
) : null}
</div>
</div>
</div>
<AnimatePresence>
{sticky && showBar ? (
<motion.div
key='osh-bar'
className='osh-bar'
role='region'
aria-label={fillText(copy.barLabel, { name: productName })}
initial={reduce ? { opacity: 0 } : { y: '-100%' }}
animate={reduce ? { opacity: 1 } : { y: 0 }}
exit={reduce ? { opacity: 0 } : { y: '-100%' }}
transition={{ duration: reduce ? 0.01 : 0.3, ease: [0.2, 0.7, 0.2, 1] }}
>
<div className='osh-bar-in'>
{productImage ? <img className='osh-bar-thumb' src={productImage} alt='' width={48} height={40} /> : null}
<div className='osh-bar-info'>
<p className='osh-bar-name'>{productName}</p>
<p className='osh-bar-price'>
{totalValue ? (
<>
{fillTemplate(copy.barValue, { value: <s>{totalValue}</s> })}
<span aria-hidden='true'> · </span>
</>
) : null}
{price ? fillTemplate(copy.barToday, { price: <strong>{price}</strong> }) : null}
</p>
</div>
{items.length ? (
<button
ref={toggleRef}
type='button'
className='osh-toggle'
aria-expanded={open}
aria-controls={panelId}
onClick={() => setOpen((v) => !v)}
>
<span className='osh-toggle-text'>{copy.insideLabel}</span>
<ChevronDown size={18} strokeWidth={2.5} aria-hidden='true' />
</button>
) : null}
<Action variant='bar' href={href} onAction={onAction} disabled={isDisabled}>
{stickyCtaLabel}
</Action>
</div>
<div ref={panelRef} id={panelId} className='osh-panel' role='region' aria-label={copy.insideLabel} hidden={!open}>
<p className='osh-panel-title'>{stackTitle}</p>
<ItemRows items={items} valueWord={copy.valueWord} compact />
{total}
<Action variant='panel' href={href} onAction={onAction} disabled={isDisabled}>
{label}
</Action>
</div>
</motion.div>
) : null}
</AnimatePresence>
</section>
);
}
export default OfferStackHero;
function ItemRows({ items, valueWord, compact = false }: { items: OfferStackHeroItem[]; valueWord: string; compact?: boolean }) {
return (
<ul className={'osh-items' + (compact ? ' is-compact' : '')}>
{items.map((item, i) => (
<li key={i} className={'osh-item' + (item.image ? ' has-thumb' : '')}>
{item.image ? <img className='osh-thumb' src={item.image} alt={item.imageAlt ?? item.name} loading='lazy' width={56} height={56} /> : null}
<div className='osh-item-text'>
<p className='osh-item-name'>{item.name}</p>
{item.detail && !compact ? <p className='osh-item-detail'>{item.detail}</p> : null}
</div>
{item.value ? (
<p className='osh-item-value'>
{item.value}
<span className='osh-sr'> {valueWord}</span>
</p>
) : null}
</li>
))}
</ul>
);
}
/** Primary action. The class names are literal so the button styling (role tokens --button-*) resolves statically. */
function Action({
href,
onAction,
disabled,
variant,
forced,
children,
}: {
href?: string;
onAction?: OfferStackHeroProps['onAction'];
disabled?: boolean;
variant?: 'bar' | 'panel';
forced?: 'hover' | 'active';
children: React.ReactNode;
}) {
if (href && !disabled) {
return (
<a
className={variant === 'bar' ? 'osh-cta osh-cta--bar' : variant === 'panel' ? 'osh-cta osh-cta--panel' : 'osh-cta'}
href={href}
data-state={forced}
onClick={onAction}
>
{children}
</a>
);
}
return (
<button
type='button'
className={variant === 'bar' ? 'osh-cta osh-cta--bar' : variant === 'panel' ? 'osh-cta osh-cta--panel' : 'osh-cta'}
disabled={disabled}
data-state={forced}
onClick={disabled ? undefined : onAction}
>
{children}
</button>
);
}
function renderHeadline(headline: string, highlight?: string): React.ReactNode {
if (!highlight) return headline;
const at = headline.indexOf(highlight);
if (at < 0) return headline;
return (
<>
{headline.slice(0, at)}
<span className='osh-mark'>{highlight}</span>
{headline.slice(at + highlight.length)}
</>
);
}
function fillText(template: string, vars: Record<string, string>): string {
return Object.keys(vars).reduce((text, key) => text.split('{' + key + '}').join(vars[key]), template);
}
function fillTemplate(template: string, vars: Record<string, React.ReactNode>): React.ReactNode[] {
const out: React.ReactNode[] = [];
let rest = template;
let k = 0;
while (rest.length) {
const open = rest.indexOf('{');
const close = open >= 0 ? rest.indexOf('}', open) : -1;
if (open < 0 || close < 0) {
out.push(rest);
break;
}
const key = rest.slice(open + 1, close);
if (open > 0) out.push(rest.slice(0, open));
out.push(key in vars ? <React.Fragment key={'v' + k++}>{vars[key]}</React.Fragment> : rest.slice(open, close + 1));
rest = rest.slice(close + 1);
}
return out;
}
function rise(i: number): React.CSSProperties {
return { '--i': i } as React.CSSProperties;
}
const STYLES = `
.cf-offer-stack-hero{
--osh-gutter:clamp(16px,5vw,48px);
--osh-pad-top:clamp(56px,8vw,112px);
--osh-pad-bottom:clamp(64px,8.5vw,120px);
--osh-gap:clamp(32px,5vw,72px);
--osh-shadow:var(--shadow, oklch(0.22 0.03 260));
--osh-marker:var(--marker, #fae37c);
--osh-num:var(--accent);
--osh-hair:oklch(from var(--ink) l c h / 0.12);
--osh-motion:1;
position:relative;
isolation:isolate;
overflow:clip;
background:var(--surface);
color:var(--ink);
font-family:var(--font-body);
padding:var(--osh-pad-top) var(--osh-gutter) var(--osh-pad-bottom);
}
.cf-offer-stack-hero *,.cf-offer-stack-hero *::before,.cf-offer-stack-hero *::after{box-sizing:border-box}
.cf-offer-stack-hero :where(h1,h2,p,ul,ol,figure){margin:0;padding:0}
.cf-offer-stack-hero img{max-width:100%}
.cf-offer-stack-hero .osh-inner{position:relative;max-width:1120px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,30rem);column-gap:var(--osh-gap)}
.cf-offer-stack-hero .osh-lead{align-self:start;position:sticky;top:96px;padding-top:clamp(0px,2vw,24px)}
.cf-offer-stack-hero .osh-h1{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2.5rem,5.4vw,4.875rem);line-height:1.04;color:var(--ink);text-wrap:balance;margin-bottom:clamp(14px,1.6vw,22px)}
.cf-offer-stack-hero .osh-mark{background-image:linear-gradient(100deg,transparent 0.1em,color-mix(in oklch,var(--osh-marker) 78%,transparent) 0.14em,color-mix(in oklch,var(--osh-marker) 78%,transparent) calc(100% - 0.16em),transparent calc(100% - 0.1em));background-repeat:no-repeat;background-size:100% 0.52em;background-position:0 88%;padding:0 0.1em;margin:0 -0.06em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-offer-stack-hero .osh-deck{font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);max-width:34em;text-wrap:pretty}
.cf-offer-stack-hero .osh-promises{list-style:none;margin-top:clamp(28px,3vw,40px);display:grid;gap:16px;max-width:34em}
.cf-offer-stack-hero .osh-promise{display:grid;grid-template-columns:2rem minmax(0,1fr);gap:12px;align-items:baseline}
.cf-offer-stack-hero .osh-num{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--osh-num);font-variant-numeric:tabular-nums}
.cf-offer-stack-hero .osh-promise-text{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:500;text-wrap:pretty}
.cf-offer-stack-hero .osh-offer{position:relative;align-self:stretch;min-width:0}
.cf-offer-stack-hero .osh-offer::before{content:'';position:absolute;z-index:-1;top:calc(-1 * var(--osh-pad-top));bottom:calc(-1 * var(--osh-pad-bottom));left:calc(-1 * var(--osh-gap) + 12px);right:-100vw;background:var(--band);clip-path:polygon(clamp(72px,9vw,132px) 0,100% 0,100% 100%,0 100%)}
.cf-offer-stack-hero .osh-figure{position:relative;z-index:2;width:min(100%,26rem);aspect-ratio:4 / 3;margin:0 auto -44px}
.cf-offer-stack-hero .osh-figure img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 2px 3px oklch(from var(--osh-shadow) l c h / 0.4)) drop-shadow(0 18px 18px oklch(from var(--osh-shadow) l c h / 0.32))}
.cf-offer-stack-hero .osh-burst{position:absolute;z-index:3;top:-6%;right:-4%;width:clamp(128px,11vw,156px);aspect-ratio:1;display:grid;place-items:center;rotate:10deg;filter:drop-shadow(0 2px 2px oklch(from var(--osh-shadow) l c h / 0.35)) drop-shadow(0 8px 10px oklch(from var(--osh-shadow) l c h / 0.28));animation:osh-pop .3s cubic-bezier(.2,.7,.2,1) .25s both}
/* The stamp image supplies only the spiky outline. A solid core disc is unioned into the mask, so any soft or
see-through pixels inside the generated art never show the product (or the drop shadow) through the sticker.
The core gradient is read as alpha only (an opaque token colour = fully opaque mask); it never paints a visible
colour. The visible fill is the theme's --accent-fill. */
.cf-offer-stack-hero .osh-burst-shape{
--osh-burst-core:radial-gradient(circle closest-side,var(--accent-fill,var(--accent)) 0 66%,transparent 66.5%);
position:absolute;inset:0;background:var(--accent-fill,var(--accent));
-webkit-mask-image:var(--osh-burst-mask),var(--osh-burst-core);mask-image:var(--osh-burst-mask),var(--osh-burst-core);
-webkit-mask-size:contain,100% 100%;mask-size:contain,100% 100%;
-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
-webkit-mask-position:center;mask-position:center;
-webkit-mask-composite:source-over;mask-composite:add;
mask-mode:alpha;
}
.cf-offer-stack-hero .osh-burst-text{position:relative;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center;line-height:1;color:var(--accent-fill-ink,var(--card));text-shadow:none}
.cf-offer-stack-hero .osh-burst-label{display:block;font-size:0.875rem;line-height:1;font-weight:800;letter-spacing:0.08em;text-transform:uppercase}
.cf-offer-stack-hero .osh-burst-price{display:block;font-family:var(--font-display);font-weight:800;font-size:clamp(2rem,2.6vw,2.375rem);line-height:0.9;letter-spacing:-0.03em;font-variant-numeric:tabular-nums}
.cf-offer-stack-hero .osh-burst.is-plain{width:auto;aspect-ratio:auto;top:-12px;right:-6px}
.cf-offer-stack-hero .osh-burst.is-plain .osh-burst-text{background:var(--accent-fill,var(--accent));border-radius:var(--radius,12px);padding:12px 18px}
.cf-offer-stack-hero .osh-burst.is-card{top:-30px;right:-12px}
.cf-offer-stack-hero .osh-card{position:relative;z-index:1;background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--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(--osh-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--osh-shadow) l c h / 0.32)));padding:clamp(20px,3vw,32px)}
.cf-offer-stack-hero .osh-card.has-figure{padding-top:calc(44px + clamp(16px,2vw,24px))}
.cf-offer-stack-hero .osh-card:not(.has-figure) .osh-card-title{padding-right:clamp(84px,9vw,120px)}
.cf-offer-stack-hero .osh-card-title{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;margin-bottom:8px}
.cf-offer-stack-hero .osh-items{list-style:none}
.cf-offer-stack-hero .osh-item{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'text value';column-gap:16px;align-items:start;padding:12px 0;border-bottom:1px solid var(--osh-hair)}
.cf-offer-stack-hero .osh-item.has-thumb{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:'thumb text value'}
.cf-offer-stack-hero .osh-item:last-child{border-bottom:0}
.cf-offer-stack-hero .osh-thumb{grid-area:thumb;display:block;width:56px;height:56px;border-radius:8px;object-fit:cover;object-position:center}
.cf-offer-stack-hero .osh-item-text{grid-area:text;min-width:0}
.cf-offer-stack-hero .osh-item-name{font-size:1.0625rem;font-weight:700;line-height:1.3;text-wrap:pretty}
.cf-offer-stack-hero .osh-item-detail{margin-top:2px;font-size:0.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-offer-stack-hero .osh-item-value{grid-area:value;font-size:1.0625rem;font-weight:800;line-height:1.3;font-variant-numeric:tabular-nums}
.cf-offer-stack-hero .osh-items.is-compact .osh-item{padding:10px 0;column-gap:12px}
.cf-offer-stack-hero .osh-items.is-compact .osh-thumb{width:40px;height:40px}
.cf-offer-stack-hero .osh-total{margin-top:16px;background:color-mix(in oklch,var(--ink) 5%,var(--card));border-radius:10px;padding:16px;display:grid;gap:6px}
.cf-offer-stack-hero .osh-total-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:1rem;font-weight:700;color:var(--ink)}
.cf-offer-stack-hero .osh-struck{font-family:var(--font-display);font-size:clamp(1.3125rem,1.8vw,1.625rem);font-weight:800;line-height:1.1;color:var(--danger);text-decoration:line-through;text-decoration-thickness:2px;font-variant-numeric:tabular-nums}
.cf-offer-stack-hero .osh-today{font-size:1rem;line-height:1.4;font-weight:500;color:var(--ink);text-wrap:pretty}
.cf-offer-stack-hero .osh-today strong{font-family:var(--font-display);font-weight:800;font-size:1.25rem;letter-spacing:-0.01em;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-offer-stack-hero .osh-action{margin-top:24px}
.cf-offer-stack-hero .osh-cta{
--osh-b:var(--button-bg,var(--cta));
--osh-b2:var(--button-bg-2,var(--cta-2));
--osh-lt:0.04;
--osh-lb:-0.02;
appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;
min-height:64px;padding:14px 20px;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.45vw,1.3125rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;
color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);
background:linear-gradient(oklch(from var(--osh-b) calc(l + var(--osh-lt)) c h),oklch(from var(--osh-b2) calc(l + var(--osh-lb)) c h));
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--osh-b) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--osh-b) calc(l - 0.16) c h),0 1px 2px oklch(from var(--osh-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--osh-shadow) l c h / 0.45));
cursor:pointer;transition:transform .16s ease,box-shadow .16s ease;-webkit-tap-highlight-color:transparent;
}
.cf-offer-stack-hero .osh-cta:hover:not(:disabled),.cf-offer-stack-hero .osh-cta[data-state='hover']:not(:disabled){--osh-lt:-0.01;--osh-lb:-0.07;transform:translateY(calc(-1px * var(--osh-motion)));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--osh-b) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--osh-b) calc(l - 0.2) c h),0 1px 2px oklch(from var(--osh-shadow) l c h / 0.34),0 12px 20px -6px oklch(from var(--osh-shadow) l c h / 0.5))}
.cf-offer-stack-hero .osh-cta:active:not(:disabled),.cf-offer-stack-hero .osh-cta[data-state='active']:not(:disabled){--osh-lt:-0.04;--osh-lb:-0.09;transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--osh-b) calc(l - 0.22) c h / 0.45),inset 0 -2px 0 oklch(from var(--osh-b) calc(l - 0.16) c h),0 1px 1px oklch(from var(--osh-shadow) l c h / 0.3)}
.cf-offer-stack-hero .osh-cta:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-offer-stack-hero .osh-cta:disabled{cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;transform:none;box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--osh-shadow) l c h / 0.2))}
.cf-offer-stack-hero .osh-cta:disabled:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-offer-stack-hero .osh-reassure{margin-top:16px;text-align:center;font-size:0.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:balance}
.cf-offer-stack-hero .osh-guarantee{margin-top:4px;text-align:center;font-size:0.9375rem;line-height:1.4;font-weight:700;color:var(--ink);text-wrap:pretty}
.cf-offer-stack-hero .osh-ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:0.4em}
.cf-offer-stack-hero .osh-guarantee .osh-ico{color:var(--success)}
.cf-offer-stack-hero .osh-ps{margin-top:24px;padding-top:20px;border-top:1px solid var(--osh-hair);font-size:1rem;line-height:1.5;color:var(--ink);text-wrap:pretty}
.cf-offer-stack-hero .osh-ps strong{font-weight:800;margin-inline-end:0.35em}
.cf-offer-stack-hero .osh-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-offer-stack-hero .osh-bar{position:fixed;top:0;left:0;right:0;z-index:60;background:var(--card);color:var(--ink);font-family:var(--font-body);border-bottom:1px solid var(--osh-hair);box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--osh-shadow) l c h / 0.22),0 4px 10px -2px oklch(from var(--osh-shadow) l c h / 0.2))}
.cf-offer-stack-hero .osh-bar-in{max-width:calc(1120px + 2 * var(--osh-gutter));margin:0 auto;padding:10px var(--osh-gutter);display:flex;align-items:center;gap:12px}
.cf-offer-stack-hero .osh-bar-thumb{flex:0 0 auto;width:48px;height:40px;object-fit:contain;filter:drop-shadow(0 1px 2px oklch(from var(--osh-shadow) l c h / 0.3))}
.cf-offer-stack-hero .osh-bar-info{flex:1 1 auto;min-width:0}
.cf-offer-stack-hero .osh-bar-name{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:1rem;line-height:1.2;text-wrap:balance}
.cf-offer-stack-hero .osh-bar-price{font-size:0.9375rem;line-height:1.3;color:var(--muted)}
.cf-offer-stack-hero .osh-bar-price s{color:var(--danger);text-decoration-thickness:2px}
.cf-offer-stack-hero .osh-bar-price strong{color:var(--ink);font-weight:800}
.cf-offer-stack-hero .osh-toggle{appearance:none;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;min-width:48px;padding:0 16px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1rem;line-height:1.15;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--osh-shadow) l c h / 0.2)));cursor:pointer;transition:background .16s ease,transform .16s ease}
.cf-offer-stack-hero .osh-toggle:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h)}
.cf-offer-stack-hero .osh-toggle:active{transform:translateY(1px)}
.cf-offer-stack-hero .osh-toggle:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-offer-stack-hero .osh-toggle svg{transition:rotate .2s ease}
.cf-offer-stack-hero .osh-toggle[aria-expanded='true'] svg{rotate:180deg}
.cf-offer-stack-hero .osh-cta--bar{flex:0 0 auto;width:auto;min-height:48px;padding:8px 20px;font-size:1.0625rem;white-space:nowrap}
.cf-offer-stack-hero .osh-cta--panel{min-height:56px;margin-top:16px;font-size:1.125rem}
.cf-offer-stack-hero .osh-panel{position:absolute;top:calc(100% + 8px);right:max(var(--osh-gutter),calc((100% - 1120px) / 2));width:min(26rem,calc(100% - 2 * var(--osh-gutter)));max-height:calc(100dvh - 96px);overflow:auto;background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--osh-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--osh-shadow) l c h / 0.32));padding:20px}
.cf-offer-stack-hero .osh-panel[hidden]{display:none}
.cf-offer-stack-hero .osh-panel-title{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:1.125rem;line-height:1.2;text-wrap:balance;margin-bottom:4px}
.cf-offer-stack-hero .osh-rise{animation:osh-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
@keyframes osh-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes osh-pop{from{opacity:.82;scale:.9}to{opacity:1;scale:1}}
@media (max-width:1080px){
.cf-offer-stack-hero .osh-inner{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
}
@media (max-width:860px){
.cf-offer-stack-hero{background:var(--band)}
.cf-offer-stack-hero .osh-inner{display:flex;flex-direction:column;max-width:none}
.cf-offer-stack-hero .osh-lead{display:contents}
.cf-offer-stack-hero .osh-copy{order:1;background:var(--surface);color:var(--ink);margin:calc(-1 * var(--osh-pad-top)) calc(-1 * var(--osh-gutter)) 0;padding:var(--osh-pad-top) max(var(--osh-gutter),calc((100% - 34rem) / 2)) 72px;clip-path:polygon(0 0,100% 0,100% calc(100% - 44px),0 100%)}
.cf-offer-stack-hero .osh-offer{order:2;width:100%;max-width:34rem;margin:0 auto}
.cf-offer-stack-hero .osh-offer::before{display:none}
.cf-offer-stack-hero .osh-promises{order:3;width:100%;max-width:34rem;margin:40px auto 0;color:var(--band-ink);--osh-num:var(--band-ink)}
}
@media (max-width:560px){
.cf-offer-stack-hero .osh-bar-in{gap:8px}
.cf-offer-stack-hero .osh-bar-name{display:none}
.cf-offer-stack-hero .osh-bar-thumb{width:40px}
.cf-offer-stack-hero .osh-bar-price{color:var(--ink)}
.cf-offer-stack-hero .osh-toggle{padding:0;width:48px}
.cf-offer-stack-hero .osh-toggle-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-offer-stack-hero .osh-cta--bar{padding:8px 16px;font-size:1rem}
}
@media (max-width:480px){
.cf-offer-stack-hero .osh-figure{width:min(100%,20rem);margin-bottom:-36px}
.cf-offer-stack-hero .osh-card.has-figure{padding-top:calc(36px + 16px)}
.cf-offer-stack-hero .osh-burst{width:116px;top:-4%;right:0}
.cf-offer-stack-hero .osh-burst-text{gap:12px}
.cf-offer-stack-hero .osh-burst-price{font-size:2rem}
.cf-offer-stack-hero .osh-thumb{width:44px;height:44px}
.cf-offer-stack-hero .osh-item{column-gap:12px}
.cf-offer-stack-hero .osh-item-detail{display:none}
.cf-offer-stack-hero .osh-cta{padding:14px 16px;min-height:64px}
.cf-offer-stack-hero .osh-total{padding:14px}
}
@media (prefers-reduced-motion:reduce){
.cf-offer-stack-hero{--osh-motion:0}
.cf-offer-stack-hero .osh-rise,.cf-offer-stack-hero .osh-burst{animation:none}
.cf-offer-stack-hero .osh-cta,.cf-offer-stack-hero .osh-toggle,.cf-offer-stack-hero .osh-toggle svg{transition:none}
}
`;
pieces/hero/offer-stack-hero/specimen.tsx 52 lines
import __studioImage25be8669 from "../assets/585df60249b667ca.webp";
import __studioImagea173926d from "../assets/de70a5202221f6e3.webp";
import { OfferStackHero } from '../offer-stack-hero';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled';
export default function OfferStackHeroSpecimen({ state = 'default' }: { state?: SpecimenState }) {
const sample = defaults.sample;
return (
<OfferStackHero
state={state}
sticky
headline={sample.headline}
highlight='a clear plan'
deck={sample.lead}
promises={[
'How to map your offer and every page your funnel needs',
'The fill-in prompts that draft your headline, offer and call to action',
'The pre-launch check that catches broken links and forms before your visitors do',
]}
productName={sample.name}
productImage={slot(
'product',
__studioImage25be8669
)}
productImageAlt='The Funnel Starter Kit: planning guide, page copy workbook and launch checklist'
starburstImage={slot(
'stamp',
__studioImagea173926d
)}
price={sample.price}
totalValue={sample.regularPrice}
stackTitle='Everything you need to plan, write and launch your funnel'
items={sample.items.map((item, i) => ({
name: item.name,
detail: item.detail,
value: item.value,
image: slot('item-' + (i + 1), item.image),
imageAlt: item.imageAlt,
}))}
ctaLabel='Yes! I want the Funnel Starter Kit'
stickyCtaLabel='Yes! I want it'
reassurance={sample.sublabel}
guarantee={sample.guarantee}
ps='You have 30 days to try the guide, workbook and checklist. If the kit isn’t right for you, ask for your money back.'
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalOfferStackHero |
string |
|
highlight OptionalOfferStackHero |
string |
|
deck OptionalOfferStackHero |
string |
|
promises OptionalOfferStackHero |
React.ReactNode[] |
|
productName OptionalOfferStackHero |
string |
|
productImage OptionalOfferStackHero |
string |
|
productImageAlt OptionalOfferStackHero |
string |
|
starburstImage OptionalOfferStackHero |
string |
|
price OptionalOfferStackHero |
string |
|
totalValue OptionalOfferStackHero |
string |
|
stackTitle OptionalOfferStackHero |
string |
|
items OptionalOfferStackHero |
OfferStackHeroItem[] |
|
ctaLabel OptionalOfferStackHero |
string |
|
stickyCtaLabel OptionalOfferStackHero |
string |
|
reassurance OptionalOfferStackHero |
string |
|
guarantee OptionalOfferStackHero |
string |
|
ps OptionalOfferStackHero |
React.ReactNode |
|
copy OptionalOfferStackHero |
Partial<OfferStackHeroCopy> |
|
href OptionalOfferStackHero |
string |
|
onAction OptionalOfferStackHero |
(event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void |
|
disabled OptionalOfferStackHero |
boolean |
|
sticky OptionalOfferStackHero |
boolean |
|
state OptionalOfferStackHero |
OfferStackHeroState |
|
className OptionalOfferStackHero |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
stamp- A stamp or badge graphic, on a transparent background.
-
585df60249b667ca.webp
image/webp · 160 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
de70a5202221f6e3.webp
image/webp · 191 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB