Two Choices Close 8
Closes the letter with two choices, an itemized offer, and a personal postscript.
Use it in a prompt
Use content/two-choices-close-8 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/content/two-choices-close-8.tsx. - Import it and pass your copy and images (Props tab):
import { TwoChoicesClose8 } from "@/components/funneldna/content/two-choices-close-8"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/two-choices-close-8/component.tsx 479 lines
// Closes the letter with two choices, an itemized offer, and a personal postscript.
'use client'
import * as React from 'react'
import { motion, useReducedMotion } from 'motion/react'
import { AlertCircle, Loader2, Lock, ShieldCheck, X } from 'lucide-react'
export type TwoChoicesClose8Props = {
headline?: string
emphasis?: string
lead?: string
oneTitle?: string
oneBody?: string
onePoints?: (string | { text: string })[]
oneNote?: string
twoTitle?: string
twoNote?: string
productName?: string
reason?: string
items?: MarginCloseItem[]
totalLabel?: string
/** Struck total value (falls back to the sum of item values); nothing renders without either. */
regularPrice?: string
price?: string
todayLabel?: string
note?: string
ctaLabel?: string
ctaSub?: string
loadingLabel?: string
valueSuffix?: string
saveLabel?: string
guarantee?: string
/** @deprecated No longer rendered: the builder wires what happens after the click. */
successTitle?: string
/** @deprecated No longer rendered: the builder wires what happens after the click. */
successMessage?: string
errorMessage?: string
ps?: React.ReactNode
/** Templates accept {product}, {price}, {guarantee}; rich emphasis is retained. */
copy?: Partial<typeof DEFAULT_COPY>
/** "success" is accepted for older callers and renders as default. */
state?: TwoChoicesClose8State
disabled?: boolean
/** Navigation destination; the button renders as a link when set. */
href?: string
/** Called on click. A returned promise shows the loading label; false or a rejection shows errorMessage. */
onAction?: () => void | boolean | Promise<void | boolean>
id?: string
className?: string
}
export function TwoChoicesClose8({
headline = 'You have two choices.',
emphasis = 'two choices.',
lead = 'Close this page and nothing changes. Or take the plan and build your first funnel, one clear step at a time.',
oneTitle = 'Keep doing what you’re doing',
oneBody = 'Keep piecing together your funnel, page copy, and launch steps on your own.',
onePoints: suppliedOnePoints = DEFAULT_POINTS,
oneNote = 'Costs nothing today. Changes nothing, either.',
twoTitle = 'Build your first funnel with a clear plan',
twoNote = 'Guide, workbook and checklist. One download.',
productName = 'The Funnel Starter Kit',
reason = 'Get the guide, workbook, and checklist in one download. One payment. Yours to keep.',
items,
totalLabel = 'Total value',
regularPrice,
price = '$47',
todayLabel = 'Get the complete kit for',
note,
ctaLabel = 'Yes! Give Me Access',
ctaSub,
loadingLabel = 'Opening secure checkout…',
valueSuffix = 'value',
saveLabel = 'Save',
guarantee,
errorMessage = 'We couldn’t open checkout. Please try again.',
ps,
copy,
state = 'default',
disabled = false,
href,
onAction,
id,
className = '',
}: TwoChoicesClose8Props) {
const onePoints = suppliedOnePoints.map((entry) => typeof entry === 'string' ? entry : entry.text)
const words = { ...DEFAULT_COPY, ...copy }
const reduce = useReducedMotion()
const uid = React.useId().replace(/:/g, '')
const headId = `tcm-h-${uid}`
const [status, setStatus] = React.useState<Status>(toStatus(state))
const mounted = React.useRef(true)
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
React.useEffect(() => {
setStatus(toStatus(state))
}, [state])
const isDisabled = disabled || state === 'disabled'
const forced = state === 'hover' ? ' is-hover' : state === 'active' ? ' is-active' : ''
const list = items && items.length ? items : DEFAULT_ITEMS
const sum = list.reduce((a, it) => a + num(it.value), 0)
const total = regularPrice || (isFinite(sum) && sum > 0 ? money(sym(list[0]?.value || price), sum) : '')
const a = num(total)
const b = num(price)
const save = isFinite(a) && isFinite(b) && a > b ? money(sym(price), a - b) : ''
async function handle(event: React.MouseEvent<HTMLElement>) {
if (isDisabled || status === 'loading') {
event.preventDefault()
return
}
if (!onAction) return
try {
const pending = onAction()
if (pending === false) return setStatus('error')
if (!pending || pending === true) return
setStatus('loading')
const result = await pending
if (mounted.current) setStatus(result === false ? 'error' : 'idle')
} catch {
if (mounted.current) setStatus('error')
}
}
const rv = (i: number) =>
reduce
? {}
: {
initial: { opacity: 0.82, y: 12 },
whileInView: { opacity: 1, y: 0 },
viewport: { once: true, margin: '-40px' },
transition: { duration: 0.45, delay: Math.min(i * 0.07, 0.28), ease: [0.2, 0.7, 0.2, 1] as [number, number, number, number] },
}
const btnContent = status === 'loading' ? (
<>
<Loader2 className='tcm-spin' aria-hidden='true' />
<span>{loadingLabel}</span>
</>
) : (
<span>{ctaLabel}</span>
)
const psNode = ps ?? <>{richTemplate(words.postscript, { product: <strong>{productName}</strong>, price: <strong>{price}</strong> })}{guarantee ? words.guarantee.split('{guarantee}').join(guarantee) : words.ending}</>
return (
<section id={id} className={`cf-two-choices-close-8 tcm ${className}`.trim()} aria-labelledby={headId}>
<style>{CSS}</style>
<div className='tcm-wrap'>
<header className='tcm-head'>
<h2 id={headId} className='tcm-h'>
<Emph text={headline} phrase={emphasis} />
</h2>
{lead ? <p className='tcm-lead'>{lead}</p> : null}
</header>
<div className='tcm-sheet'>
<motion.div className='tcm-row tcm-row-one' {...rv(0)}>
<div className='tcm-margin'>
<span className='tcm-num tcm-num-one' aria-hidden='true'>{words.oneNumber}</span>
{oneNote ? <p className='tcm-note'>{oneNote}</p> : null}
</div>
<div className='tcm-one'>
<h3 className='tcm-one-h'>
<span className='tcm-sr'>{words.oneLabel}</span>
{oneTitle}
</h3>
{oneBody ? <p className='tcm-one-b'>{oneBody}</p> : null}
{onePoints && onePoints.length ? (
<ul className='tcm-one-list'>
{onePoints.map((p) => (
<li key={p}>
<span className='tcm-x' aria-hidden='true'>
<X />
</span>
<span>{p}</span>
</li>
))}
</ul>
) : null}
</div>
</motion.div>
<motion.div className='tcm-row tcm-row-two' {...rv(1)}>
<div className='tcm-margin'>
<span className='tcm-num tcm-num-two' aria-hidden='true'>{words.twoNumber}</span>
{twoNote ? <p className='tcm-note tcm-note-two'>{twoNote}</p> : null}
</div>
<article className='tcm-offer' aria-labelledby={`${headId}-two`}>
<div className='tcm-offer-head'>
<h3 id={`${headId}-two`} className='tcm-offer-h'>
<span className='tcm-sr'>{words.twoLabel}</span>
{twoTitle}
</h3>
</div>
<div className='tcm-offer-body'>
<p className='tcm-product'>{productName}</p>
{reason ? <p className='tcm-reason'>{reason}</p> : null}
<ul className='tcm-items' aria-label={words.itemsLabel.split('{product}').join(productName)}>
{list.map((it) => (
<li key={it.name} className={(it.itemImage === undefined ? it.image : it.itemImage) ? 'has-img' : undefined}>
{(it.itemImage === undefined ? it.image : it.itemImage) ? <img src={(it.itemImage === undefined ? it.image : it.itemImage)} alt={it.imageAlt || it.name} width={64} height={64} loading='lazy' /> : null}
<div>
<p className='tcm-item-n'>{it.name}</p>
{it.detail ? <p className='tcm-item-d'>{it.detail}</p> : null}
</div>
{it.value ? (
<p className='tcm-item-v'>
{it.value}
<span>{' '}{valueSuffix}</span>
</p>
) : null}
</li>
))}
</ul>
<div className='tcm-price'>
<div>
<p className='tcm-today'>{todayLabel}</p>
{total ? (
<p className='tcm-was'>
{totalLabel}{' '}
<s>
<span className='tcm-sr'>{words.regularPrice}</span>
{total}
</s>
</p>
) : null}
</div>
<div className='tcm-price-r'>
{save ? <span className='tcm-save'>{saveLabel} {save}</span> : null}
<p className='tcm-now'>
<span className='tcm-sr'>{words.todayPrice}</span>
{price}
</p>
</div>
</div>
{note ? <p className='tcm-pnote'>{note}</p> : null}
<div className='tcm-cta'>
<>
{href && !isDisabled ? (
<a
href={href}
className={'tcm-btn' + forced}
onClick={handle}
aria-busy={status === 'loading' ? 'true' : undefined}
>
{btnContent}
</a>
) : (
<button
type='button'
className={'tcm-btn' + forced}
onClick={handle}
disabled={isDisabled}
aria-busy={status === 'loading' ? 'true' : undefined}
>
{btnContent}
</button>
)}
{status === 'error' ? (
<p className='tcm-err' role='alert'>
<AlertCircle aria-hidden='true' />
<span>{errorMessage}</span>
</p>
) : null}
{ctaSub ? (
<p className='tcm-sub'>
<Lock aria-hidden='true' />
<span>{ctaSub}</span>
</p>
) : null}
</>
{guarantee ? (
<p className='tcm-guar'>
<ShieldCheck aria-hidden='true' />
<strong>{guarantee}</strong>
</p>
) : null}
</div>
</div>
</article>
</motion.div>
{psNode ? (
<motion.div className='tcm-row tcm-row-ps' {...rv(2)}>
<p className='tcm-ps'>
<strong>{words.postscriptLabel}</strong>{' '}
{psNode}
</p>
</motion.div>
) : null}
</div>
</div>
</section>
)
}
export default TwoChoicesClose8
export type MarginCloseItem = { name: string; detail?: string; value?: string; itemImage?: string; image?: string; imageAlt?: string }
/** "success" is accepted for older callers and renders as default. */
export type TwoChoicesClose8State = 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
type Status = 'idle' | 'loading' | 'error'
const DEFAULT_POINTS = [
'Guess which pages your funnel actually needs',
'Stare at a blank page trying to write your headline',
'Launch, then find the broken link the hard way',
]
const DEFAULT_ITEMS: MarginCloseItem[] = [
{ name: 'Funnel Planning Guide', detail: 'Map your offer and the pages your funnel needs.' },
{ name: 'Page Copy Workbook', detail: 'Draft your headline, offer, and call to action.' },
{ name: 'Launch Checklist', detail: 'Review the links, forms, and next steps before launch.' },
]
function toStatus(s?: TwoChoicesClose8State): Status {
return s === 'error' ? 'error' : 'idle'
}
function num(v?: string) {
if (!v) return NaN
return parseFloat(v.replace(/[^0-9.]/g, ''))
}
function sym(v?: string) {
return (v || '').match(/^[^0-9]*/)?.[0] ?? ''
}
function money(s: string, n: number) {
return s + (Number.isInteger(n) ? String(n) : n.toFixed(2))
}
function Emph({ text, phrase }: { text: string; phrase?: string }) {
const i = phrase ? text.indexOf(phrase) : -1
if (!phrase || i < 0) return <>{text}</>
return (
<>
{text.slice(0, i)}
<span className='tcm-mark'>{phrase}</span>
{text.slice(i + phrase.length)}
</>
)
}
const CSS = `
.cf-two-choices-close-8{--tcm-marker:var(--marker,#fae37c);--tcm-r:var(--radius,16px);--tcm-rail:clamp(210px,21vw,268px);--tcm-rail-bg:color-mix(in oklch,var(--muted,#4a5565) 7%,var(--surface,#fff));--tcm-rail-line:oklch(from var(--muted,#4a5565) l c h / 0.15);--tcm-quiet:color-mix(in oklch,var(--muted,#4a5565) 9%,var(--surface,#fff));--tcm-quiet-ink:color-mix(in oklch,var(--ink,#101828) 72%,var(--muted,#4a5565));position:relative;isolation:isolate;overflow:hidden;background:var(--surface,#fff);color:var(--ink,#101828);font-family:var(--font-body,Arial,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,4vw,40px) clamp(64px,8vw,120px)}
.cf-two-choices-close-8 *,.cf-two-choices-close-8 *::before,.cf-two-choices-close-8 *::after{box-sizing:border-box}
.cf-two-choices-close-8 :where(h2,h3,p,ul){margin:0}
.cf-two-choices-close-8 :where(ul){padding:0;list-style:none}
.cf-two-choices-close-8 img{max-width:100%}
:where(.cf-two-choices-close-8) .tcm-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:where(.cf-two-choices-close-8) .tcm-wrap{position:relative;max-width:1120px;margin:0 auto}
:where(.cf-two-choices-close-8) .tcm-h{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(2.75rem,7.4vw,6.25rem);line-height:.98;letter-spacing:var(--display-tracking,-.04em);color:var(--ink,#101828);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close-8) .tcm-mark{color:var(--ink,#101828);padding:0 .1em;margin:0 -.04em;background-image:linear-gradient(var(--tcm-marker),var(--tcm-marker));background-repeat:no-repeat;background-position:0 90%;background-size:100% 62%;border-radius:.18em .5em .3em .62em/.5em .28em .6em .36em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
:where(.cf-two-choices-close-8) .tcm-lead{margin-top:clamp(18px,2.2vw,30px);max-width:48ch;font-size:clamp(1.125rem,1.7vw,1.375rem);line-height:1.5;font-weight:500;color:var(--muted,#4a5565);text-wrap:pretty}
:where(.cf-two-choices-close-8) .tcm-sheet{position:relative;display:grid;gap:clamp(28px,3.4vw,48px);margin-top:clamp(40px,5vw,72px)}
:where(.cf-two-choices-close-8) .tcm-row{position:relative;z-index:1;min-width:0}
:where(.cf-two-choices-close-8) .tcm-row>*{min-width:0}
:where(.cf-two-choices-close-8) .tcm-margin{text-align:center}
:where(.cf-two-choices-close-8) .tcm-num{display:inline-grid;place-items:center;flex:none;width:64px;height:64px;border-radius:50%;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:2.25rem;line-height:1;letter-spacing:var(--display-tracking,-.04em);padding-bottom:.06em;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close-8) .tcm-num-one{color:var(--tcm-quiet-ink);background:var(--card,#fff);border:2px solid var(--tcm-rail-line)}
:where(.cf-two-choices-close-8) .tcm-num-two{color:var(--band-ink);background:var(--band);box-shadow:0 0 0 5px oklch(from var(--accent-fill,var(--accent,#0f5fc2)) l c h / 0.16),0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.7)}
:where(.cf-two-choices-close-8) .tcm-note{font-size:1rem;line-height:1.45;font-weight:600;color:var(--muted,#4a5565);text-wrap:pretty;max-width:22ch}
:where(.cf-two-choices-close-8) .tcm-note-two{color:var(--ink,#101828);font-weight:800}
:where(.cf-two-choices-close-8) .tcm-one{background:var(--tcm-quiet);color:var(--muted,#4a5565);border:1px solid oklch(from var(--muted,#4a5565) l c h / 0.16);border-radius:var(--card-radius,var(--tcm-r));padding:clamp(22px,3vw,36px);border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12));box-shadow:var(--card-shadow,0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.18));}
:where(.cf-two-choices-close-8) .tcm-one-h{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,800);font-size:clamp(1.625rem,3vw,2.375rem);line-height:1.08;letter-spacing:var(--display-tracking,-.025em);color:var(--tcm-quiet-ink);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close-8) .tcm-one-b{margin-top:14px;font-size:1.125rem;line-height:1.55;font-weight:500;max-width:52ch;text-wrap:pretty}
:where(.cf-two-choices-close-8) .tcm-one-list{display:grid;gap:10px;margin-top:18px}
:where(.cf-two-choices-close-8) .tcm-one-list li{display:grid;grid-template-columns:26px minmax(0,1fr);gap:12px;align-items:start;font-size:1.0625rem;line-height:1.45;text-wrap:pretty}
:where(.cf-two-choices-close-8) .tcm-x{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--danger);color:var(--card);margin-top:-1px}
:where(.cf-two-choices-close-8) .tcm-x svg{width:14px;height:14px;stroke-width:3}
:where(.cf-two-choices-close-8) .tcm-offer{position:relative;overflow:hidden;background:var(--card,#fff);border:1px solid oklch(from var(--ink,#101828) l c h / 0.14);border-radius:var(--card-radius,var(--tcm-r));box-shadow:var(--card-shadow,0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.18));transition:transform .25s ease,box-shadow .25s ease;border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12));}
:where(.cf-two-choices-close-8) .tcm-offer:hover,:where(.cf-two-choices-close-8) .tcm-offer:focus-within{transform:translateY(-3px);box-shadow:var(--card-shadow,0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.18));}
:where(.cf-two-choices-close-8) .tcm-offer-head{position:relative;overflow:hidden;background:var(--band,#0f2747);color:var(--band-ink,#fff);padding:clamp(24px,3.2vw,38px)}
:where(.cf-two-choices-close-8) .tcm-offer-head::after{content:'2';position:absolute;right:.04em;bottom:-.3em;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(8rem,15vw,13rem);line-height:1;letter-spacing:var(--display-tracking,-.06em);color:oklch(from var(--band,#0f2747) calc(l - 0.03) c h);pointer-events:none;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close-8) .tcm-offer-h{position:relative;z-index:1;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(1.875rem,3.6vw,2.875rem);line-height:1.04;letter-spacing:var(--display-tracking,-.03em);color:var(--band-ink,#fff);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close-8) .tcm-offer-body{padding:clamp(22px,3.2vw,38px)}
:where(.cf-two-choices-close-8) .tcm-product{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(1.5rem,2.6vw,2.125rem);line-height:1.08;letter-spacing:var(--display-tracking,-.025em);color:var(--ink);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close-8) .tcm-reason{margin-top:10px;font-size:1.0625rem;line-height:1.5;font-weight:500;color:var(--muted,#4a5565);max-width:54ch;text-wrap:pretty}
:where(.cf-two-choices-close-8) .tcm-items{display:grid;gap:10px;margin-top:22px}
:where(.cf-two-choices-close-8) .tcm-items li{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;align-items:start;padding:12px 14px;border-radius:var(--card-radius,calc(var(--tcm-r) * .7));background:color-mix(in oklch,var(--muted,#4a5565) 5%,var(--card,#fff));border:1px solid oklch(from var(--ink) l c h / 0.08);}
:where(.cf-two-choices-close-8) .tcm-items li.has-img{grid-template-columns:64px minmax(0,1fr) auto}
:where(.cf-two-choices-close-8) .tcm-items img{display:block;width:64px;height:64px;object-fit:cover;border-radius:10px;background:transparent;border:1px solid oklch(from var(--muted,#4a5565) l c h / 0.14);box-shadow:none;border-color:transparent;filter:drop-shadow(0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.2));}
:where(.cf-two-choices-close-8) .tcm-item-n{font-weight:800;font-size:1.0625rem;line-height:1.3;color:var(--ink,#101828);text-wrap:balance}
:where(.cf-two-choices-close-8) .tcm-item-d{margin-top:3px;font-size:.9375rem;line-height:1.45;color:var(--muted,#4a5565);text-wrap:pretty}
:where(.cf-two-choices-close-8) .tcm-item-v{font-weight:800;font-size:1rem;line-height:1.3;color:var(--ink,#101828);white-space:nowrap;padding-top:1px}
:where(.cf-two-choices-close-8) .tcm-item-v span{font-weight:600;color:var(--muted,#4a5565)}
:where(.cf-two-choices-close-8) .tcm-price{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:14px 20px;margin-top:22px;padding:20px 0 0;border-top:2px solid oklch(from var(--ink) l c h / 0.12);}
:where(.cf-two-choices-close-8) .tcm-today{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,800);font-size:clamp(1.125rem,1.8vw,1.375rem);line-height:1.2;color:var(--ink,#101828);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close-8) .tcm-was{margin-top:6px;font-size:1rem;font-weight:600;color:var(--muted,#4a5565)}
:where(.cf-two-choices-close-8) .tcm-was s{color:var(--danger);text-decoration-thickness:2px}
:where(.cf-two-choices-close-8) .tcm-price-r{display:flex;align-items:center;gap:12px}
:where(.cf-two-choices-close-8) .tcm-save{display:inline-flex;align-items:center;padding:7px 12px;border-radius:999px;background:var(--success-soft);color:var(--success);font-weight:800;font-size:.875rem;line-height:1;letter-spacing:.02em;white-space:nowrap}
:where(.cf-two-choices-close-8) .tcm-now{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(3rem,6vw,4.5rem);line-height:.92;letter-spacing:var(--display-tracking,-.045em);color:var(--ink,#101828);font-variant-numeric:tabular-nums;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close-8) .tcm-pnote{margin-top:12px;font-size:.9375rem;font-weight:600;color:var(--muted,#4a5565)}
:where(.cf-two-choices-close-8) .tcm-cta{margin-top:20px}
:where(.cf-two-choices-close-8) .tcm-btn{position:relative;display:flex;text-shadow:var(--button-text-shadow, 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h / 0.75));width:100%;min-height:68px;align-items:center;justify-content:center;gap:10px;padding:14px 22px;border:1px solid oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h);border-radius:var(--button-radius,calc(var(--tcm-r) * .7));background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta)) l c h),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,900);font-size:clamp(1.125rem,2.1vw,1.5rem);line-height:1.15;letter-spacing:var(--display-tracking,-.01em);text-align:center;text-wrap:balance;text-decoration:none;cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .3),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.22), 0 4px 10px -2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.2));transition:transform .15s ease,box-shadow .15s ease,filter .15s ease;text-transform:var(--button-case,none);border-color:var(--button-bg-2,var(--cta-2));}
:where(.cf-two-choices-close-8) .tcm-btn svg{width:22px;height:22px;flex:none}
:where(.cf-two-choices-close-8) .tcm-btn:hover:not(:disabled),:where(.cf-two-choices-close-8) .tcm-btn.is-hover:not(:disabled){transform:translateY(-2px);background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .3),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.22), 0 4px 10px -2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.2));}
:where(.cf-two-choices-close-8) .tcm-btn:active:not(:disabled),:where(.cf-two-choices-close-8) .tcm-btn.is-active:not(:disabled){transform:translateY(2px);background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h);color:contrast-color(oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .3),inset 0 -1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h), 0 1px 1px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.22));}
:where(.cf-two-choices-close-8) .tcm-btn:focus-visible{outline:3px solid var(--accent,#0f5fc2);outline-offset:3px}
:where(.cf-two-choices-close-8) .tcm-btn:disabled{text-shadow:none;cursor:not-allowed;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));box-shadow:none;filter:none}
:where(.cf-two-choices-close-8) .tcm-btn[aria-busy='true']{cursor:progress}
:where(.cf-two-choices-close-8) .tcm-spin{animation:tcm-spin .9s linear infinite}
@keyframes tcm-spin{to{transform:rotate(360deg)}}
:where(.cf-two-choices-close-8) .tcm-sub{display:block;margin-top:12px;font-size:.9375rem;font-weight:600;color:var(--muted,#4a5565);text-align:center;text-wrap:pretty}
:where(.cf-two-choices-close-8) .tcm-sub svg{width:15px;height:15px;display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
:where(.cf-two-choices-close-8) .tcm-guar{display:block;margin-top:14px;text-align:center;text-wrap:balance}
:where(.cf-two-choices-close-8) .tcm-guar svg{width:26px;height:26px;display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;color:var(--success)}
:where(.cf-two-choices-close-8) .tcm-guar strong{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,800);font-size:1.125rem;line-height:1.25;color:var(--ink,#101828);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close-8) .tcm-err{display:flex;align-items:flex-start;gap:10px;margin-top:12px;padding:12px 14px;border-radius:var(--card-radius,var(--radius,10px));background:var(--danger-soft);border:1px solid var(--danger);color:var(--danger);font-size:.9375rem;font-weight:700;line-height:1.4;text-wrap:pretty;border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12));box-shadow:var(--card-shadow,0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.18));}
:where(.cf-two-choices-close-8) .tcm-err svg{width:18px;height:18px;flex:none;margin-top:1px}
:where(.cf-two-choices-close-8) .tcm-ps{font-size:clamp(1.0625rem,1.5vw,1.25rem);line-height:1.6;color:var(--ink,#101828);max-width:58ch;text-wrap:pretty}
:where(.cf-two-choices-close-8) .tcm-ps strong{font-weight:800}
@media (min-width:900px){
:where(.cf-two-choices-close-8) .tcm-sheet{padding-block:clamp(20px,2vw,28px)}
:where(.cf-two-choices-close-8) .tcm-sheet::before{content:'';position:absolute;z-index:0;left:0;top:0;bottom:0;width:var(--tcm-rail);background:var(--tcm-rail-bg);border:1px solid var(--tcm-rail-line);border-radius:var(--tcm-r)}
:where(.cf-two-choices-close-8) .tcm-row{display:grid;grid-template-columns:var(--tcm-rail) minmax(0,1fr);column-gap:clamp(28px,3.6vw,56px);align-items:start}
:where(.cf-two-choices-close-8) .tcm-margin{display:grid;justify-items:center;gap:14px;padding:4px 24px 0}
:where(.cf-two-choices-close-8) .tcm-ps{grid-column:2;padding-top:14px}
}
@media (max-width:899px){
:where(.cf-two-choices-close-8) .tcm-row{display:grid;gap:12px}
:where(.cf-two-choices-close-8) .tcm-margin{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;justify-items:start;text-align:left;gap:14px;padding:12px 14px;background:var(--tcm-rail-bg);border:1px solid var(--tcm-rail-line);border-radius:calc(var(--tcm-r) * .75)}
:where(.cf-two-choices-close-8) .tcm-num{width:48px;height:48px;font-size:1.625rem}
:where(.cf-two-choices-close-8) .tcm-note{max-width:none}
}
@media (max-width:599px){
:where(.cf-two-choices-close-8) .tcm-btn{font-size:1.0625rem;padding-inline:14px;min-height:62px}
:where(.cf-two-choices-close-8) .tcm-items li{padding:10px 12px;gap:12px}
:where(.cf-two-choices-close-8) .tcm-items li.has-img{grid-template-columns:52px minmax(0,1fr) auto}
:where(.cf-two-choices-close-8) .tcm-items img{width:52px;height:52px}
:where(.cf-two-choices-close-8) .tcm-item-v span{display:none}
:where(.cf-two-choices-close-8) .tcm-guar strong{font-size:1.0625rem}
}
@media (prefers-reduced-motion:no-preference){
:where(.cf-two-choices-close-8) .tcm-mark{animation:tcm-sweep .7s .25s cubic-bezier(.2,.7,.2,1) both}
@keyframes tcm-sweep{from{background-size:0% 62%}to{background-size:100% 62%}}
}
@media (prefers-reduced-motion:reduce){
:where(.cf-two-choices-close-8) .tcm-offer,:where(.cf-two-choices-close-8) .tcm-btn{transition:none}
:where(.cf-two-choices-close-8) .tcm-offer:hover,:where(.cf-two-choices-close-8) .tcm-offer:focus-within{transform:none}
:where(.cf-two-choices-close-8) .tcm-btn:hover:not(:disabled),:where(.cf-two-choices-close-8) .tcm-btn.is-hover:not(:disabled),:where(.cf-two-choices-close-8) .tcm-btn:active:not(:disabled),:where(.cf-two-choices-close-8) .tcm-btn.is-active:not(:disabled){transform:none}
:where(.cf-two-choices-close-8) .tcm-spin{animation:none}
}
`
export { TwoChoicesClose8 as TwoChoicesMarginClose }
export type TwoChoicesMarginCloseProps = TwoChoicesClose8Props
export type TwoChoicesMarginState = TwoChoicesClose8State
const DEFAULT_COPY = {
oneNumber: '1', twoNumber: '2', oneLabel: 'Choice 1: ', twoLabel: 'Choice 2: ',
itemsLabel: 'What’s inside {product}', regularPrice: 'regular price ', todayPrice: 'Today’s price ',
postscriptLabel: 'P.S.',
postscript: 'Choice one costs nothing today, and it will still be there tomorrow. Choice two puts {product} in your hands for {price}',
guarantee: ', backed by a {guarantee}.', ending: '.',
}
function richTemplate(text: string, values: Record<string, React.ReactNode>) {
return text.split(/(\{(?:product|price)\})/).map((part, i) => <React.Fragment key={i}>{part === '{product}' || part === '{price}' ? values[part.slice(1, -1)] : part}</React.Fragment>)
}
pieces/content/two-choices-close-8/specimen.tsx 26 lines
import * as React from 'react'
import TwoChoicesClose8, { type TwoChoicesClose8State } from '../two-choices-close-8'
import { slot } from '../../slots'
import defaults from '../../studio-defaults.json'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function TwoChoicesClose8Specimen({ state = 'default' }: { state?: string }) {
const s = defaults.sample
return (
<TwoChoicesClose8
state={state as TwoChoicesClose8State}
twoTitle={s.headline}
productName={s.name}
reason={s.reason}
items={s.items.map((item, i) => ({ ...item, itemImage: slot(`item-${i + 1}`, item.image) }))}
regularPrice={s.regularPrice}
price={s.price}
todayLabel={s.todayLabel}
note={s.note}
ctaLabel={s.label}
ctaSub={s.sublabel}
guarantee={s.guarantee}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalTwoChoicesClose8 |
string |
Default 'You have two choices.'
|
emphasis OptionalTwoChoicesClose8 |
string |
Default 'two choices.'
|
lead OptionalTwoChoicesClose8 |
string |
Default 'Close this page and nothing changes. Or take the plan and build your first funnel, one clear step at a time.'
|
oneTitle OptionalTwoChoicesClose8 |
string |
Default 'Keep doing what you’re doing'
|
oneBody OptionalTwoChoicesClose8 |
string |
Default 'Keep piecing together your funnel, page copy, and launch steps on your own.'
|
onePoints OptionalTwoChoicesClose8 |
(string | { text: string })[] |
Default DEFAULT_POINTS
|
oneNote OptionalTwoChoicesClose8 |
string |
Default 'Costs nothing today. Changes nothing, either.'
|
twoTitle OptionalTwoChoicesClose8 |
string |
Default 'Build your first funnel with a clear plan'
|
twoNote OptionalTwoChoicesClose8 |
string |
Default 'Guide, workbook and checklist. One download.'
|
productName OptionalTwoChoicesClose8 |
string |
Default 'The Funnel Starter Kit'
|
reason OptionalTwoChoicesClose8 |
string |
Default 'Get the guide, workbook, and checklist in one download. One payment. Yours to keep.'
|
items OptionalTwoChoicesClose8 |
MarginCloseItem[] |
|
totalLabel OptionalTwoChoicesClose8 |
string |
Default 'Total value'
|
regularPrice OptionalTwoChoicesClose8 |
string |
|
price OptionalTwoChoicesClose8 |
string |
Default '$47'
|
todayLabel OptionalTwoChoicesClose8 |
string |
Default 'Get the complete kit for'
|
note OptionalTwoChoicesClose8 |
string |
|
ctaLabel OptionalTwoChoicesClose8 |
string |
Default 'Yes! Give Me Access'
|
ctaSub OptionalTwoChoicesClose8 |
string |
|
loadingLabel OptionalTwoChoicesClose8 |
string |
Default 'Opening secure checkout…'
|
valueSuffix OptionalTwoChoicesClose8 |
string |
Default 'value'
|
saveLabel OptionalTwoChoicesClose8 |
string |
Default 'Save'
|
guarantee OptionalTwoChoicesClose8 |
string |
|
successTitle OptionalTwoChoicesClose8 |
string |
|
successMessage OptionalTwoChoicesClose8 |
string |
|
errorMessage OptionalTwoChoicesClose8 |
string |
Default 'We couldn’t open checkout. Please try again.'
|
ps OptionalTwoChoicesClose8 |
React.ReactNode |
|
copy OptionalTwoChoicesClose8 |
Partial<typeof DEFAULT_COPY> |
|
state OptionalTwoChoicesClose8 |
TwoChoicesClose8State |
Default 'default'
|
disabled OptionalTwoChoicesClose8 |
boolean |
Default false
|
href OptionalTwoChoicesClose8 |
string |
|
onAction OptionalTwoChoicesClose8 |
() => void | boolean | Promise<void | boolean> |
|
id OptionalTwoChoicesClose8 |
string |
|
className OptionalTwoChoicesClose8 |
string |
Default ''
|
headline OptionalTwoChoicesMarginClose |
string |
|
emphasis OptionalTwoChoicesMarginClose |
string |
|
lead OptionalTwoChoicesMarginClose |
string |
|
oneTitle OptionalTwoChoicesMarginClose |
string |
|
oneBody OptionalTwoChoicesMarginClose |
string |
|
onePoints OptionalTwoChoicesMarginClose |
(string | { text: string })[] |
|
oneNote OptionalTwoChoicesMarginClose |
string |
|
twoTitle OptionalTwoChoicesMarginClose |
string |
|
twoNote OptionalTwoChoicesMarginClose |
string |
|
productName OptionalTwoChoicesMarginClose |
string |
|
reason OptionalTwoChoicesMarginClose |
string |
|
items OptionalTwoChoicesMarginClose |
MarginCloseItem[] |
|
totalLabel OptionalTwoChoicesMarginClose |
string |
|
regularPrice OptionalTwoChoicesMarginClose |
string |
|
price OptionalTwoChoicesMarginClose |
string |
|
todayLabel OptionalTwoChoicesMarginClose |
string |
|
note OptionalTwoChoicesMarginClose |
string |
|
ctaLabel OptionalTwoChoicesMarginClose |
string |
|
ctaSub OptionalTwoChoicesMarginClose |
string |
|
loadingLabel OptionalTwoChoicesMarginClose |
string |
|
valueSuffix OptionalTwoChoicesMarginClose |
string |
|
saveLabel OptionalTwoChoicesMarginClose |
string |
|
guarantee OptionalTwoChoicesMarginClose |
string |
|
successTitle OptionalTwoChoicesMarginClose |
string |
|
successMessage OptionalTwoChoicesMarginClose |
string |
|
errorMessage OptionalTwoChoicesMarginClose |
string |
|
ps OptionalTwoChoicesMarginClose |
React.ReactNode |
|
copy OptionalTwoChoicesMarginClose |
Partial<typeof DEFAULT_COPY> |
|
state OptionalTwoChoicesMarginClose |
TwoChoicesClose8State |
|
disabled OptionalTwoChoicesMarginClose |
boolean |
|
href OptionalTwoChoicesMarginClose |
string |
|
onAction OptionalTwoChoicesMarginClose |
() => void | boolean | Promise<void | boolean> |
|
id OptionalTwoChoicesMarginClose |
string |
|
className OptionalTwoChoicesMarginClose |
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- 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.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB