Two Choices Close 1
Makes the cost of waiting concrete beside the complete offer and final action.
Use it in a prompt
Use content/two-choices-close 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.tsx. - Import it and pass your copy and images (Props tab):
import { TwoChoicesClose } from "@/components/funneldna/content/two-choices-close"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/two-choices-close/component.tsx 431 lines
// Makes the cost of waiting concrete beside the complete offer and final action.
'use client'
import * as React from 'react'
import { motion, useReducedMotion } from 'motion/react'
import { AlertCircle, CheckCircle2, Clock3, Loader2, Lock, ShieldCheck, Tag, X } from 'lucide-react'
export type TwoChoicesCloseProps = {
headline?: string
highlight?: string
lead?: string
oneLabel?: string
oneTitle?: string
oneBody?: string
onePoints?: (string | { text: string })[]
oneCost?: string
twoLabel?: string
twoTitle?: string
twoBody?: string
productImage?: string
productImageAlt?: string
/** Knock near-white pixels out of productImage (a shot on a white backdrop). Off by default: it also erases white or paper products. */
matteWhite?: boolean
items?: ChoiceItem[]
totalLabel?: string
/** Struck regular value; omitted = no struck price and no savings line. */
regularPrice?: string
price?: string
todayLabel?: string
note?: string
ctaLabel?: string
/** Deprecated: the cue label and arrow were removed (owner edit). Accepted for compatibility, not rendered. */
cueLabel?: string
/** Deprecated: the "or" badge was removed (owner edit). Accepted for compatibility, not rendered. */
orLabel?: string
loadingLabel?: string
valueSuffix?: string
saveLabel?: string
reassurance?: string
guarantee?: string
/** @deprecated No longer rendered: the builder wires what happens after the click. */
successMessage?: string
errorMessage?: string
/** "success" is accepted for older callers and renders as default. */
state?: TwoChoicesState
disabled?: boolean
/** Navigation destination; the button renders as a link when set. */
href?: string
/** 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 TwoChoicesClose({
headline = 'You have two choices.',
highlight = 'two choices',
lead = 'Close this page and keep piecing it together alone, or build your first funnel with a clear plan today.',
oneLabel = 'Choice #1',
oneTitle = 'Keep doing what you’re doing',
oneBody = 'Close this page and keep piecing your funnel together on your own.',
onePoints: suppliedOnePoints = DEFAULT_POINTS,
oneCost = 'Costs nothing today. Costs you every week you keep guessing.',
twoLabel = 'Choice #2',
twoTitle = 'Get The Funnel Starter Kit and build with a plan',
twoBody = 'Get the guide, workbook, and checklist in one download. One payment. Yours to keep.',
productImage,
productImageAlt = 'The Funnel Starter Kit: guide, workbook and checklist',
matteWhite = false,
items = [],
totalLabel = 'Total value',
regularPrice,
price = '$47',
todayLabel = 'Get the complete kit for',
note,
ctaLabel = 'Yes! Give Me Access',
loadingLabel = 'Opening secure checkout…',
valueSuffix = 'value',
saveLabel = 'You save',
reassurance,
guarantee,
errorMessage = 'We couldn’t open checkout. Please try again.',
state = 'default',
disabled = false,
href,
onAction,
id,
className,
}: TwoChoicesCloseProps) {
const onePoints = suppliedOnePoints.map((entry) => typeof entry === 'string' ? entry : entry.text)
const reduce = useReducedMotion()
const hid = React.useId()
const [phase, setPhase] = React.useState<'idle' | 'loading' | 'error'>('idle')
const shown = phase !== 'idle' ? phase : state === 'error' ? 'error' : 'idle'
const isDisabled = disabled || state === 'disabled'
const force = state === 'hover' || state === 'active' ? state : undefined
const save = savings(regularPrice, price)
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => { alive.current = false }
}, [])
async function handle(e: React.MouseEvent<HTMLElement>) {
if (isDisabled || phase === 'loading') { e.preventDefault(); return }
if (!onAction) return
try {
const r = onAction()
if (r === false) { e.preventDefault(); setPhase('error'); return }
if (!r || r === true) { if (phase === 'error') setPhase('idle'); return }
setPhase('loading')
const v = await r
if (alive.current) setPhase(v === false ? 'error' : 'idle')
} catch {
if (alive.current) setPhase('error')
}
}
const btnInner = (
<>
<span className='tcc-btn-label'>{shown === 'loading' ? loadingLabel : ctaLabel}</span>
{shown === 'loading' ? (
<span className='tcc-btn-icon' aria-hidden='true'><Loader2 className='tcc-spin' /></span>
) : null}
</>
)
const spring = { type: 'spring' as const, stiffness: 220, damping: 24 }
const view = { once: true, amount: 0.25 }
const slideOne = reduce ? {} : { initial: { opacity: 0.86, x: -14 }, whileInView: { opacity: 1, x: 0 }, viewport: view, transition: spring }
const riseTwo = reduce ? {} : { initial: { opacity: 0.86, y: 18, scale: 0.985 }, whileInView: { opacity: 1, y: 0, scale: 1 }, viewport: view, transition: { ...spring, delay: 0.08 } }
return (
<section id={id} className={'cf-two-choices-close tcc' + (className ? ' ' + className : '')} aria-labelledby={hid}>
<style>{CSS}</style>
<div className='tcc-wrap'>
<header className='tcc-head'>
<h2 id={hid} className='tcc-h'>
<Headline text={headline} highlight={highlight} />
</h2>
{lead ? <p className='tcc-lead'>{lead}</p> : null}
</header>
<div className='tcc-grid'>
<motion.article className='tcc-one' aria-label={oneLabel} {...slideOne}>
<span className='tcc-badge tcc-badge-one'>{oneLabel}</span>
<h3 className='tcc-one-title'>{oneTitle}</h3>
{oneBody ? <p className='tcc-one-body'>{oneBody}</p> : null}
{onePoints.length > 0 ? (
<ul className='tcc-one-list'>
{onePoints.map((p) => (
<li key={p}>
<span className='tcc-x' aria-hidden='true'><X /></span>
<span>{p}</span>
</li>
))}
</ul>
) : null}
{oneCost ? (
<p className='tcc-cost'>
<Clock3 aria-hidden='true' />
<span>{oneCost}</span>
</p>
) : null}
</motion.article>
<motion.div className='tcc-two-wrap' {...riseTwo}>
<article className='tcc-two' aria-label={twoLabel}>
<div className={'tcc-two-head' + (productImage ? ' tcc-has-shot' : '')}>
<div>
<span className='tcc-badge tcc-badge-two'>
<CheckCircle2 aria-hidden='true' />
{twoLabel}
</span>
<h3 className='tcc-two-title'>{twoTitle}</h3>
</div>
{productImage ? (
<img className='tcc-shot' src={productImage} alt={productImageAlt} width={168} height={168} loading='lazy' data-matte={matteWhite ? '' : undefined} />
) : null}
</div>
{twoBody ? <p className='tcc-two-body'>{twoBody}</p> : null}
{items.length > 0 ? (
<ul className='tcc-items'>
{items.map((it) => {
const src = it.itemImage === undefined ? it.image : it.itemImage
return (
<li key={it.name} className={src ? undefined : 'tcc-noimg'}>
{src ? (
<img className='tcc-thumb' src={src} alt={it.imageAlt || it.name} width={60} height={60} loading='lazy' />
) : null}
<span>
<span className='tcc-item-name'>{it.name}</span>
{it.detail ? <span className='tcc-item-detail'>{it.detail}</span> : null}
</span>
{it.value ? <span className='tcc-item-value'>{it.value} {valueSuffix}</span> : null}
</li>
)
})}
</ul>
) : null}
<div className='tcc-price'>
<div className='tcc-price-in'>
{regularPrice ? (
<div className='tcc-was-row'>
<span className='tcc-was-label'>{totalLabel}</span>
<s className='tcc-was'>{regularPrice}</s>
</div>
) : null}
<div className='tcc-now-row'>
<div className='tcc-now-copy'>
{todayLabel ? <span className='tcc-today'>{todayLabel}</span> : null}
{note ? (
<span className='tcc-note'>
<CheckCircle2 aria-hidden='true' />
<span>{note}</span>
</span>
) : null}
</div>
<div className='tcc-now-col'>
{save ? (
<span className='tcc-save'>
<Tag aria-hidden='true' />
{saveLabel} {save}
</span>
) : null}
<strong className='tcc-now'>{price}</strong>
</div>
</div>
</div>
</div>
<div className='tcc-cta'>
{href && !isDisabled ? (
<a
href={href}
className='tcc-btn'
data-force={force}
aria-busy={shown === 'loading' ? true : undefined}
onClick={handle}
>
{btnInner}
</a>
) : (
<button
type='button'
className='tcc-btn'
data-force={force}
disabled={isDisabled}
aria-busy={shown === 'loading' ? true : undefined}
onClick={handle}
>
{btnInner}
</button>
)}
{shown === 'error' ? (
<p className='tcc-alert' role='alert'>
<AlertCircle aria-hidden='true' />
<span>{errorMessage}</span>
</p>
) : null}
</div>
{reassurance || guarantee ? (
<ul className='tcc-assure'>
{reassurance ? (
<li><Lock aria-hidden='true' />{reassurance}</li>
) : null}
{guarantee ? (
<li className='tcc-ok'><ShieldCheck aria-hidden='true' />{guarantee}</li>
) : null}
</ul>
) : null}
</article>
</motion.div>
</div>
</div>
</section>
)
}
export default TwoChoicesClose
export type ChoiceItem = { name: string; detail?: string; value?: string; itemImage?: string; image?: string; imageAlt?: string }
export type TwoChoicesState = 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
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',
]
function toNumber(v?: string) {
if (!v) return NaN
return parseFloat(v.replace(/[^0-9.]/g, ''))
}
function savings(regular?: string, price?: string) {
const a = toNumber(regular)
const b = toNumber(price)
if (!isFinite(a) || !isFinite(b) || a <= b) return ''
const sym = (price || '').match(/^[^0-9]*/)?.[0] ?? ''
const d = a - b
return sym + (Number.isInteger(d) ? String(d) : d.toFixed(2))
}
function Headline({ text, highlight }: { text: string; highlight?: string }) {
const i = highlight ? text.indexOf(highlight) : -1
if (!highlight || i < 0) return <>{text}</>
return (
<>
{text.slice(0, i)}
<span className='tcc-mark'>{highlight}</span>
{text.slice(i + highlight.length)}
</>
)
}
const CSS = `
.cf-two-choices-close{--tcc-marker:var(--marker,#fae37c);--tcc-marker-ink:var(--ink);--tcc-ok:var(--success);--tcc-r:var(--radius,18px);position:relative;isolation:isolate;overflow:hidden;background:var(--band,#0f2747);color:var(--band-ink,#fff);font-family:var(--font-body,Arial,sans-serif);padding:clamp(56px,8vw,112px) clamp(12px,4vw,32px)}
.cf-two-choices-close *,.cf-two-choices-close *::before,.cf-two-choices-close *::after{box-sizing:border-box}
.cf-two-choices-close :where(h2,h3,p,ul){margin:0}
.cf-two-choices-close :where(ul){padding:0;list-style:none}
.cf-two-choices-close::before{content:'';position:absolute;z-index:-1;left:50%;top:-42%;width:min(1500px,170%);aspect-ratio:2/1;transform:translateX(-50%);border-radius:50%;background:oklch(from var(--band,#0f2747) calc(l - 0.03) c h);box-shadow:0 0 0 70px oklch(from var(--band-ink,#fff) l c h / 0.025)}
.cf-two-choices-close::after{content:'';position:absolute;z-index:-1;left:0;right:0;bottom:0;height:34%;background:var(--band);clip-path:polygon(0 38%,100% 0,100% 100%,0 100%)}
:where(.cf-two-choices-close) .tcc-wrap{position:relative;max-width:1180px;margin:0 auto}
:where(.cf-two-choices-close) .tcc-head{max-width:900px;margin:0 auto clamp(40px,5vw,68px);text-align:center}
:where(.cf-two-choices-close) .tcc-h{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(2.6rem,6.6vw,5rem);line-height:1.04;letter-spacing:var(--display-tracking,-.035em);color:var(--band-ink,#fff);margin:0 auto;text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close) .tcc-mark{color:var(--tcc-marker-ink);background:var(--tcc-marker);padding:.02em .16em .06em;margin:0 .02em;border-radius:.12em .5em .16em .44em;-webkit-box-decoration-break:clone;box-decoration-break:clone;box-shadow:none;}
:where(.cf-two-choices-close) .tcc-lead{margin:clamp(20px,2vw,26px) auto 0;max-width:44ch;font-size:clamp(1.1rem,1.6vw,1.32rem);line-height:1.5;font-weight:500;color:var(--band-ink);text-wrap:pretty}
:where(.cf-two-choices-close) .tcc-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
:where(.cf-two-choices-close) .tcc-one{position:relative;z-index:1;background:color-mix(in oklch,var(--surface,#fff) 86%,var(--band,#0f2747));color:var(--muted,#4a5565);border:1px solid oklch(from var(--surface,#fff) l c h / 0.68);border-radius:var(--card-radius,var(--tcc-r));padding:clamp(22px,3vw,34px);box-shadow:var(--card-shadow,0 2px 4px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.18));transition:filter .3s ease;border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12));}
:where(.cf-two-choices-close) .tcc-badge{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:999px;font-family:var(--font-display,Arial,sans-serif);font-size:.875rem;font-weight:var(--display-weight,800);line-height:1;letter-spacing:var(--display-tracking,.06em);text-transform:var(--display-case,uppercase);margin-bottom:16px}
:where(.cf-two-choices-close) .tcc-badge svg{width:16px;height:16px}
:where(.cf-two-choices-close) .tcc-badge-one{background:color-mix(in oklch,var(--ink,#101828) 7%,var(--surface,#fff));color:var(--ink,#101828);border:1px solid oklch(from var(--ink,#101828) l c h / 0.16)}
:where(.cf-two-choices-close) .tcc-badge-two{background:var(--success-soft);color:var(--success);border:1px solid oklch(from var(--band,#0f2747) l c h / 0.7);box-shadow:0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.8)}
:where(.cf-two-choices-close) .tcc-one-title{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,800);font-size:clamp(1.45rem,2.2vw,1.8rem);line-height:1.14;letter-spacing:var(--display-tracking,-.02em);color:color-mix(in oklch,var(--ink,#101828) 80%,var(--muted,#4a5565));text-wrap:balance;margin-bottom:12px!important;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close) .tcc-one-body{font-size:1.0625rem;line-height:1.55;text-wrap:pretty}
:where(.cf-two-choices-close) .tcc-one-list{display:grid;gap:12px;margin-top:20px!important}
:where(.cf-two-choices-close) .tcc-one-list li{display:grid;grid-template-columns:26px minmax(0,1fr);gap:12px;align-items:start;font-size:1rem;line-height:1.45;text-wrap:pretty}
:where(.cf-two-choices-close) .tcc-x{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--danger);color:var(--card);margin-top:-2px}
:where(.cf-two-choices-close) .tcc-x svg{width:15px;height:15px;stroke-width:3}
:where(.cf-two-choices-close) .tcc-cost{display:flex;gap:10px;align-items:flex-start;margin-top:22px!important;padding:14px 16px;border-radius:var(--card-radius,var(--radius,12px));background:var(--card,#fff);border:1px solid oklch(from var(--muted,#4a5565) l c h / 0.18);font-size:1rem;font-weight:700;line-height:1.4;color:color-mix(in oklch,var(--ink,#101828) 76%,var(--muted,#4a5565));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) .tcc-cost svg{width:20px;height:20px;flex:none;margin-top:1px;color:var(--warning)}
:where(.cf-two-choices-close) .tcc-two-wrap{position:relative;z-index:1}
:where(.cf-two-choices-close) .tcc-two{position:relative;background:var(--card,#fff);color:var(--ink,#101828);border:1px solid oklch(from var(--ink,#101828) l c h / 0.14);border-radius:var(--card-radius,calc(var(--tcc-r) + 4px));padding:clamp(20px,3.4vw,40px);box-shadow:var(--card-shadow,var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 260 / 0.22), 0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)));transition:transform .3s cubic-bezier(.2,.8,.2,1);border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12));}
@media (hover:hover){:where(.cf-two-choices-close) .tcc-two-wrap:hover .tcc-two{transform:translate(-3px,-4px)}}
:where(.cf-two-choices-close) .tcc-grid:has(.tcc-two-wrap:hover) .tcc-one,:where(.cf-two-choices-close) .tcc-grid:has(.tcc-two-wrap:focus-within) .tcc-one{filter:saturate(.3) brightness(.96)}
:where(.cf-two-choices-close) .tcc-two-head{display:grid;grid-template-columns:minmax(0,1fr);align-items:start}
:where(.cf-two-choices-close) .tcc-shot{display:block;order:-1;justify-self:center;width:184px;height:184px;object-fit:contain;mix-blend-mode:normal;margin:30px auto 6px}
:where(.cf-two-choices-close) .tcc-shot[data-matte]{filter:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='matte' color-interpolation-filters='sRGB'%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 -100 -100 -100 298 0'/%3E%3C/filter%3E%3C/svg%3E#matte")}
:where(.cf-two-choices-close) .tcc-two-title{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(1.65rem,2.7vw,2.2rem);line-height:1.08;letter-spacing:var(--display-tracking,-.03em);color:var(--ink,#101828);text-wrap:balance;margin-bottom:14px!important;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close) .tcc-two-body{font-size:1.0625rem;line-height:1.55;color:var(--muted,#4a5565);font-weight:500;text-wrap:pretty;max-width:52ch}
:where(.cf-two-choices-close) .tcc-items{margin-top:20px!important;display:grid}
:where(.cf-two-choices-close) .tcc-items li{display:grid;grid-template-columns:60px minmax(0,1fr) auto;gap:14px;align-items:start;padding:12px 0}
:where(.cf-two-choices-close) .tcc-items li.tcc-noimg{grid-template-columns:minmax(0,1fr) auto}
:where(.cf-two-choices-close) .tcc-items li+li{border-top:1px solid oklch(from var(--ink,#101828) l c h / 0.09)}
:where(.cf-two-choices-close) .tcc-thumb{display:block;width:60px;height:60px;border-radius:12px;object-fit:cover;background:transparent;border:1px solid oklch(from var(--ink,#101828) l c h / 0.1);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) .tcc-item-name{display:block;font-weight:700;font-size:1.02rem;line-height:1.3;color:var(--ink,#101828)}
:where(.cf-two-choices-close) .tcc-item-detail{display:block;margin-top:4px;font-size:.9375rem;line-height:1.45;color:var(--muted,#4a5565);text-wrap:pretty}
:where(.cf-two-choices-close) .tcc-item-value{padding:5px 12px;border-radius:999px;font-size:.875rem;font-weight:700;line-height:1.2;white-space:nowrap;color:color-mix(in oklch,var(--ink,#101828) 82%,var(--muted,#4a5565));background:oklch(from var(--card,#fff) calc(l - 0.03) c h);border:1px solid oklch(from var(--ink,#101828) l c h / 0.08)}
:where(.cf-two-choices-close) .tcc-price{margin-top:12px;padding:5px;border-radius:var(--card-radius,var(--radius,18px));background:color-mix(in oklch,var(--ink) 4%,var(--card,#fff));border:1px solid oklch(from var(--ink) l c h / 0.14);box-shadow:none;border-color:oklch(from var(--ink) l c h / 0.10);}
:where(.cf-two-choices-close) .tcc-price-in{border-radius:var(--card-radius,var(--radius,13px));overflow:hidden;background:var(--card,#fff);border:1px solid oklch(from var(--ink) l c h / 0.12);border-color:oklch(from var(--ink) l c h / 0.10);box-shadow:none;}
:where(.cf-two-choices-close) .tcc-was-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 20px;background:var(--card);border-bottom:1px solid oklch(from var(--ink,#101828) l c h / 0.1)}
:where(.cf-two-choices-close) .tcc-was-label{font-size:1rem;font-weight:700;line-height:1.3;color:var(--muted,#4a5565)}
:where(.cf-two-choices-close) .tcc-was{font-family:var(--font-display,Arial,sans-serif);font-size:1.5rem;font-weight:var(--display-weight,800);line-height:1.1;letter-spacing:var(--display-tracking,-.02em);color:var(--danger);text-decoration:line-through;text-decoration-color:var(--danger);text-decoration-thickness:3px;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close) .tcc-now-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px;padding:20px 20px 22px}
:where(.cf-two-choices-close) .tcc-now-copy{min-width:0;flex:1 1 180px}
:where(.cf-two-choices-close) .tcc-today{display:block;font-family:var(--font-display,Arial,sans-serif);font-size:1.25rem;font-weight:var(--display-weight,800);line-height:1.2;letter-spacing:var(--display-tracking,-.01em);color:var(--ink,#101828);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-two-choices-close) .tcc-note{display:flex;align-items:flex-start;gap:7px;margin-top:10px;font-size:.9375rem;font-weight:600;line-height:1.35;color:var(--muted,#4a5565)}
:where(.cf-two-choices-close) .tcc-note span{text-wrap:pretty}
:where(.cf-two-choices-close) .tcc-note svg{width:17px;height:17px;flex:none;margin-top:1px;color:var(--tcc-ok)}
:where(.cf-two-choices-close) .tcc-now-col{display:flex;flex-direction:column;align-items:flex-end;text-align:right;flex:none}
:where(.cf-two-choices-close) .tcc-save{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;background:var(--success-soft);border:1px solid var(--success);color:var(--success);font-size:.9375rem;font-weight:800;line-height:1.2;white-space:nowrap;box-shadow:0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.7)}
:where(.cf-two-choices-close) .tcc-save svg{width:15px;height:15px;flex:none;stroke-width:2.5}
:where(.cf-two-choices-close) .tcc-now{display:block;margin-top:12px;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(3.25rem,6vw,4.5rem);line-height:.92;letter-spacing:var(--display-tracking,-.045em);color:var(--ink,#101828);text-transform:var(--display-case,none)}
:where(.cf-two-choices-close) .tcc-cta{position:relative;margin-top:24px}
:where(.cf-two-choices-close) .tcc-btn{position:relative;overflow:hidden;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:70px;display:flex;align-items:center;justify-content:center;padding:16px 64px;border-radius:var(--button-radius,var(--radius,12px));border:1px solid oklch(from var(--button-bg,var(--cta)) calc(l - 0.10) c h);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-size:clamp(1.05rem,1.9vw,1.32rem);font-weight:var(--button-weight,800);line-height:1.15;letter-spacing:var(--display-tracking,-.01em);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) .tcc-btn::after{content:'';position:absolute;inset:0;background:linear-gradient(105deg,transparent 35%,oklch(from var(--button-ink,var(--cta-ink)) l c h / 0.3) 50%,transparent 65%);transform:translateX(-120%);transition:transform .7s ease;pointer-events:none}
:where(.cf-two-choices-close) .tcc-btn-label{position:relative;z-index:1;text-align:center;text-wrap:balance}
:where(.cf-two-choices-close) .tcc-btn-icon{position:absolute;z-index:1;right:16px;top:50%;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:oklch(from var(--button-ink,var(--cta-ink)) l c h / 0.2);box-shadow:inset 0 0 0 1px oklch(from var(--card) calc(l + 0.04) c h / .25);transform:translateY(-50%);transition:transform .18s ease}
:where(.cf-two-choices-close) .tcc-btn-icon svg{width:19px;height:19px;stroke-width:2.75}
:where(.cf-two-choices-close) .tcc-btn:not(:disabled):hover,:where(.cf-two-choices-close) .tcc-btn[data-force=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) .tcc-btn:not(:disabled):hover::after,:where(.cf-two-choices-close) .tcc-btn[data-force=hover]:not(:disabled)::after{transform:translateX(120%)}
:where(.cf-two-choices-close) .tcc-btn:not(:disabled):active,:where(.cf-two-choices-close) .tcc-btn[data-force=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) .tcc-btn:focus-visible{outline:3px solid var(--accent,#0f5fc2);outline-offset:3px}
:where(.cf-two-choices-close) .tcc-btn[aria-busy=true]{cursor:progress}
:where(.cf-two-choices-close) .tcc-btn:disabled{text-shadow:none;background:var(--button-2-bg,var(--card));border-color:var(--button-2-border,oklch(from var(--ink) l c h / 0.22));color:var(--button-2-ink,var(--ink));box-shadow:inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .5);cursor:not-allowed}
:where(.cf-two-choices-close) .tcc-spin{animation:tcc-spin .8s linear infinite}
@keyframes tcc-spin{to{transform:rotate(360deg)}}
:where(.cf-two-choices-close) .tcc-alert{display:flex;gap:10px;align-items:flex-start;margin-top:14px;padding:12px 14px;border-radius:var(--card-radius,var(--radius,12px));background:var(--danger-soft);border:1px solid oklch(from var(--ink) l c h / 0.12);color:var(--danger);font-size:.9375rem;font-weight:600;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) .tcc-alert svg{width:20px;height:20px;flex:none;margin-top:1px;color:var(--danger)}
:where(.cf-two-choices-close) .tcc-assure{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px;margin-top:16px!important}
:where(.cf-two-choices-close) .tcc-assure li{display:inline-flex;align-items:center;gap:7px;font-size:.9375rem;font-weight:600;line-height:1.3;color:var(--muted,#4a5565)}
:where(.cf-two-choices-close) .tcc-assure svg{width:17px;height:17px;flex:none}
:where(.cf-two-choices-close) .tcc-assure .tcc-ok svg{color:var(--tcc-ok)}
@media (min-width:640px){
:where(.cf-two-choices-close) .tcc-two-head.tcc-has-shot{grid-template-columns:minmax(0,1fr) 168px;column-gap:18px}
:where(.cf-two-choices-close) .tcc-shot{order:0;width:168px;height:168px;margin:-10px -8px 0 0;justify-self:end;mix-blend-mode:normal}
}
@media (max-width:479px){
:where(.cf-two-choices-close) .tcc-items li{grid-template-columns:56px minmax(0,1fr)}
:where(.cf-two-choices-close) .tcc-items li.tcc-noimg{grid-template-columns:minmax(0,1fr)}
:where(.cf-two-choices-close) .tcc-thumb{width:56px;height:56px}
:where(.cf-two-choices-close) .tcc-item-value{grid-column:2;justify-self:start;margin-top:-2px}
:where(.cf-two-choices-close) .tcc-items li.tcc-noimg .tcc-item-value{grid-column:1}
:where(.cf-two-choices-close) .tcc-was-row{padding:12px 16px;background:var(--card)}
:where(.cf-two-choices-close) .tcc-was{font-size:1.3rem;color:var(--danger)}
:where(.cf-two-choices-close) .tcc-now-row{flex-direction:column;align-items:stretch;gap:14px;padding:16px 16px 18px}
:where(.cf-two-choices-close) .tcc-now-copy{flex:none}
:where(.cf-two-choices-close) .tcc-now-col{flex-direction:row;align-items:center;justify-content:space-between;gap:12px;text-align:left}
:where(.cf-two-choices-close) .tcc-now{margin-top:0;font-size:3rem}
:where(.cf-two-choices-close) .tcc-btn{padding:14px 46px;font-size:1rem;min-height:64px}
:where(.cf-two-choices-close) .tcc-btn-icon{right:10px;width:28px;height:28px}
:where(.cf-two-choices-close) .tcc-btn-icon svg{width:16px;height:16px}
}
@media (min-width:900px){
:where(.cf-two-choices-close) .tcc-grid{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);column-gap:32px}
:where(.cf-two-choices-close) .tcc-one{margin-top:44px}
}
@media (prefers-reduced-motion:reduce){
.cf-two-choices-close *,.cf-two-choices-close *::after{transition:none!important}
:where(.cf-two-choices-close) .tcc-btn::after{display:none}
:where(.cf-two-choices-close) .tcc-two-wrap:hover .tcc-two,:where(.cf-two-choices-close) .tcc-btn:hover,:where(.cf-two-choices-close) .tcc-btn:active,:where(.cf-two-choices-close) .tcc-btn[data-force]{transform:none!important}
:where(.cf-two-choices-close) .tcc-btn:hover .tcc-btn-icon,:where(.cf-two-choices-close) .tcc-btn[data-force] .tcc-btn-icon{transform:translateY(-50%)!important}
:where(.cf-two-choices-close) .tcc-spin{animation-duration:2.4s}
}
`
pieces/content/two-choices-close/specimen.tsx 35 lines
import __studioImage93e5442b from "../assets/2e8ded3c123caad7.webp";
import * as React from 'react'
import TwoChoicesClose, { type TwoChoicesState } from '../two-choices-close'
import { slot } from '../../slots'
import defaults from '../../studio-defaults.json'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function TwoChoicesCloseSpecimen({ state = 'default' }: { state?: string }) {
const s = defaults.sample
const plan = s.headline.charAt(0).toLowerCase() + s.headline.slice(1)
return (
<div>
<TwoChoicesClose
state={state as TwoChoicesState}
headline='You have two choices.'
highlight='two choices'
lead={'Close this page and keep piecing it together alone, or ' + plan + ' today.'}
twoTitle={'Get ' + s.name + ' and build with a plan'}
twoBody={s.reason}
productImage={slot('product', __studioImage93e5442b)}
productImageAlt={s.name + ': guide, workbook and checklist'}
matteWhite
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}
reassurance={s.sublabel}
guarantee={s.guarantee}
/>
</div>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalTwoChoicesClose |
string |
Default 'You have two choices.'
|
highlight OptionalTwoChoicesClose |
string |
Default 'two choices'
|
lead OptionalTwoChoicesClose |
string |
Default 'Close this page and keep piecing it together alone, or build your first funnel with a clear plan today.'
|
oneLabel OptionalTwoChoicesClose |
string |
Default 'Choice #1'
|
oneTitle OptionalTwoChoicesClose |
string |
Default 'Keep doing what you’re doing'
|
oneBody OptionalTwoChoicesClose |
string |
Default 'Close this page and keep piecing your funnel together on your own.'
|
onePoints OptionalTwoChoicesClose |
(string | { text: string })[] |
Default DEFAULT_POINTS
|
oneCost OptionalTwoChoicesClose |
string |
Default 'Costs nothing today. Costs you every week you keep guessing.'
|
twoLabel OptionalTwoChoicesClose |
string |
Default 'Choice #2'
|
twoTitle OptionalTwoChoicesClose |
string |
Default 'Get The Funnel Starter Kit and build with a plan'
|
twoBody OptionalTwoChoicesClose |
string |
Default 'Get the guide, workbook, and checklist in one download. One payment. Yours to keep.'
|
productImage OptionalTwoChoicesClose |
string |
|
productImageAlt OptionalTwoChoicesClose |
string |
Default 'The Funnel Starter Kit: guide, workbook and checklist'
|
matteWhite OptionalTwoChoicesClose |
boolean |
Default false
|
items OptionalTwoChoicesClose |
ChoiceItem[] |
Default []
|
totalLabel OptionalTwoChoicesClose |
string |
Default 'Total value'
|
regularPrice OptionalTwoChoicesClose |
string |
|
price OptionalTwoChoicesClose |
string |
Default '$47'
|
todayLabel OptionalTwoChoicesClose |
string |
Default 'Get the complete kit for'
|
note OptionalTwoChoicesClose |
string |
|
ctaLabel OptionalTwoChoicesClose |
string |
Default 'Yes! Give Me Access'
|
cueLabel OptionalTwoChoicesClose |
string |
|
orLabel OptionalTwoChoicesClose |
string |
|
loadingLabel OptionalTwoChoicesClose |
string |
Default 'Opening secure checkout…'
|
valueSuffix OptionalTwoChoicesClose |
string |
Default 'value'
|
saveLabel OptionalTwoChoicesClose |
string |
Default 'You save'
|
reassurance OptionalTwoChoicesClose |
string |
|
guarantee OptionalTwoChoicesClose |
string |
|
successMessage OptionalTwoChoicesClose |
string |
|
errorMessage OptionalTwoChoicesClose |
string |
Default 'We couldn’t open checkout. Please try again.'
|
state OptionalTwoChoicesClose |
TwoChoicesState |
Default 'default'
|
disabled OptionalTwoChoicesClose |
boolean |
Default false
|
href OptionalTwoChoicesClose |
string |
|
onAction OptionalTwoChoicesClose |
() => void | boolean | Promise<void | boolean> |
|
id OptionalTwoChoicesClose |
string |
|
className OptionalTwoChoicesClose |
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.
product- The main product shot or cover (ebook, kit, bottle).
-
2e8ded3c123caad7.webp
image/webp · 77.3 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB