Product Details 1
Product details: walks the buyer through what the product is made of and the specs that matter, one segment at a time, then closes on a compact price block and the buy button.
Use it in a prompt
Use offer/product-details 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/offer/product-details.tsx. - Import it and pass your copy and images (Props tab):
import { ProductDetails } from "@/components/funneldna/offer/product-details"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/product-details/component.tsx 484 lines
// layout: segmented-stepper
// Product details: walks the buyer through what the product is made of and the specs that matter, one segment at a time, then closes on a compact price block and the buy button.
import * as React from 'react';
import type { LucideIcon } from 'lucide-react';
import { BookOpen, Box, Check, Clock, CreditCard, Download, Droplet, FileText, Flame, Gem, Infinity as InfinityIcon, Layers, Leaf, Lock, Package, Ruler, ShieldCheck, Sparkles, Thermometer, Weight, X } from 'lucide-react';
// Spec icons (lucide). Physical goods: layers (material), ruler (size), flame (burn time), leaf (ingredients), shield (warranty)…
export type ProductDetailsIcon =
| 'layers' | 'ruler' | 'flame' | 'leaf' | 'droplet' | 'weight' | 'thermometer' | 'clock' | 'shield'
| 'package' | 'box' | 'gem' | 'sparkles' | 'book' | 'file' | 'check' | 'download' | 'infinity' | 'card';
export type ProductDetailsSpec = {
label: string; // left column: what the spec is (Material, Size, Burn time…)
value: React.ReactNode; // right column: the fact
note?: string; // small line under the value
icon?: ProductDetailsIcon; // defaults to 'check'
image?: string; // thumbnail (slot item-n); replaces the icon
imageAlt?: string;
};
export type ProductDetailsStep = {
tab: string; // segment label
tabShort?: string; // segment label on phones
title: React.ReactNode; // selling heading of the panel
intro?: string;
specs: ProductDetailsSpec[];
notIn?: { label: string; items: string[] }; // the optional ‘what’s not in it’ line
image?: string; // overrides the product image for this segment
imageAlt?: string;
caption?: string; // line under the image for this segment
};
export type ProductDetailsProps = {
headline?: string;
highlight?: string; // phrase inside the headline that gets the marker stroke
lead?: string;
steps?: ProductDetailsStep[]; // detail segments; the closing segment with the price and button is added after them
productImage?: string; // slot: product
productImageAlt?: string;
productImageFit?: 'contain' | 'cover'; // contain for transparent cut-outs, cover for photos
caption?: string; // under the image on the closing segment and on segments without their own caption
closeTab?: string; // label of the closing segment
closeTabShort?: string; // label of the closing segment on phones
question?: string; // the closing question the button answers
punch?: string[]; // one-sentence lines
punchline?: string; // the single-word line
tagLabel?: string; // line above the price
regularPrice?: string; // struck price; omit to hide it
price?: string; // today’s price; omit to hide the price block
priceNote?: string;
regularPriceLabel?: string; // screen-reader label for the struck price
priceLabel?: string; // screen-reader label for today’s price
actionLabel?: string;
reassurance?: string; // line under the button, with a lock icon
href?: string; // checkout destination; renders the button as a link
onAction?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void; // buy-button click
disabled?: boolean;
nextLabel?: string; // template: {tab} is replaced with the next segment’s label
backLabel?: string;
tabsLabel?: string; // accessible name of the segment list
initialStep?: number; // segment shown first (0-based); forced states open the closing segment
state?: 'default' | 'hover' | 'active' | 'disabled'; // forces the buy button’s state on the closing segment
className?: string;
};
export function ProductDetails(props: ProductDetailsProps) {
const {
headline = 'Look inside the kit before you buy',
highlight = 'before you buy',
lead = 'Plan your funnel, write your page copy, and check every step before you launch.',
steps = DEFAULT_STEPS,
productImage,
productImageAlt = 'The Funnel Starter Kit',
productImageFit = 'contain',
caption,
closeTab = 'Get the kit',
closeTabShort = 'Get it',
question = 'Ready to map your first funnel?',
punch = ['Plan the funnel.', 'Write the page.', 'Check every step.'],
punchline = 'Done.',
tagLabel = 'Get the complete kit for',
regularPrice = '$97',
price = '$47',
priceNote = 'One payment · Lifetime access',
regularPriceLabel = 'Regular price',
priceLabel = 'Today',
actionLabel = 'I’m ready, send me the kit',
reassurance = 'Secure checkout · Instant download',
href,
onAction,
disabled = false,
nextLabel = 'Next: {tab}',
backLabel = 'Back',
tabsLabel = 'Product details',
initialStep,
state = 'default',
className,
} = props;
const total = steps.length + 1;
const last = total - 1;
const forced = state !== 'default';
const [active, setActive] = React.useState(() => clampStep(initialStep ?? (forced ? last : 0), last));
React.useEffect(() => {
if (forced) setActive(last);
}, [forced, last]);
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, '');
const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([]);
const cardRef = React.useRef<HTMLDivElement>(null);
const headingRef = React.useRef<HTMLHeadingElement>(null);
const moved = React.useRef(false);
// After Back/Next: move focus to the new panel heading and bring the card into view if it scrolled off.
React.useEffect(() => {
if (!moved.current) return;
moved.current = false;
headingRef.current?.focus({ preventScroll: true });
const card = cardRef.current;
if (card && card.getBoundingClientRect().top < 0) {
const still = typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
card.scrollIntoView({ block: 'start', behavior: still ? 'auto' : 'smooth' });
}
}, [active]);
const go = (index: number) => {
moved.current = true;
setActive(clampStep(index, last));
};
const onTabKey = (event: React.KeyboardEvent<HTMLButtonElement>, index: number) => {
let next = -1;
if (event.key === 'ArrowRight' || event.key === 'ArrowDown') next = (index + 1) % total;
else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') next = (index - 1 + total) % total;
else if (event.key === 'Home') next = 0;
else if (event.key === 'End') next = last;
if (next < 0) return;
event.preventDefault();
setActive(next);
tabRefs.current[next]?.focus();
};
const isClose = active === last;
const step = isClose ? undefined : steps[active];
const tabs = [...steps.map((s) => ({ tab: s.tab, short: s.tabShort ?? s.tab })), { tab: closeTab, short: closeTabShort }];
const nextTab = tabs[Math.min(active + 1, last)];
const image = step?.image ?? productImage;
const imageAlt = step?.image ? step.imageAlt ?? '' : productImageAlt;
const imageCaption = step ? step.caption ?? caption : caption;
const isDisabled = disabled || state === 'disabled';
const forcedState = forced ? state : undefined;
const panelId = `${uid}-panel`;
const tabId = (i: number) => `${uid}-tab-${i}`;
const delay = (i: number): React.CSSProperties => ({ animationDelay: `${Math.min(i * 0.07, 0.28)}s` });
const nextLong = fill(nextLabel, { tab: nextTab.tab });
const nextShort = fill(nextLabel, { tab: nextTab.short });
const cta = href && !isDisabled ? (
<a className='pd-btn pd-btn--cta' href={href} data-state={forcedState} onClick={onAction}>
{actionLabel}
</a>
) : (
<button type='button' className='pd-btn pd-btn--cta' data-state={forcedState} disabled={isDisabled} onClick={onAction}>
{actionLabel}
</button>
);
return (
<section className={['cf-product-details', className].filter(Boolean).join(' ')} aria-labelledby={`${uid}-title`}>
<style>{CSS}</style>
<div className='pd-inner'>
<header className='pd-head'>
<h2 id={`${uid}-title`} className='pd-h2'>{markPhrase(headline, highlight)}</h2>
{lead ? <p className='pd-lead'>{lead}</p> : null}
</header>
<div ref={cardRef} className='pd-card'>
<div className='pd-tabs' role='tablist' aria-label={tabsLabel} style={{ ['--pd-count' as string]: total } as React.CSSProperties}>
{tabs.map((t, i) => {
const selected = i === active;
return (
<button
key={i}
ref={(el) => {
tabRefs.current[i] = el;
}}
id={tabId(i)}
type='button'
role='tab'
className='pd-tab'
aria-label={t.tab}
aria-selected={selected}
aria-controls={panelId}
tabIndex={selected ? 0 : -1}
onClick={() => setActive(i)}
onKeyDown={(e) => onTabKey(e, i)}
>
{i < active ? (
<Check className='pd-tab-done' size={16} strokeWidth={2.5} aria-hidden='true' />
) : (
<span className='pd-tab-num' aria-hidden='true'>{i + 1}</span>
)}
<span className='pd-long' aria-hidden='true'>{t.tab}</span>
<span className='pd-short' aria-hidden='true'>{t.short}</span>
</button>
);
})}
</div>
<div id={panelId} role='tabpanel' aria-labelledby={tabId(active)} className={image ? 'pd-panel' : 'pd-panel pd-panel--solo'}>
{image ? (
<figure className='pd-media'>
<div key={image} className={productImageFit === 'cover' ? 'pd-frame pd-frame--cover pd-reveal' : 'pd-frame pd-reveal'}>
<img src={image} alt={imageAlt} width={640} height={640} loading='lazy' decoding='async' />
</div>
{imageCaption ? <figcaption className='pd-caption'>{imageCaption}</figcaption> : null}
</figure>
) : null}
<div key={active} className='pd-content'>
{step ? (
<>
<h3 ref={headingRef} tabIndex={-1} className='pd-h3 pd-reveal'>{step.title}</h3>
{step.intro ? <p className='pd-intro pd-reveal' style={delay(1)}>{step.intro}</p> : null}
<dl className='pd-specs'>
{step.specs.map((spec, i) => {
const Icon = ICONS[spec.icon ?? 'check'];
return (
<div key={i} className={spec.image ? 'pd-row pd-row--thumb pd-reveal' : 'pd-row pd-reveal'} style={delay(i + 2)}>
<dt className='pd-dt'>
{spec.image ? (
<img className='pd-thumb' src={spec.image} alt={spec.imageAlt ?? ''} width={56} height={56} loading='lazy' decoding='async' />
) : (
<Icon className='pd-icon' size={20} strokeWidth={2.5} aria-hidden='true' />
)}
<span>{spec.label}</span>
</dt>
<dd className='pd-dd'>
{spec.value}
{spec.note ? <span className='pd-note'>{spec.note}</span> : null}
</dd>
</div>
);
})}
</dl>
{step.notIn && step.notIn.items.length ? (
<div className='pd-not pd-reveal' style={delay(step.specs.length + 2)}>
<span className='pd-not-label'>{step.notIn.label}</span>
<ul>
{step.notIn.items.map((item, i) => (
<li key={i}>
<span className='pd-x' aria-hidden='true'>
<X size={12} strokeWidth={3} />
</span>
{item}
</li>
))}
</ul>
</div>
) : null}
<div className='pd-nav'>
{active > 0 ? (
<button type='button' className='pd-btn pd-btn--secondary' onClick={() => go(active - 1)}>
{backLabel}
</button>
) : null}
<button type='button' className='pd-btn pd-btn--next' aria-label={nextLong} onClick={() => go(active + 1)}>
<span className='pd-long' aria-hidden='true'>{nextLong}</span>
<span className='pd-short' aria-hidden='true'>{nextShort}</span>
</button>
</div>
</>
) : (
<>
<h3 ref={headingRef} tabIndex={-1} className='pd-h3 pd-reveal'>{question}</h3>
{punch.length || punchline ? (
<div className='pd-punch'>
{punch.map((line, i) => (
<p key={i} className='pd-reveal' style={delay(i + 1)}>{line}</p>
))}
{punchline ? <p className='pd-punchline pd-reveal' style={delay(punch.length + 1)}>{punchline}</p> : null}
</div>
) : null}
<div className='pd-close-row'>
{price ? (
<div className='pd-price'>
{tagLabel ? <p className='pd-price-label'>{tagLabel}</p> : null}
<p className='pd-price-row'>
<span className='pd-now'>
<span className='pd-sr'>{priceLabel} </span>
{price}
</span>
{regularPrice ? (
<s className='pd-was'>
<span className='pd-sr'>{regularPriceLabel} </span>
{regularPrice}
</s>
) : null}
</p>
{priceNote ? <p className='pd-price-note'>{priceNote}</p> : null}
</div>
) : null}
<div className='pd-act'>
{cta}
{reassurance ? (
<p className='pd-reassure'>
<Lock size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
</div>
</div>
</>
)}
</div>
</div>
</div>
</div>
</section>
);
}
export default ProductDetails;
const ICONS: Record<ProductDetailsIcon, LucideIcon> = {
layers: Layers,
ruler: Ruler,
flame: Flame,
leaf: Leaf,
droplet: Droplet,
weight: Weight,
thermometer: Thermometer,
clock: Clock,
shield: ShieldCheck,
package: Package,
box: Box,
gem: Gem,
sparkles: Sparkles,
book: BookOpen,
file: FileText,
check: Check,
download: Download,
infinity: InfinityIcon,
card: CreditCard,
};
const DEFAULT_STEPS: ProductDetailsStep[] = [
{
tab: 'What’s inside',
tabShort: 'Inside',
title: 'Three tools that take you from idea to launch',
intro: 'Get the guide, workbook, and checklist in one download.',
specs: [
{ icon: 'book', label: 'Funnel Planning Guide', value: 'Map your offer and the pages your funnel needs.' },
{ icon: 'file', label: 'Page Copy Workbook', value: 'Draft your headline, offer, and call to action.' },
{ icon: 'check', label: 'Launch Checklist', value: 'Review the links, forms, and next steps before launch.' },
],
},
{
tab: 'Format & access',
tabShort: 'Access',
title: 'Download it tonight. Keep it for good.',
intro: 'Check out once and start on your funnel right away.',
specs: [
{ icon: 'download', label: 'Delivery', value: 'Instant digital download' },
{ icon: 'infinity', label: 'Access', value: 'Lifetime access' },
{ icon: 'card', label: 'Payment', value: 'One payment' },
{ icon: 'shield', label: 'Guarantee', value: '30-day money-back guarantee' },
],
notIn: { label: 'Not in it:', items: ['No subscription', 'No recurring charges'] },
},
];
function clampStep(index: number, last: number) {
return Math.max(0, Math.min(last, Math.round(index) || 0));
}
// Replaces each {name} placeholder in a copy template with its value, as text.
function fill(template: string, values: Record<string, string>) {
return Object.keys(values).reduce((text, key) => text.split('{' + key + '}').join(values[key]), template);
}
function markPhrase(text: string, phrase?: string) {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className='pd-mark'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
// Theme notes: every colour reads the contract tokens (hex only as a var() fallback: the --marker default and the badge glyph).
// --pd-glyph is the white glyph of the solid --danger status badge (theme contract: solid status badges carry a white #fff glyph);
// it is exposed as the component-scoped --badge-glyph with #fff as its fallback.
// Segment tabs share the button radius: .pd-tab reads var(--button-radius, var(--radius)) directly (same value as --pd-tab-radius,
// which the tablist track uses for its outer radius) so they follow the theme's button shape.
// The reduced-motion rule keeps !important: its `.cf-product-details *` selector is less specific than `.pd-reveal`, `.pd-price` and `.pd-btn`, which set animation/transition.
const CSS = `
.cf-product-details{--pd-ink:var(--ink,oklch(.21 .034 263));--pd-muted:var(--muted,oklch(.45 .03 258));--pd-card:var(--card,oklch(1 0 0));--pd-accent:var(--accent,oklch(.5 .17 257));--pd-shadow:var(--shadow,oklch(.22 .03 256));--pd-well:color-mix(in oklch,var(--pd-ink) 4%,var(--pd-card));--pd-line:oklch(from var(--pd-ink) l c h / .12);--pd-marker:oklch(from var(--marker,#fae37c) l c h / .5);--pd-glyph:var(--badge-glyph,#fff);--pd-tab-radius:var(--button-radius,var(--radius,12px));--pd-ease:cubic-bezier(.2,.7,.2,1);position:relative;background:var(--surface,oklch(1 0 0));color:var(--pd-ink);font-family:var(--font-body,system-ui,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);overflow-x:clip}
.cf-product-details,.cf-product-details *{box-sizing:border-box}
.cf-product-details .pd-inner{max-width:1120px;margin:0 auto}
.cf-product-details .pd-head{max-width:46rem;margin:0 auto clamp(32px,4vw,48px);text-align:center}
.cf-product-details .pd-h2{margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--pd-ink)}
.cf-product-details .pd-mark{background-image:linear-gradient(transparent 58%,var(--pd-marker) 58%,var(--pd-marker) 92%,transparent 92%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .1em;margin:0 -.04em;border-radius:.18em .4em .22em .36em}
.cf-product-details .pd-lead{margin:16px auto 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--pd-muted);text-wrap:pretty}
.cf-product-details .pd-card{background:var(--pd-card);color:var(--pd-ink);border:1px solid var(--card-border,var(--pd-line));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--pd-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--pd-shadow) l c h / .2)));padding:clamp(20px,3vw,32px);scroll-margin-top:16px}
.cf-product-details .pd-tabs{display:grid;grid-template-columns:repeat(var(--pd-count,3),minmax(0,1fr));gap:4px;padding:4px;background:var(--pd-well);border:1px solid var(--pd-line);border-radius:calc(var(--pd-tab-radius) + 4px)}
.cf-product-details .pd-tab{appearance:none;margin:0;border:0;background:transparent;color:var(--pd-muted);font:inherit;font-size:16px;font-weight:700;line-height:1.2;min-height:52px;padding:8px 12px;border-radius:var(--button-radius,var(--radius,12px));display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;text-align:center;transition:background-color .16s ease,color .16s ease,box-shadow .16s ease;-webkit-tap-highlight-color:transparent}
.cf-product-details .pd-tab:hover{color:var(--pd-ink);background:oklch(from var(--pd-card) l c h / .55)}
.cf-product-details .pd-tab[aria-selected='true']{background:color-mix(in oklch,var(--accent-fill,var(--pd-accent)) 10%,var(--pd-card));color:var(--pd-ink);box-shadow:inset 0 0 0 1px oklch(from var(--pd-accent) l c h / .45),var(--shadow-sm,0 1px 1px oklch(from var(--pd-shadow) l c h / .18),0 1px 3px oklch(from var(--pd-shadow) l c h / .14))}
.cf-product-details .pd-tab:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--pd-accent)) l c h / .5);outline-offset:2px}
.cf-product-details .pd-tab-num{font-family:var(--font-display,inherit);font-weight:800;font-variant-numeric:tabular-nums;color:var(--pd-muted)}
.cf-product-details .pd-tab[aria-selected='true'] .pd-tab-num{color:var(--pd-accent)}
.cf-product-details .pd-tab-done{flex:none;color:var(--success,oklch(.5 .14 150))}
.cf-product-details .pd-short{display:none}
.cf-product-details .pd-panel{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:clamp(32px,5vw,72px);align-items:start;margin-top:clamp(24px,3vw,32px)}
.cf-product-details .pd-panel--solo{grid-template-columns:minmax(0,1fr);max-width:46rem;margin-left:auto;margin-right:auto}
.cf-product-details .pd-media{margin:0;display:flex;flex-direction:column;gap:12px;min-width:0}
.cf-product-details .pd-frame{position:relative;width:100%;aspect-ratio:1/1;display:grid;place-items:center}
.cf-product-details .pd-frame img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;filter:drop-shadow(0 2px 3px oklch(from var(--pd-shadow) l c h / .28)) drop-shadow(0 14px 16px oklch(from var(--pd-shadow) l c h / .18))}
.cf-product-details .pd-frame--cover img{object-fit:cover;border-radius:12px;filter:none}
.cf-product-details .pd-caption{margin:0;text-align:center;font-size:15px;line-height:1.4;font-weight:500;color:var(--pd-muted);text-wrap:pretty}
.cf-product-details .pd-content{min-width:0}
.cf-product-details .pd-h3{margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:-.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;color:var(--pd-ink)}
.cf-product-details .pd-h3:focus{outline:none}
.cf-product-details .pd-intro{margin:12px 0 0;max-width:60ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--pd-muted);text-wrap:pretty}
.cf-product-details .pd-specs{margin:24px 0 0;padding:0}
.cf-product-details .pd-row{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:8px 24px;padding:16px 0;align-items:start}
.cf-product-details .pd-row:first-child{padding-top:0}
.cf-product-details .pd-row:last-child{padding-bottom:0}
.cf-product-details .pd-row+.pd-row{border-top:1px solid var(--pd-line)}
.cf-product-details .pd-dt{display:flex;align-items:flex-start;gap:12px;min-width:0;font-size:16px;font-weight:700;line-height:1.35;color:var(--pd-ink)}
.cf-product-details .pd-icon{flex:none;color:var(--pd-accent)}
.cf-product-details .pd-thumb{flex:none;display:block;width:var(--pd-th,56px);height:var(--pd-th,56px);border-radius:8px;object-fit:cover}
.cf-product-details .pd-row--thumb{--pd-th:56px;position:relative;grid-template-columns:minmax(0,1fr);gap:4px;padding-left:calc(var(--pd-th) + 20px);min-height:calc(var(--pd-th) + 32px)}
.cf-product-details .pd-row--thumb:first-child,.cf-product-details .pd-row--thumb:last-child{min-height:calc(var(--pd-th) + 16px)}
.cf-product-details .pd-row--thumb:only-child{min-height:var(--pd-th)}
.cf-product-details .pd-row--thumb .pd-thumb{position:absolute;left:0;top:16px}
.cf-product-details .pd-row--thumb:first-child .pd-thumb{top:0}
.cf-product-details .pd-row--thumb .pd-dt{font-size:17px}
.cf-product-details .pd-dd{margin:0;min-width:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--pd-ink);text-wrap:pretty}
.cf-product-details .pd-note{display:block;margin-top:4px;font-size:15px;line-height:1.4;font-weight:500;color:var(--pd-muted)}
.cf-product-details .pd-not{margin-top:24px;padding:16px;border-radius:10px;background:var(--pd-well);display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
.cf-product-details .pd-not-label{font-size:15px;font-weight:800;line-height:1.4;color:var(--pd-ink)}
.cf-product-details .pd-not ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px 16px}
.cf-product-details .pd-not li{display:inline-flex;align-items:center;gap:8px;font-size:15px;font-weight:600;line-height:1.4;color:var(--pd-ink)}
.cf-product-details .pd-x{flex:none;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:var(--danger,oklch(.5 .17 27));color:var(--pd-glyph)}
.cf-product-details .pd-nav{display:flex;align-items:center;gap:12px;margin-top:32px}
.cf-product-details .pd-punch{margin-top:16px;display:flex;flex-direction:column;gap:4px}
.cf-product-details .pd-punch p{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--pd-ink);text-wrap:pretty}
.cf-product-details .pd-punch .pd-punchline{margin-top:8px;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:-.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--pd-accent)}
.cf-product-details .pd-close-row{display:flex;flex-wrap:wrap;align-items:center;gap:24px;margin-top:32px}
.cf-product-details .pd-act{flex:1 1 18rem;min-width:0;display:flex;flex-direction:column;gap:12px}
.cf-product-details .pd-reassure{margin:0;text-align:center;font-size:15px;line-height:1.4;font-weight:500;color:var(--pd-muted);text-wrap:pretty}
.cf-product-details .pd-reassure svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-product-details .pd-price{flex:0 0 auto;width:min(100%,16rem);padding:20px 24px;border-radius:10px;background:var(--pd-well);color:var(--pd-ink);transform-origin:50% 50%;animation:pd-pop .3s var(--pd-ease) both}
.cf-product-details .pd-price-label{margin:0;font-size:15px;font-weight:600;line-height:1.4;color:var(--pd-muted);text-wrap:balance}
.cf-product-details .pd-price-row{margin:12px 0 0;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;line-height:1}
.cf-product-details .pd-now{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:-.03em;font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;font-variant-numeric:tabular-nums;color:var(--pd-ink)}
.cf-product-details .pd-was{font-family:var(--font-display,inherit);font-weight:700;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-variant-numeric:tabular-nums;color:var(--pd-muted);text-decoration:line-through;text-decoration-color:var(--danger,oklch(.5 .17 27));text-decoration-thickness:.09em}
.cf-product-details .pd-price-note{margin:12px 0 0;font-size:15px;font-weight:600;line-height:1.4;color:var(--pd-muted);text-wrap:balance}
.cf-product-details .pd-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-product-details .pd-btn{--pd-bg:var(--button-bg,var(--cta,oklch(.58 .21 29)));--pd-bg2:var(--button-bg-2,var(--cta-2,var(--pd-bg)));appearance:none;margin:0;border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:0 28px;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;text-wrap:balance;color:var(--button-ink,var(--cta-ink,oklch(1 0 0)));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--pd-bg) calc(l + .04) c h),oklch(from var(--pd-bg2) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--pd-bg) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--pd-bg) calc(l - .16) c h),0 1px 2px oklch(from var(--pd-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--pd-shadow) l c h / .42));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
.cf-product-details .pd-btn:hover,.cf-product-details .pd-btn[data-state='hover']{background:linear-gradient(oklch(from var(--pd-bg) calc(l - .01) c h),oklch(from var(--pd-bg2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--pd-bg) calc(l + .12) c h / .6),inset 0 -3px 0 oklch(from var(--pd-bg) calc(l - .18) c h),0 1px 2px oklch(from var(--pd-shadow) l c h / .34),0 10px 18px -6px oklch(from var(--pd-shadow) l c h / .5))}
.cf-product-details .pd-btn:active,.cf-product-details .pd-btn[data-state='active']{transform:translateY(1px);background:linear-gradient(oklch(from var(--pd-bg) calc(l - .05) c h),oklch(from var(--pd-bg2) calc(l - .1) c h));box-shadow:inset 0 2px 3px oklch(from var(--pd-bg) calc(l - .24) c h / .55),inset 0 -2px 0 oklch(from var(--pd-bg) calc(l - .16) c h),0 1px 1px oklch(from var(--pd-shadow) l c h / .3)}
.cf-product-details .pd-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--pd-accent)) l c h / .55);outline-offset:3px}
.cf-product-details .pd-btn--secondary{--pd-sbg:var(--button-2-bg,var(--secondary,oklch(.93 .015 263)));padding:0 24px;color:var(--button-2-ink,var(--secondary-ink,var(--pd-ink)));text-shadow:none;background:var(--pd-sbg);border:1px solid var(--button-2-border,transparent);box-shadow:var(--button-2-shadow, var(--shadow-sm))}
.cf-product-details .pd-btn--secondary:hover{background:oklch(from var(--pd-sbg) calc(l - .03) c h);box-shadow:var(--button-2-shadow, var(--shadow-sm))}
.cf-product-details .pd-btn--secondary:active{transform:translateY(1px);background:oklch(from var(--pd-sbg) calc(l - .05) c h);box-shadow:inset 0 1px 2px oklch(from var(--pd-shadow) l c h / .25)}
.cf-product-details .pd-btn--next{margin-left:auto}
.cf-product-details .pd-btn--cta{width:100%;min-height:72px;padding:0 24px}
.cf-product-details .pd-btn:disabled,.cf-product-details .pd-btn[data-state='disabled']{cursor:not-allowed;transform:none;color:var(--secondary-ink,var(--pd-ink));text-shadow:none;background:var(--secondary,var(--pd-well));box-shadow:var(--button-2-shadow, var(--shadow-sm))}
@keyframes pd-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes pd-pop{from{transform:scale(.9)}to{transform:none}}
.cf-product-details .pd-reveal{animation:pd-rise .45s var(--pd-ease) both}
@media (max-width:860px){.cf-product-details .pd-panel{grid-template-columns:minmax(0,1fr);gap:24px}.cf-product-details .pd-frame{aspect-ratio:4/3;max-height:280px}}
@media (max-width:639px){.cf-product-details .pd-tab{font-size:15px;padding:8px 6px;gap:6px}.cf-product-details .pd-tab-num,.cf-product-details .pd-long{display:none}.cf-product-details .pd-short{display:inline}}
@media (max-width:520px){.cf-product-details .pd-row{grid-template-columns:minmax(0,1fr);gap:4px}.cf-product-details .pd-row .pd-dd{padding-left:32px}.cf-product-details .pd-row--thumb{--pd-th:48px}.cf-product-details .pd-row--thumb .pd-dd{padding-left:0}.cf-product-details .pd-nav .pd-btn--next{flex:1}.cf-product-details .pd-close-row{flex-direction:column;align-items:stretch}.cf-product-details .pd-price{width:100%}.cf-product-details .pd-act{flex:none}}
@media (prefers-reduced-motion:reduce){.cf-product-details *,.cf-product-details *::before,.cf-product-details *::after{animation:none !important;transition:none !important}}
`;
pieces/offer/product-details/specimen.tsx 66 lines
import __studioImagefad2d079 from "../assets/196c7d376c13a7db.webp";
import { ProductDetails } from '../product-details';
import type { ProductDetailsProps } from '../product-details';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled'];
type SpecimenState = NonNullable<ProductDetailsProps['state']>;
export default function ProductDetailsSpecimen({ state = 'default' }: { state?: SpecimenState }) {
const sample = defaults.sample;
return (
<ProductDetails
state={state}
headline='Look inside the kit before you buy'
highlight='before you buy'
lead={sample.lead}
productImage={slot('product', __studioImagefad2d079)}
productImageAlt={`${sample.name}: the planning guide, copy workbook and launch checklist`}
caption='Everything arrives in one instant download.'
steps={[
{
tab: 'What’s inside',
tabShort: 'Inside',
title: 'Three tools that take you from idea to launch',
intro: 'Get the guide, workbook, and checklist in one download.',
caption: 'The guide, the workbook and the checklist, together.',
specs: sample.items.map((item, i) => ({
label: item.name,
value: item.detail,
note: `${item.value} value`,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
})),
},
{
tab: 'Format & access',
tabShort: 'Access',
title: 'Download it tonight. Keep it for good.',
intro: 'Check out once and start on your funnel right away.',
caption: 'Yours to keep after one payment.',
specs: [
{ icon: 'download', label: 'Delivery', value: 'Instant digital download' },
{ icon: 'infinity', label: 'Access', value: 'Lifetime access' },
{ icon: 'card', label: 'Payment', value: 'One payment' },
{ icon: 'shield', label: 'Guarantee', value: sample.guarantee },
],
notIn: { label: 'Not in it:', items: ['No subscription', 'No recurring charges'] },
},
]}
closeTab='Get the kit'
closeTabShort='Get it'
question='Ready to map your first funnel?'
punch={['Plan the funnel.', 'Write the page.', 'Check every step.']}
punchline='Done.'
tagLabel={sample.todayLabel}
regularPrice={sample.regularPrice}
price={sample.price}
priceNote={sample.note}
actionLabel='I’m ready, send me the kit'
reassurance={sample.sublabel}
onAction={() => undefined}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalProductDetails |
string |
|
highlight OptionalProductDetails |
string |
|
lead OptionalProductDetails |
string |
|
steps OptionalProductDetails |
ProductDetailsStep[] |
|
productImage OptionalProductDetails |
string |
|
productImageAlt OptionalProductDetails |
string |
|
productImageFit OptionalProductDetails |
'contain' | 'cover' |
|
caption OptionalProductDetails |
string |
|
closeTab OptionalProductDetails |
string |
|
closeTabShort OptionalProductDetails |
string |
|
question OptionalProductDetails |
string |
|
punch OptionalProductDetails |
string[] |
|
punchline OptionalProductDetails |
string |
|
tagLabel OptionalProductDetails |
string |
|
regularPrice OptionalProductDetails |
string |
|
price OptionalProductDetails |
string |
|
priceNote OptionalProductDetails |
string |
|
regularPriceLabel OptionalProductDetails |
string |
|
priceLabel OptionalProductDetails |
string |
|
actionLabel OptionalProductDetails |
string |
|
reassurance OptionalProductDetails |
string |
|
href OptionalProductDetails |
string |
|
onAction OptionalProductDetails |
(event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void |
|
disabled OptionalProductDetails |
boolean |
|
nextLabel OptionalProductDetails |
string |
|
backLabel OptionalProductDetails |
string |
|
tabsLabel OptionalProductDetails |
string |
|
initialStep OptionalProductDetails |
number |
|
state OptionalProductDetails |
'default' | 'hover' | 'active' | 'disabled' |
|
className OptionalProductDetails |
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.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
product- The main product shot or cover (ebook, kit, bottle).
-
196c7d376c13a7db.webp
image/webp · 183 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB