Whats Inside 7
Pairs a numbered contents rail with the kit photo, value and order form.
Use it in a prompt
Use offer/whats-inside-7 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/whats-inside-7.tsx. - Import it and pass your copy and images (Props tab):
import { WhatsInside7 } from "@/components/funneldna/offer/whats-inside-7"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/whats-inside-7/component.tsx 517 lines
// Pairs a numbered contents rail with the kit photo, value and order form.
'use client'
import * as React from 'react'
import { AlertCircle, Loader2, Lock, ShieldCheck, Zap } from 'lucide-react'
import { AmericanExpress, Discover, Mastercard, Visa } from 'react-svg-credit-card-payment-icons/icons/flat-rounded'
export type WhatsInside7Props = {
/** Supporting labels and plain-text templates; named placeholders are documented below. */
copy?: Partial<WhatsInside7Copy>
headline?: string
emphasis?: string
lead?: string
/** Image for this item’s item-N slot; takes precedence over legacy image. */
itemImage?: string
/** productImage is the canonical slot image; image is retained for compatibility. */
productImage?: string
image?: string
imageAlt?: string
caption?: string | false
items?: WhatsInside7Item[]
regularLabel?: string
/** Struck-through regular price. Shown only when supplied. */
regularPrice?: string
todayLabel?: string
price?: string
/** Line beside the price, e.g. billing terms. Shown only when supplied. */
note?: string
showSavings?: boolean
label?: string
loadingLabel?: string
sublabel?: string | false
linkLabel?: string | false
reassurance?: string[]
paymentMarks?: WhatsInside7PaymentMark[]
/** Deprecated: ignored. The builder wires what happens after the action. */
successMessage?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
successNote?: string | false
errorMessage?: string
/** Called after the order form submits; no data is sent by this component. */
onSubmit?: () => void | Promise<unknown>
/** Legacy action callback, used only when onSubmit is undefined. */
onAction?: () => void | Promise<unknown>
disabled?: boolean
state?: WhatsInside7State
id?: string
className?: string
style?: React.CSSProperties
}
export function WhatsInside7({
headline = 'Here’s everything inside.',
emphasis = 'everything inside',
lead = 'The Funnel Starter Kit: a clear plan for your first funnel.',
image: legacyImage,
productImage: image = legacyImage,
imageAlt = 'Everything in the kit, laid out flat on a desk',
caption = 'Three practical resources in one download.',
items: suppliedItems = DEFAULT_ITEMS,
regularLabel = 'Regular price',
regularPrice,
todayLabel = 'Get the complete kit for',
price = '$47',
note,
showSavings = true,
label = 'Yes! Give Me Access',
loadingLabel = 'Opening secure checkout…',
sublabel = '',
linkLabel = 'Click here to add to cart',
reassurance = [],
paymentMarks = ['visa', 'mastercard', 'amex', 'discover'],
errorMessage = 'We couldn’t open checkout. Please try again.',
onAction,
onSubmit = onAction,
disabled = false,
state = 'default',
id,
className,
style,
copy,
}: WhatsInside7Props) {
const text = { ...DEFAULT_COPY, ...copy }
const items = suppliedItems.map(item => ({ ...item, image: item.itemImage === undefined ? item.image : item.itemImage }))
const uid = React.useId().replace(/:/g, '')
const [status, setStatus] = React.useState<Status>(() => statusFrom(state))
const [active, setActive] = React.useState<number | null>(null)
const rows = React.useRef<(HTMLLIElement | null)[]>([])
const alive = React.useRef(true)
React.useEffect(() => {
setStatus(statusFrom(state))
}, [state])
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
const isDisabled = disabled || state === 'disabled'
const loading = status === 'loading'
const save = showSavings ? savings(regularPrice, price) : null
const collage = image ? [] : items.filter((it) => it.image)
const hasFigure = Boolean(image) || collage.length > 0
const force = state === 'hover' || state === 'active' ? state : undefined
async function run(e?: React.SyntheticEvent) {
e?.preventDefault()
if (isDisabled || loading || !onSubmit) return
setStatus('loading')
try {
await onSubmit()
if (alive.current) setStatus('idle')
} catch {
if (alive.current) setStatus('error')
}
}
function showRow(i: number) {
setActive(i)
const el = rows.current[i]
if (!el || typeof window === 'undefined') return
const r = el.getBoundingClientRect()
if (r.top < 0 || r.bottom > window.innerHeight) {
const reduce = window.matchMedia?.('(prefers-reduced-motion: reduce)').matches
el.scrollIntoView({ block: 'nearest', behavior: reduce ? 'auto' : 'smooth' })
}
}
return (
<section
id={id}
className={['cf-whats-inside-7', className].filter(Boolean).join(' ')}
style={style}
aria-labelledby={`${uid}-h`}
>
<style>{CSS}</style>
<div className='wi7-wrap'>
<header className='wi7-head'>
<h2 id={`${uid}-h`} className='wi7-h'>
<Headline text={headline} mark={emphasis} />
</h2>
{lead ? <p className='wi7-lead'>{lead}</p> : null}
</header>
<div className={hasFigure ? 'wi7-grid' : 'wi7-grid wi7-grid--solo'}>
{hasFigure ? (
<div className='wi7-left'>
<figure className='wi7-fig'>
<span className='wi7-slab' aria-hidden='true' />
<div className='wi7-photo'>
{image ? (
<div className='wi7-shot'>
<img src={image} alt={imageAlt} width={1536} height={1024} decoding='async' />
</div>
) : (
<div className='wi7-shot wi7-collage'>
{collage.map((it) => (
<span key={it.name} className='wi7-ctile'>
<img src={it.image} alt={it.imageAlt || it.name} loading='lazy' decoding='async' />
</span>
))}
</div>
)}
{image
? items.map((item, i) => {
const s = spotFor(item, i)
return (
<button
key={item.name}
type='button'
className='wi7-pin'
data-side={s.side}
data-on={active === i ? '' : undefined}
style={{ left: `${s.x}%`, top: `${s.y}%`, '--i': i } as React.CSSProperties}
aria-label={copyText(text.pinAria, { number: pad(i + 1), name: item.name })}
aria-describedby={`${uid}-d${i}`}
onMouseEnter={() => setActive(i)}
onMouseLeave={() => setActive(null)}
onFocus={() => setActive(i)}
onBlur={() => setActive(null)}
onClick={() => showRow(i)}
>
<span className='wi7-dot' aria-hidden='true'>{pad(i + 1)}</span>
<span className='wi7-tag' aria-hidden='true'>{item.name}</span>
</button>
)
})
: null}
</div>
{caption ? <figcaption className='wi7-cap'>{caption}</figcaption> : null}
</figure>
</div>
) : null}
<div className='wi7-right'>
<ol className='wi7-rail' aria-label={text.contents}>
{items.map((item, i) => (
<li
key={item.name}
ref={(el) => {
rows.current[i] = el
}}
className='wi7-row'
data-on={active === i ? '' : undefined}
style={{ '--i': i } as React.CSSProperties}
onMouseEnter={() => setActive(i)}
onMouseLeave={() => setActive(null)}
>
<span className='wi7-num' aria-hidden='true'>{pad(i + 1)}</span>
<div className={item.image ? 'wi7-body' : 'wi7-body wi7-body--plain'}>
{item.image ? (
<span className='wi7-thumb'>
<img src={item.image} alt={item.imageAlt || ''} width={160} height={160} loading='lazy' decoding='async' />
</span>
) : null}
<div>
<h3 className='wi7-name'>{item.name}</h3>
<p className='wi7-detail' id={`${uid}-d${i}`}>{item.detail}</p>
{item.value ? (
<p className='wi7-value'>
{text.itemValue} <strong>{item.value}</strong>
</p>
) : null}
</div>
</div>
</li>
))}
</ol>
<form className='wi7-order' onSubmit={run} noValidate aria-label={text.order}>
{regularPrice ? (
<p className='wi7-reg'>
{regularLabel} <s>{regularPrice}</s>
</p>
) : null}
<p className='wi7-today'>
<span className='wi7-today-l'>{todayLabel}</span> <span className='wi7-price'>{price}</span>
</p>
{save || note ? (
<div className='wi7-meta'>
{save ? <span className='wi7-save'>{copyText(text.savings, { amount: save.amount, percent: save.pct })}</span> : null}
{note ? <span className='wi7-note'>{note}</span> : null}
</div>
) : null}
<div className='wi7-act' aria-live='polite'>
<>
{status === 'error' ? (
<p className='wi7-err' role='alert'>
<AlertCircle aria-hidden='true' />
<span>{errorMessage}</span>
</p>
) : null}
<button
type='submit'
className='wi7-btn'
data-force={force}
disabled={isDisabled}
aria-busy={loading || undefined}
aria-disabled={loading || undefined}
>
{loading ? (
<span className='wi7-btn-row'>
<Loader2 className='wi7-spin' aria-hidden='true' />
{loadingLabel}
</span>
) : (
label
)}
</button>
{linkLabel ? (
<button type='button' className='wi7-link' onClick={run} disabled={isDisabled || loading}>
{linkLabel}
</button>
) : null}
</>
</div>
{sublabel ? (
<p className='wi7-secure'>
<Lock aria-hidden='true' />
{sublabel}
</p>
) : null}
{reassurance.length > 0 ? (
<ul className='wi7-assure'>
{reassurance.map((r) => (
<li key={r}>
{/guarantee/i.test(r) ? <ShieldCheck aria-hidden='true' /> : <Zap aria-hidden='true' />}
{r}
</li>
))}
</ul>
) : null}
{paymentMarks.length > 0 ? (
<ul className='wi7-pay' aria-label={text.payments}>
{paymentMarks.map((m) => {
const { Icon } = MARKS[m]
const markLabel = text[m]
return (
<li key={m} role='img' aria-label={markLabel}>
<Icon aria-hidden='true' />
</li>
)
})}
</ul>
) : null}
</form>
</div>
</div>
</div>
</section>
)
}
export default WhatsInside7
export type WhatsInside7Item = {
name: string
detail: string
value?: string
/** Image for this item’s item-N slot; takes precedence over legacy image. */
itemImage?: string
image?: string
imageAlt?: string
/** Pin position on the main photo in % of width and height; side = which way the label opens. */
spot?: { x: number; y: number; side?: 'left' | 'right' }
}
export type WhatsInside7State = 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
export type WhatsInside7PaymentMark = 'visa' | 'mastercard' | 'amex' | 'discover'
type Status = 'idle' | 'loading' | 'error'
const DEFAULT_ITEMS: WhatsInside7Item[] = [
{ name: 'Funnel Planning Guide', detail: 'Map your offer and the pages your funnel needs.', spot: { x: 22, y: 48, side: 'right' } },
{ name: 'Page Copy Workbook', detail: 'Draft your headline, offer, and call to action.', spot: { x: 52, y: 72, side: 'left' } },
{ name: 'Launch Checklist', detail: 'Review the links, forms, and next steps before launch.', spot: { x: 76, y: 28, side: 'left' } },
]
const FALLBACK_SPOTS = [
{ x: 22, y: 48 },
{ x: 52, y: 72 },
{ x: 76, y: 28 },
{ x: 40, y: 24 },
{ x: 82, y: 70 },
]
const MARKS = {
visa: { Icon: Visa },
mastercard: { Icon: Mastercard },
amex: { Icon: AmericanExpress },
discover: { Icon: Discover },
}
function spotFor(item: WhatsInside7Item, i: number) {
const s = item.spot ?? FALLBACK_SPOTS[i % FALLBACK_SPOTS.length]
const side: 'left' | 'right' = item.spot?.side ?? (s.x > 55 ? 'left' : 'right')
return { x: s.x, y: s.y, side }
}
function toNumber(v?: string) {
if (!v) return null
const n = parseFloat(v.replace(/[^0-9.]/g, ''))
return Number.isFinite(n) ? n : null
}
function savings(regular?: string, now?: string) {
const a = toNumber(regular)
const b = toNumber(now)
if (a === null || b === null || a <= b) return null
const cur = (now || '').match(/^[^0-9]*/)?.[0] || ''
const d = a - b
return { amount: cur + (Number.isInteger(d) ? String(d) : d.toFixed(2)), pct: Math.round((d / a) * 100) }
}
function pad(n: number) {
return String(n).padStart(2, '0')
}
function statusFrom(s: WhatsInside7State): Status {
return s === 'error' ? 'error' : 'idle'
}
function Headline({ text, mark }: { text: string; mark?: string }) {
const at = mark ? text.indexOf(mark) : -1
if (!mark || at < 0) return <>{text}</>
return (
<>
{text.slice(0, at)}
<span className='wi7-hl'>{mark}</span>
{text.slice(at + mark.length)}
</>
)
}
// Designed artwork, official payment marks and black/white alpha shadows retain their colours.
const CSS = `
.cf-whats-inside-7{--wi7-surface:var(--surface,#ffffff);--wi7-card:var(--card,#ffffff);--wi7-ink:var(--ink,#101828);--wi7-muted:var(--muted,#4a5565);--wi7-accent:var(--accent,#0f5fc2);--wi7-slab:var(--band,#0f2747);--wi7-slab-ink:var(--band-ink,#ffffff);--wi7-cta:var(--cta,#d92d20);--wi7-cta2:var(--cta-2,#b42318);--wi7-cta-ink:var(--cta-ink,#ffffff);--wi7-marker:var(--marker, #fae37c);--wi7-r:var(--radius,14px);--wi7-line:oklch(from var(--wi7-ink) l c h / 0.13);position:relative;isolation:isolate;overflow:hidden;overflow:clip;background:var(--wi7-surface);color:var(--wi7-ink);font-family:var(--font-body,Arial,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,4vw,40px) clamp(64px,8.5vw,120px)}
.cf-whats-inside-7 *,.cf-whats-inside-7 *::before,.cf-whats-inside-7 *::after{box-sizing:border-box}
:where(.cf-whats-inside-7) .wi7-wrap{max-width:1200px;margin:0 auto}
:where(.cf-whats-inside-7) .wi7-head{max-width:1040px;margin:0 0 clamp(32px,4.5vw,60px)}
:where(.cf-whats-inside-7) .wi7-h{margin:0;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight, 900);font-size:clamp(2.5rem,7vw,5.75rem);line-height:.98;letter-spacing:var(--display-tracking, -.04em);color:var(--wi7-ink);text-wrap:balance;text-transform:var(--display-case, none)}
:where(.cf-whats-inside-7) .wi7-hl{color:inherit;background-image:linear-gradient(var(--wi7-marker),var(--wi7-marker));background-repeat:no-repeat;background-position:0 88%;background-size:100% .52em;padding:0 .08em;margin:0 -.04em;border-radius:.14em .34em .2em .42em;-webkit-box-decoration-break:clone;box-decoration-break:clone;animation:wi7-ink .65s cubic-bezier(.3,.7,.2,1) .2s both}
:where(.cf-whats-inside-7) .wi7-lead{margin:clamp(14px,1.6vw,22px) 0 0;max-width:46ch;font-size:clamp(1.1875rem,2vw,1.625rem);font-weight:500;line-height:1.35;letter-spacing:-.005em;color:var(--wi7-ink);text-wrap:pretty}
:where(.cf-whats-inside-7) .wi7-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:clamp(32px,5vw,72px);align-items:start}
:where(.cf-whats-inside-7) .wi7-grid--solo{grid-template-columns:minmax(0,1fr);max-width:720px}
:where(.cf-whats-inside-7) .wi7-left{position:sticky;top:var(--wi7-sticky-top,24px)}
:where(.cf-whats-inside-7) .wi7-fig{position:relative;margin:0;padding-right:clamp(12px,1.6vw,22px)}
:where(.cf-whats-inside-7) .wi7-slab{position:absolute;z-index:0;top:clamp(22px,3vw,40px);left:clamp(22px,3vw,40px);right:0;bottom:0;border-radius:var(--card-radius, var(--radius, calc(var(--wi7-r) + 4px)));background:var(--wi7-slab);box-shadow:var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));border-color:var(--card-border, oklch(from var(--ink) l c h / 0.12))}
:where(.cf-whats-inside-7) .wi7-photo{position:relative;z-index:1;aspect-ratio:3/2}
:where(.cf-whats-inside-7) .wi7-shot{position:absolute;inset:0;overflow:hidden;border-radius:var(--card-radius, var(--radius, var(--wi7-r)));background:color-mix(in oklch,var(--wi7-ink) 6%,var(--wi7-card));box-shadow:var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));border-color:var(--card-border, oklch(from var(--ink) l c h / 0.12))}
:where(.cf-whats-inside-7) .wi7-shot>img{display:block;width:100%;height:100%;object-fit:cover}
:where(.cf-whats-inside-7) .wi7-collage{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:12px;padding:clamp(14px,2vw,24px);align-items:center}
:where(.cf-whats-inside-7) .wi7-ctile{display:grid;place-items:center;height:100%;min-width:0}
:where(.cf-whats-inside-7) .wi7-ctile img{display:block;max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 2px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.28))}
:where(.cf-whats-inside-7) .wi7-pin{position:absolute;z-index:2;width:44px;height:44px;margin:-22px 0 0 -22px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--button-2-ink, var(--ink));font:inherit;line-height:1.6;cursor:pointer;-webkit-tap-highlight-color:transparent;animation:wi7-pop .42s cubic-bezier(.3,1.4,.5,1) both;animation-delay:calc(var(--i,0) * 90ms + 180ms)}
:where(.cf-whats-inside-7) .wi7-pin:focus-visible{outline:none}
:where(.cf-whats-inside-7) .wi7-dot{position:absolute;inset:5px;display:grid;place-items:center;border-radius:var(--button-radius, 50%);background:var(--button-2-bg, var(--card));color:var(--button-2-ink, var(--ink));font-family:var(--button-font, var(--font-display));font-weight:var(--button-weight, 900);font-size:15px;line-height:1;font-variant-numeric:tabular-nums;box-shadow:var(--button-shadow, var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14)));transition:transform .2s ease,background-color .2s ease,color .2s ease;text-transform:var(--display-case, none)}
:where(.cf-whats-inside-7) .wi7-dot::after{content:'';position:absolute;inset:-3px;border-radius:50%;border:2px solid var(--wi7-card);opacity:0;animation:wi7-ping 1.8s ease-out 1s 3}
:where(.cf-whats-inside-7) .wi7-pin:hover .wi7-dot,:where(.cf-whats-inside-7) .wi7-pin[data-on] .wi7-dot{transform:scale(1.12);background:var(--button-2-bg, var(--card));color:var(--button-2-ink, var(--ink))}
:where(.cf-whats-inside-7) .wi7-pin:focus-visible .wi7-dot{outline:3px solid var(--wi7-ink);outline-offset:4px}
:where(.cf-whats-inside-7) .wi7-tag{position:absolute;top:50%;left:calc(100% - 2px);transform:translateY(-50%);white-space:nowrap;padding:.5rem .875rem;border-radius:999px;background:var(--wi7-card);color:var(--wi7-ink);font-family:var(--font-body,Arial,sans-serif);font-weight:700;font-size:15px;line-height:1.1;box-shadow:0 0 0 1px oklch(from var(--wi7-ink) l c h / 0.1),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14));transition:box-shadow .2s ease}
:where(.cf-whats-inside-7) .wi7-pin[data-side='left'] .wi7-tag{left:auto;right:calc(100% - 2px)}
:where(.cf-whats-inside-7) .wi7-pin:hover .wi7-tag,:where(.cf-whats-inside-7) .wi7-pin[data-on] .wi7-tag{box-shadow:0 0 0 2px var(--wi7-ink),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14))}
:where(.cf-whats-inside-7) .wi7-cap{position:relative;z-index:1;margin:0 calc(-1 * clamp(12px,1.6vw,22px)) 0 0;padding:clamp(16px,1.8vw,22px) 16px clamp(18px,2vw,24px) calc(clamp(22px,3vw,40px) + 16px);text-align:center;color:var(--wi7-slab-ink);font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight, 800);font-size:clamp(1.0625rem,1.6vw,1.3125rem);line-height:1.3;letter-spacing:var(--display-tracking, -.01em);text-wrap:balance;text-transform:var(--display-case, none);background:var(--band)}
:where(.cf-whats-inside-7) .wi7-rail{list-style:none;margin:0;padding:0;display:grid;gap:4px}
:where(.cf-whats-inside-7) .wi7-row{position:relative;display:grid;grid-template-columns:clamp(4.5rem,8vw,7.25rem) minmax(0,1fr);column-gap:clamp(14px,2vw,26px);align-items:start;padding:clamp(14px,1.6vw,20px) clamp(14px,1.6vw,20px) clamp(14px,1.6vw,20px) clamp(4px,.6vw,8px);border-radius:var(--wi7-r);transition:background-color .22s ease,box-shadow .22s ease;animation:wi7-rise .45s ease both;animation-delay:calc(var(--i,0) * 70ms)}
:where(.cf-whats-inside-7) .wi7-row[data-on]{background:color-mix(in oklch,var(--accent-fill,var(--wi7-accent)) 6%,var(--wi7-card));box-shadow:0 0 0 1px oklch(from var(--accent-fill,var(--wi7-accent)) l c h / 0.22),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14))}
:where(.cf-whats-inside-7) .wi7-num{display:block;align-self:stretch;white-space:nowrap;padding-right:clamp(10px,1.4vw,18px);border-right:2px solid var(--wi7-line);font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight, 900);font-size:clamp(2.75rem,5vw,4.5rem);line-height:.84;letter-spacing:var(--display-tracking, -.05em);color:var(--wi7-accent);font-variant-numeric:tabular-nums;text-align:right;text-transform:var(--display-case, none)}
:where(.cf-whats-inside-7) .wi7-body{display:grid;grid-template-columns:auto minmax(0,1fr);gap:clamp(12px,1.4vw,18px);align-items:start;min-width:0}
:where(.cf-whats-inside-7) .wi7-body--plain{grid-template-columns:minmax(0,1fr)}
:where(.cf-whats-inside-7) .wi7-thumb{display:block;width:clamp(56px,6vw,76px);aspect-ratio:1;overflow:hidden;border-radius:calc(var(--wi7-r) - 4px);background:transparent;box-shadow:none;filter:drop-shadow(0 2px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.28))}
:where(.cf-whats-inside-7) .wi7-thumb img{display:block;width:100%;height:100%;object-fit:cover}
:where(.cf-whats-inside-7) .wi7-name{margin:0;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight, 800);font-size:clamp(1.1875rem,1.9vw,1.5rem);line-height:1.15;letter-spacing:var(--display-tracking, -.015em);color:var(--wi7-ink);text-wrap:balance;text-transform:var(--display-case, none)}
:where(.cf-whats-inside-7) .wi7-detail{margin:6px 0 0;font-size:clamp(1rem,1.3vw,1.0625rem);line-height:1.45;color:var(--wi7-muted);text-wrap:pretty}
:where(.cf-whats-inside-7) .wi7-value{display:inline-flex;gap:.3em;margin:10px 0 0;padding:.25rem .75rem;border-radius:999px;background:color-mix(in oklch,var(--wi7-ink) 5%,var(--wi7-card));color:var(--wi7-ink);font-size:14px;font-weight:600;line-height:1.3}
:where(.cf-whats-inside-7) .wi7-value strong{font-weight:800}
:where(.cf-whats-inside-7) .wi7-order{margin-top:clamp(20px,2.6vw,32px);padding:clamp(22px,3vw,34px) clamp(18px,3vw,34px);border-radius:var(--card-radius, var(--radius, calc(var(--wi7-r) + 4px)));background:var(--wi7-card);border:1px solid oklch(from var(--wi7-ink) l c h / 0.16);box-shadow:var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));text-align:center;color:var(--wi7-ink);border-color:var(--card-border, oklch(from var(--ink) l c h / 0.12))}
:where(.cf-whats-inside-7) .wi7-reg{margin:0;font-size:clamp(1.0625rem,1.5vw,1.25rem);font-weight:600;color:var(--wi7-ink)}
:where(.cf-whats-inside-7) .wi7-reg s{margin-left:.25em;font-weight:800;text-decoration-color:var(--danger);text-decoration-thickness:3px;color:var(--danger)}
:where(.cf-whats-inside-7) .wi7-today{margin:clamp(6px,1vw,10px) 0 0;display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;column-gap:.4em;row-gap:2px}
:where(.cf-whats-inside-7) .wi7-today-l{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight, 800);font-size:clamp(1.25rem,2.1vw,1.625rem);letter-spacing:var(--display-tracking, -.01em);line-height:1.2;text-wrap:balance;text-transform:var(--display-case, none)}
:where(.cf-whats-inside-7) .wi7-price{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight, 900);font-size:clamp(3rem,6vw,4.25rem);line-height:1;letter-spacing:var(--display-tracking, -.04em);font-variant-numeric:tabular-nums;text-transform:var(--display-case, none)}
:where(.cf-whats-inside-7) .wi7-meta{margin:14px 0 0;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px 14px}
:where(.cf-whats-inside-7) .wi7-save{display:inline-flex;padding:.35rem .875rem;border-radius:999px;background:var(--success-soft);color:var(--success);font-size:15px;font-weight:800;line-height:1.3}
:where(.cf-whats-inside-7) .wi7-note{font-size:15px;font-weight:600;color:var(--wi7-muted)}
:where(.cf-whats-inside-7) .wi7-act{margin-top:clamp(18px,2.2vw,24px)}
:where(.cf-whats-inside-7) .wi7-btn{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;width:100%;min-height:clamp(64px,7vw,74px);padding:12px clamp(14px,2vw,22px);border:1px solid oklch(from var(--wi7-cta2) calc(l - 0.06) c h);border-radius:var(--button-radius, var(--radius, calc(var(--wi7-r) - 4px)));background:linear-gradient(180deg,var(--button-bg,var(--cta)),var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h)));color:var(--button-ink, var(--cta-ink));font-family:var(--button-font, var(--font-display));font-weight:var(--button-weight, 800);font-size:clamp(1.125rem,2vw,1.5rem);line-height:1.15;letter-spacing:-.005em;text-align:center;text-wrap:balance;text-shadow:var(--button-text-shadow, 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h / 0.75));cursor:pointer;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));transition:transform .14s ease,box-shadow .14s ease,filter .14s ease;border-color:var(--button-bg-2, var(--cta-2));text-transform:var(--button-case, none)}
:where(.cf-whats-inside-7) .wi7-btn::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(105deg,transparent 38%,oklch(from var(--card) l c h / 0.26) 50%,transparent 62%);background-size:260% 100%;background-position:130% 0;transition:background-position .7s ease}
:where(.cf-whats-inside-7) .wi7-btn:hover:not(:disabled),:where(.cf-whats-inside-7) .wi7-btn[data-force='hover']{transform:translateY(-1px);filter:none;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-whats-inside-7) .wi7-btn:hover:not(:disabled)::after,:where(.cf-whats-inside-7) .wi7-btn[data-force='hover']::after{background-position:-30% 0}
:where(.cf-whats-inside-7) .wi7-btn:active:not(:disabled),:where(.cf-whats-inside-7) .wi7-btn[data-force='active']{transform:translateY(2px);filter:none;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14)))}
:where(.cf-whats-inside-7) .wi7-btn:focus-visible{outline:3px solid var(--wi7-accent);outline-offset:4px}
:where(.cf-whats-inside-7) .wi7-btn:disabled{cursor:not-allowed;text-shadow:none;filter:none;opacity:1;transform:none;box-shadow:var(--button-shadow, var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14)));background:var(--button-2-bg, var(--card));color:var(--button-2-ink, var(--ink));border-color:var(--button-2-border, oklch(from var(--ink) l c h / 0.22))}
:where(.cf-whats-inside-7) .wi7-btn[aria-busy='true']{cursor:progress}
:where(.cf-whats-inside-7) .wi7-btn-row{display:inline-flex;align-items:center;justify-content:center;gap:10px}
:where(.cf-whats-inside-7) .wi7-spin{width:1.1em;height:1.1em;flex:none;animation:wi7-spin .8s linear infinite}
:where(.cf-whats-inside-7) .wi7-link{display:inline-block;margin:12px auto 0;padding:6px 8px;border:0;border-radius:var(--button-radius, var(--radius, 6px));background:transparent;color:var(--link,var(--accent));font-family:var(--button-font, var(--font-display));font-weight:var(--button-weight, 700);font-size:clamp(1.0625rem,1.5vw,1.1875rem);line-height:1.3;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / 0.45);text-decoration-thickness:2px;text-underline-offset:.18em;cursor:pointer;text-transform:var(--button-case, none)}
:where(.cf-whats-inside-7) .wi7-link:hover:not(:disabled),:where(.cf-whats-inside-7) .wi7-link:focus-visible{color:oklch(from var(--link,var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor;text-decoration-thickness:3px}
:where(.cf-whats-inside-7) .wi7-link:focus-visible{outline:3px solid var(--wi7-accent);outline-offset:2px}
:where(.cf-whats-inside-7) .wi7-link:disabled{color:var(--wi7-muted);cursor:not-allowed}
:where(.cf-whats-inside-7) .wi7-err{display:flex;align-items:flex-start;justify-content:center;gap:8px;margin:0 0 12px;padding:.625rem .875rem;border-radius:10px;background:var(--danger-soft);border:1px solid oklch(from var(--danger) l c h / 0.35);color:var(--ink);font-size:15px;font-weight:600;line-height:1.4;text-align:left;text-wrap:pretty;animation:wi7-rise .3s ease both}
:where(.cf-whats-inside-7) .wi7-err svg{flex:none;width:18px;height:18px;margin-top:1px}
:where(.cf-whats-inside-7) .wi7-secure{display:flex;align-items:center;justify-content:center;gap:7px;margin:12px 0 0;font-size:15px;font-weight:600;color:var(--wi7-muted);text-wrap:pretty}
:where(.cf-whats-inside-7) .wi7-secure svg{width:16px;height:16px;flex:none}
:where(.cf-whats-inside-7) .wi7-assure{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px}
:where(.cf-whats-inside-7) .wi7-assure li{display:inline-flex;align-items:center;gap:7px;font-size:15px;font-weight:600;color:var(--wi7-ink)}
:where(.cf-whats-inside-7) .wi7-assure svg{width:18px;height:18px;color:var(--wi7-accent);flex:none}
:where(.cf-whats-inside-7) .wi7-pay{list-style:none;margin:16px 0 0;padding:0;display:flex;justify-content:center;flex-wrap:wrap;gap:8px}
:where(.cf-whats-inside-7) .wi7-pay li{display:block;line-height:0}
:where(.cf-whats-inside-7) .wi7-pay svg{display:block;width:42px;height:28px}
@keyframes wi7-ink{from{background-size:0 .52em}to{background-size:100% .52em}}
@keyframes wi7-pop{from{opacity:0;transform:scale(.5)}to{opacity:1;transform:none}}
@keyframes wi7-ping{0%{transform:scale(1);opacity:.85}100%{transform:scale(1.9);opacity:0}}
@keyframes wi7-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes wi7-spin{to{transform:rotate(360deg)}}
@media (max-width:959px){:where(.cf-whats-inside-7) .wi7-grid{grid-template-columns:minmax(0,1fr)}:where(.cf-whats-inside-7) .wi7-left{position:relative;top:auto}}
@media (max-width:639px){:where(.cf-whats-inside-7) .wi7-tag{display:none}:where(.cf-whats-inside-7) .wi7-row{grid-template-columns:3.75rem minmax(0,1fr);padding-left:0;padding-right:12px}:where(.cf-whats-inside-7) .wi7-num{font-size:2.25rem;padding-right:10px}:where(.cf-whats-inside-7) .wi7-order{padding:22px 18px;border-color:var(--card-border, oklch(from var(--ink) l c h / 0.12))}}
@media (prefers-reduced-motion:reduce){.cf-whats-inside-7 *,.cf-whats-inside-7 *::before,.cf-whats-inside-7 *::after{animation:none!important;transition:none!important}}
`
type WhatsInside7Copy = {
/** Uses {number} and {name}. */
pinAria: string
visa: string
mastercard: string
amex: string
discover: string
/** Uses {amount} and {percent}. */
savings: string
itemValue: string
contents: string
order: string
payments: string
}
const DEFAULT_COPY: WhatsInside7Copy = {
"pinAria": "{number}: {name}",
"visa": "Visa",
"mastercard": "Mastercard",
"amex": "American Express",
"discover": "Discover",
"savings": "You save {amount} ({percent}%)",
"itemValue": "Value",
"contents": "What you get",
"order": "Order the kit",
"payments": "Cards accepted"
}
function copyText(template: string, values: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => Object.hasOwn(values, key) ? String(values[key]) : match)
}
pieces/offer/whats-inside-7/specimen.tsx 49 lines
import __studioImage2badc0e7 from "../assets/232f4a2849496937.webp";
import * as React from 'react'
import WhatsInside7, { type WhatsInside7Item, type WhatsInside7State } from '../whats-inside-7'
import { slot } from '../../slots'
import defaults from '../../studio-defaults.json'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
const SPOTS: NonNullable<WhatsInside7Item['spot']>[] = [
{ x: 22, y: 48, side: 'right' },
{ x: 52, y: 72, side: 'left' },
{ x: 76, y: 28, side: 'left' },
]
export default function WhatsInside7Specimen({ state = 'default' }: { state?: WhatsInside7State }) {
const s = defaults.sample
const items: WhatsInside7Item[] = s.items.map((it, i) => ({
name: it.name,
detail: it.detail,
value: it.value,
itemImage: slot(`item-${i + 1}`, it.image),
imageAlt: it.imageAlt,
spot: SPOTS[i],
}))
return (
<div>
<WhatsInside7
state={state}
headline='Here’s everything inside.'
emphasis='everything inside'
lead={`${s.name}: a clear plan for your first funnel.`}
productImage={slot("product", __studioImage2badc0e7)}
imageAlt='The Funnel Planning Guide, Page Copy Workbook and Launch Checklist laid out flat on a desk'
caption='Three practical resources. One instant download.'
items={items}
regularLabel='Regular price'
regularPrice={s.regularPrice}
todayLabel={s.todayLabel}
price={s.price}
note={s.note}
label={s.label}
sublabel={s.sublabel}
linkLabel='Click here to add to cart'
reassurance={s.reassurance}
/>
</div>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalWhatsInside7 |
Partial<WhatsInside7Copy> |
|
headline OptionalWhatsInside7 |
string |
Default 'Here’s everything inside.'
|
emphasis OptionalWhatsInside7 |
string |
Default 'everything inside'
|
lead OptionalWhatsInside7 |
string |
Default 'The Funnel Starter Kit: a clear plan for your first funnel.'
|
itemImage OptionalWhatsInside7 |
string |
|
productImage OptionalWhatsInside7 |
string |
Default legacyImage
|
image OptionalWhatsInside7 |
string |
|
imageAlt OptionalWhatsInside7 |
string |
Default 'Everything in the kit, laid out flat on a desk'
|
caption OptionalWhatsInside7 |
string | false |
Default 'Three practical resources in one download.'
|
items OptionalWhatsInside7 |
WhatsInside7Item[] |
Default DEFAULT_ITEMS
|
regularLabel OptionalWhatsInside7 |
string |
Default 'Regular price'
|
regularPrice OptionalWhatsInside7 |
string |
|
todayLabel OptionalWhatsInside7 |
string |
Default 'Get the complete kit for'
|
price OptionalWhatsInside7 |
string |
Default '$47'
|
note OptionalWhatsInside7 |
string |
|
showSavings OptionalWhatsInside7 |
boolean |
Default true
|
label OptionalWhatsInside7 |
string |
Default 'Yes! Give Me Access'
|
loadingLabel OptionalWhatsInside7 |
string |
Default 'Opening secure checkout…'
|
sublabel OptionalWhatsInside7 |
string | false |
Default ''
|
linkLabel OptionalWhatsInside7 |
string | false |
Default 'Click here to add to cart'
|
reassurance OptionalWhatsInside7 |
string[] |
Default []
|
paymentMarks OptionalWhatsInside7 |
WhatsInside7PaymentMark[] |
Default ['visa', 'mastercard', 'amex', 'discover']
|
successMessage OptionalWhatsInside7 |
string |
|
successNote OptionalWhatsInside7 |
string | false |
|
errorMessage OptionalWhatsInside7 |
string |
Default 'We couldn’t open checkout. Please try again.'
|
onSubmit OptionalWhatsInside7 |
() => void | Promise<unknown> |
Default onAction
|
onAction OptionalWhatsInside7 |
() => void | Promise<unknown> |
|
disabled OptionalWhatsInside7 |
boolean |
Default false
|
state OptionalWhatsInside7 |
WhatsInside7State |
Default 'default'
|
id OptionalWhatsInside7 |
string |
|
className OptionalWhatsInside7 |
string |
|
style OptionalWhatsInside7 |
React.CSSProperties |
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- 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.
--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).
-
232f4a2849496937.webp
image/webp · 41.8 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB