Two Choices Close 3
Future-paces both choices month by month: one scrubber swaps the do-nothing rows and the take-the-offer rows so the gap visibly widens, then closes on the price and the action.
Use it in a prompt
Use content/two-choices-close-3 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-3.tsx. - Import it and pass your copy and images (Props tab):
import { TwoChoicesClose3 } from "@/components/funneldna/content/two-choices-close-3"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/two-choices-close-3/component.tsx 579 lines
// layout: split-contrast
// Future-paces both choices month by month: one scrubber swaps the do-nothing rows and the take-the-offer rows so the gap visibly widens, then closes on the price and the action.
'use client'
import * as React from 'react'
import { motion, useReducedMotion } from 'motion/react'
import { AlertCircle, Check, Clock, Frown, Hourglass, ListChecks, ListTodo, Loader2, ShieldCheck, Smile } from 'lucide-react'
import { FX_HOST, Spot, Texture } from '../fx/fx'
import concrete from '../fx/textures/concrete'
import clock from '../fx/spots/clock'
export type ScrubberMonth = {
/** Month number on the Month 1 to totalMonths track. */
month: number
/** Big label for this stop; defaults to monthTemplate. */
label?: string
/** Do-nothing rows, in rowLabels order (time spent, still undone, how it feels). */
stay: string[]
/** Take-the-offer rows, in the same order. */
go: string[]
}
export type TwoChoicesClose3State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type TwoChoicesClose3Props = {
headline?: string
/** Phrase inside the headline that gets the marker stroke. */
emphasis?: string
lead?: string
/** One stop per supplied month; the scrubber snaps only to these. */
months?: ScrubberMonth[]
/** Length of the track, Month 1 to this. */
totalMonths?: number
/** Month the scrubber starts on (nearest supplied stop). */
initialMonth?: number
/** Screen-reader names for the rows, in order. */
rowLabels?: string[]
/** Accessible name of the scrubber. */
scrubberLabel?: string
scrubberPrompt?: string
/** Default stop label; {month} is replaced. */
monthTemplate?: string
/** {total} is replaced. */
ofTemplate?: string
/** Polite live announcement; {label}, {month} and {total} are replaced. */
announceTemplate?: string
stayTitle?: string
/** Italic aside in the author's voice under the do-nothing rows. */
stayAside?: string
stayClose?: string
/** fx Spot asset (imported URL) for the do-nothing half; null hides it. */
staySpot?: string | null
goTitle?: string
productImage?: string
productImageAlt?: string
/** Saving printed on the coupon; falls back to savingTemplate when both prices are numeric. */
couponText?: string
couponNote?: string
/** {amount} and {unit} are replaced. */
savingTemplate?: string
todayLabel?: string
price?: string
/** Shown after the price, e.g. '/month'. */
priceUnit?: string
/** Struck regular price; omitted = no struck price and no computed saving. */
regularPrice?: string
regularPriceLabel?: string
ctaLabel?: string
loadingLabel?: string
/** Reassurance line under the button. */
note?: string
errorMessage?: string
state?: TwoChoicesClose3State
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 TwoChoicesClose3({
headline = 'Same twelve months either way. Where do you want to be?',
emphasis = 'Where do you want to be?',
lead = 'Slide the months forward and watch both paths play out, side by side.',
months = DEFAULT_MONTHS,
totalMonths = 12,
initialMonth,
rowLabels = ['Time spent on it', 'Still undone', 'How it feels'],
scrubberLabel = 'Months from today',
scrubberPrompt = 'Slide to see where each choice leaves you',
monthTemplate = 'Month {month}',
ofTemplate = 'of {total}',
announceTemplate = '{label} of {total}',
stayTitle = 'Keep doing it the way you do now',
stayAside = '(I know. Month twelve always feels far away, until it isn’t.)',
stayClose = 'It costs nothing today. It costs you every month you wait.',
staySpot = clock,
goTitle = 'Start today with a clear plan',
productImage,
productImageAlt = '',
couponText,
couponNote,
savingTemplate = '{amount}{unit} off today',
todayLabel = 'Your price today',
price,
priceUnit = '',
regularPrice,
regularPriceLabel = 'Regular price',
ctaLabel = 'Start my first month',
loadingLabel = 'Opening secure checkout…',
note,
errorMessage = 'We couldn’t open checkout. Please try again.',
state = 'default',
disabled = false,
href,
onAction,
id,
className = '',
}: TwoChoicesClose3Props) {
const reduce = useReducedMotion()
const uid = React.useId()
const hid = uid + 'h'
const pid = uid + 'p'
const eid = uid + 'e'
const stops = React.useMemo(() => {
const clean = (months || []).filter((m) => Number.isFinite(m.month)).sort((a, b) => a.month - b.month)
return clean.length ? clean : DEFAULT_MONTHS
}, [months])
const total = Math.max(totalMonths, stops[stops.length - 1].month, 1)
const nearest = (v: number) =>
stops.reduce((best, m, i) => (Math.abs(m.month - v) < Math.abs(stops[best].month - v) ? i : best), 0)
const [idx, setIdx] = React.useState(() => (initialMonth === undefined ? 0 : nearest(initialMonth)))
const [said, setSaid] = React.useState('')
const safe = Math.min(idx, stops.length - 1)
const cur = stops[safe]
const labelFor = (m: ScrubberMonth) => m.label || fill(monthTemplate, { month: String(m.month) })
const progress = total > 1 ? (cur.month - 1) / (total - 1) : 0
const rowCount = Math.max(1, ...stops.map((m) => Math.max(m.stay.length, m.go.length)))
function select(i: number) {
const n = Math.max(0, Math.min(stops.length - 1, i))
setIdx(n)
setSaid(fill(announceTemplate, { label: labelFor(stops[n]), month: String(stops[n].month), total: String(total) }))
}
function onKey(e: React.KeyboardEvent<HTMLInputElement>) {
let n = safe
switch (e.key) {
case 'ArrowRight':
case 'ArrowUp':
case 'PageUp':
n = safe + 1
break
case 'ArrowLeft':
case 'ArrowDown':
case 'PageDown':
n = safe - 1
break
case 'Home':
n = 0
break
case 'End':
n = stops.length - 1
break
default:
return
}
e.preventDefault()
select(n)
}
const [phase, setPhase] = React.useState<'idle' | 'loading' | 'error'>('idle')
const shown = phase !== 'idle' ? phase : state === 'error' ? 'error' : 'idle'
const isDisabled = disabled || state === 'disabled'
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
async function handle(e: React.MouseEvent<HTMLElement>) {
if (isDisabled || shown === 'loading') {
e.preventDefault()
return
}
if (!onAction) return
try {
const r = onAction()
if (r === false) {
e.preventDefault()
setPhase('error')
return
}
if (typeof r === 'object' && r !== null) {
setPhase('loading')
const v = await r
if (alive.current) setPhase(v === false ? 'error' : 'idle')
} else {
setPhase('idle')
}
} catch {
if (alive.current) setPhase('error')
}
}
const nowN = amount(price)
const wasN = amount(regularPrice)
const saving =
couponText ||
(Number.isFinite(nowN) && Number.isFinite(wasN) && wasN > nowN
? fill(savingTemplate, { amount: fmt(symbol(price), wasN - nowN), unit: priceUnit })
: '')
const rise = (i: number) =>
reduce
? {}
: {
initial: { opacity: 0.82, y: 8 },
whileInView: { opacity: 1, y: 0 },
viewport: { once: true, amount: 0.15 },
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 rows = (side: 'stay' | 'go') =>
Array.from({ length: rowCount }, (_, r) => {
const Icon = (side === 'stay' ? STAY_ICONS : GO_ICONS)[r % 3]
return (
<div key={r} className='tc3-cell tc3-row'>
<span className='tc3-ico' aria-hidden='true'>
<Icon size={20} strokeWidth={2.5} />
</span>
<div className='tc3-lines'>
{rowLabels[r] ? <span className='tc3-sr'>{rowLabels[r]}: </span> : null}
{stops.map((m, i) => (
<p key={m.month} className={'tc3-line' + (i === safe ? ' is-on' : '')} aria-hidden={i === safe ? undefined : true}>
{(side === 'stay' ? m.stay : m.go)[r] ?? ''}
</p>
))}
</div>
</div>
)
})
const btnClass = 'tc3-btn' + (state === 'hover' ? ' is-hover' : state === 'active' ? ' is-active' : '')
const btnInner =
shown === 'loading' ? (
<>
<Loader2 className='tc3-spin' size={20} strokeWidth={2.5} aria-hidden='true' />
<span>{loadingLabel}</span>
</>
) : (
<span>{ctaLabel}</span>
)
const describedBy = shown === 'error' ? eid : undefined
return (
<section id={id} className={('cf-two-choices-close-3 tc3 ' + className).trim()} aria-labelledby={hid}>
<style>{CSS}</style>
<div className='tc3-wrap'>
<header className='tc3-head'>
<h2 id={hid} className='tc3-h'>
<Emph text={headline} phrase={emphasis} />
</h2>
{lead ? <p className='tc3-lead'>{lead}</p> : null}
</header>
<div className='tc3-scrub'>
<div className='tc3-scrub-top'>
<div className='tc3-now' aria-hidden='true'>
<span className='tc3-now-label'>{labelFor(cur)}</span>
<span className='tc3-now-of'>{fill(ofTemplate, { total: String(total) })}</span>
</div>
{scrubberPrompt ? (
<p id={pid} className='tc3-prompt'>
{scrubberPrompt}
</p>
) : null}
</div>
<div className='tc3-track'>
<input
type='range'
className='tc3-range'
min={1}
max={total}
step={1}
value={cur.month}
aria-label={scrubberLabel}
aria-describedby={scrubberPrompt ? pid : undefined}
aria-valuetext={labelFor(cur)}
onChange={(e) => select(nearest(Number(e.target.value)))}
onKeyDown={onKey}
style={{ ['--p' as string]: progress } as React.CSSProperties}
/>
<div className='tc3-ticks' aria-hidden='true'>
{Array.from({ length: total }, (_, k) => k + 1).map((m) => {
const si = stops.findIndex((s) => s.month === m)
return (
<span
key={m}
className={'tc3-tick' + (si >= 0 ? ' is-stop' : '') + (si === safe ? ' is-on' : '')}
style={{ ['--x' as string]: total > 1 ? (m - 1) / (total - 1) : 0 } as React.CSSProperties}
>
{si >= 0 ? (
<button type='button' tabIndex={-1} onClick={() => select(si)}>
{m}
</button>
) : null}
</span>
)
})}
</div>
</div>
<p className='tc3-sr' aria-live='polite'>
{said}
</p>
</div>
<div className='tc3-slab' style={{ ['--rows' as string]: rowCount + 2 } as React.CSSProperties}>
<motion.article className='tc3-half tc3-stay' style={{ ...FX_HOST }} {...rise(0)}>
<Texture src={concrete} tone='band-ink' />
<div className='tc3-cell tc3-top'>
<h3 className='tc3-t'>{stayTitle}</h3>
{staySpot ? (
<span className='tc3-spot'>
<Spot src={staySpot} size={72} shade='band' light='band-ink' />
</span>
) : null}
</div>
{rows('stay')}
<div className='tc3-cell tc3-end'>
{stayAside ? <p className='tc3-aside'>{stayAside}</p> : null}
{stayClose ? <p className='tc3-cost'>{stayClose}</p> : null}
</div>
</motion.article>
<motion.article className='tc3-half tc3-go' {...rise(1)}>
<div className='tc3-cell tc3-top'>
<h3 className='tc3-t'>{goTitle}</h3>
{productImage ? (
<img className='tc3-product' src={productImage} alt={productImageAlt} width={264} height={264} loading='lazy' decoding='async' />
) : null}
</div>
{rows('go')}
<div className='tc3-cell tc3-end'>
{saving || price ? (
<div className='tc3-coupon'>
{saving ? <p className='tc3-save'>{saving}</p> : null}
{price ? (
<div className='tc3-price'>
{todayLabel ? <span className='tc3-today'>{todayLabel}</span> : null}
<p className='tc3-amount'>
<span className='tc3-now-price'>
<strong className='tc3-num'>{price}</strong>
{priceUnit ? <span className='tc3-unit'>{priceUnit}</span> : null}
</span>
{regularPrice ? (
<s className='tc3-was'>
<span className='tc3-sr'>{regularPriceLabel} </span>
{regularPrice}
{priceUnit}
</s>
) : null}
</p>
</div>
) : null}
{couponNote ? (
<p className='tc3-cnote'>
<Check size={16} strokeWidth={2.5} aria-hidden='true' />
{couponNote}
</p>
) : null}
</div>
) : null}
{href ? (
<a
className={btnClass}
href={isDisabled ? undefined : href}
onClick={handle}
aria-disabled={isDisabled || undefined}
aria-busy={shown === 'loading' || undefined}
aria-describedby={describedBy}
tabIndex={isDisabled ? -1 : undefined}
>
{btnInner}
</a>
) : (
<button
type='button'
className={btnClass}
onClick={handle}
disabled={isDisabled}
aria-busy={shown === 'loading' || undefined}
aria-describedby={describedBy}
>
{btnInner}
</button>
)}
{shown === 'error' ? (
<p id={eid} role='alert' className='tc3-err'>
<AlertCircle size={18} strokeWidth={2.5} aria-hidden='true' />
{errorMessage}
</p>
) : null}
{note ? (
<p className='tc3-note'>
<ShieldCheck size={18} strokeWidth={2.5} aria-hidden='true' />
{note}
</p>
) : null}
</div>
</motion.article>
</div>
</div>
</section>
)
}
export default TwoChoicesClose3
const STAY_ICONS = [Hourglass, ListTodo, Frown]
const GO_ICONS = [Clock, ListChecks, Smile]
const DEFAULT_MONTHS: ScrubberMonth[] = [
{
month: 1,
stay: ['Evenings still go to the same old workaround', 'The thing you meant to fix is still on the list', 'A little behind, telling yourself next month'],
go: ['Set up once, then it runs in the background', 'The first job is off your list', 'Lighter. You know where you stand'],
},
{
month: 6,
stay: ['Half a year of the same evenings, gone', 'The list has grown, not shrunk', 'Tired of starting over every month'],
go: ['Minutes a week, not whole evenings', 'Most of the list is done and staying done', 'Calm, and ahead for once'],
},
{
month: 12,
stay: ['A full year spent on it, again', 'Still undone, a year later', 'Wishing you had started in month one'],
go: ['A year of evenings back', 'Done, and it stays done', 'Glad you started when you did'],
},
]
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='tc3-mark'>{phrase}</span>
{text.slice(i + phrase.length)}
</>
)
}
function fill(t: string, vars: Record<string, string>) {
return Object.keys(vars).reduce((s, k) => s.split('{' + k + '}').join(vars[k]), t)
}
function amount(v?: string) {
if (!v) return NaN
return parseFloat(v.replace(/[^0-9.]/g, ''))
}
function symbol(v?: string) {
const m = (v || '').match(/^[^0-9]*/)
return m ? m[0].trim() : ''
}
function fmt(sym: string, n: number) {
return sym + (Number.isInteger(n) ? String(n) : n.toFixed(2))
}
const CSS = `
.tc3{--tc3-shadow:var(--shadow,oklch(0.22 0.03 260));--tc3-marker:color-mix(in oklch,var(--marker,#fae37c) 78%,transparent);--tc3-r:var(--card-radius,var(--radius,14px));--tc3-thumb:28px;--tc3-fill:var(--accent-fill,var(--accent));--tc3-rail:color-mix(in oklch,var(--ink) 11%,var(--card));position:relative;overflow-x:clip;background:var(--surface);color:var(--ink);font-family:var(--font-body,system-ui,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.tc3 *,.tc3 *::before,.tc3 *::after{box-sizing:border-box}
.tc3 :where(h2,h3,p){margin:0}
.tc3-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.tc3-wrap{max-width:1120px;margin:0 auto}
.tc3-head{max-width:46rem;margin:0 auto;text-align:center}
.tc3-h{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--ink);text-wrap:balance}
.tc3-mark{background:linear-gradient(to bottom,transparent 52%,var(--tc3-marker) 52%,var(--tc3-marker) 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .1em;margin:0 -.04em;border-radius:.12em .3em .16em .26em}
.tc3-lead{margin-top:16px;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.tc3-scrub{position:relative;z-index:3;display:flex;flex-direction:column;gap:12px;margin:clamp(28px,3.5vw,40px) 0 clamp(20px,2.4vw,28px);padding:20px clamp(20px,3vw,32px) 14px;background:var(--card);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--tc3-r);box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(0.22 0.03 260 / .22),0 4px 10px -2px oklch(0.22 0.03 260 / .2)))}
.tc3-scrub-top{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 24px}
.tc3-now{display:flex;align-items:baseline;gap:10px;white-space:nowrap}
.tc3-now-label{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--ink)}
.tc3-now-of{font-size:.9375rem;font-weight:700;line-height:1.4;color:var(--muted)}
.tc3-prompt{font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
.tc3-track{position:relative;padding-bottom:28px}
.tc3-range{-webkit-appearance:none;appearance:none;display:block;width:100%;height:var(--tc3-thumb);margin:0;background:transparent;cursor:pointer;--tc3-at:calc(var(--tc3-thumb) / 2 + (100% - var(--tc3-thumb)) * var(--p,0))}
.tc3-range:focus{outline:none}
.tc3-range::-moz-focus-outer{border:0}
.tc3-range::-webkit-slider-runnable-track{height:10px;border-radius:999px;background:linear-gradient(to right,var(--tc3-fill) 0 var(--tc3-at),var(--tc3-rail) var(--tc3-at) 100%)}
.tc3-range::-moz-range-track{height:10px;border-radius:999px;background:linear-gradient(to right,var(--tc3-fill) 0 var(--tc3-at),var(--tc3-rail) var(--tc3-at) 100%)}
.tc3-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;box-sizing:border-box;width:var(--tc3-thumb);height:var(--tc3-thumb);margin-top:calc((10px - var(--tc3-thumb)) / 2);border-radius:999px;border:3px solid var(--tc3-fill);background:var(--card);box-shadow:0 1px 2px oklch(from var(--tc3-shadow) l c h / .3),0 4px 8px -2px oklch(from var(--tc3-shadow) l c h / .35);transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.tc3-range::-moz-range-thumb{box-sizing:border-box;width:var(--tc3-thumb);height:var(--tc3-thumb);border-radius:999px;border:3px solid var(--tc3-fill);background:var(--card);box-shadow:0 1px 2px oklch(from var(--tc3-shadow) l c h / .3),0 4px 8px -2px oklch(from var(--tc3-shadow) l c h / .35);transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.tc3-range:hover::-webkit-slider-thumb{transform:scale(1.08)}
.tc3-range:hover::-moz-range-thumb{transform:scale(1.08)}
.tc3-range:active::-webkit-slider-thumb{transform:scale(1.14);background:color-mix(in oklch,var(--accent) 12%,var(--card))}
.tc3-range:active::-moz-range-thumb{transform:scale(1.14);background:color-mix(in oklch,var(--accent) 12%,var(--card))}
.tc3-range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 4px oklch(from var(--field-focus,var(--accent)) l c h / .35),0 1px 2px oklch(from var(--tc3-shadow) l c h / .3)}
.tc3-range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 4px oklch(from var(--field-focus,var(--accent)) l c h / .35),0 1px 2px oklch(from var(--tc3-shadow) l c h / .3)}
.tc3-ticks{position:absolute;left:calc(var(--tc3-thumb) / 2);right:calc(var(--tc3-thumb) / 2);top:calc(var(--tc3-thumb) + 2px);height:26px}
.tc3-tick{position:absolute;top:0;left:calc(var(--x,0) * 100%);display:flex;flex-direction:column;align-items:center;transform:translateX(-50%)}
.tc3-tick::before{content:'';width:4px;height:4px;border-radius:999px;background:oklch(from var(--ink) l c h / .25)}
.tc3-tick.is-stop::before{width:6px;height:6px;background:oklch(from var(--ink) l c h / .45)}
.tc3-tick.is-on::before{background:var(--tc3-fill)}
.tc3-tick button{margin-top:2px;padding:0 4px;border:0;background:none;font:inherit;font-size:.875rem;font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--muted);cursor:pointer}
.tc3-tick button:hover,.tc3-tick.is-on button{color:var(--ink)}
.tc3-slab{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:repeat(var(--rows,5),auto)}
.tc3-half{display:grid;grid-row:span var(--rows,5);grid-template-rows:subgrid;row-gap:20px;align-content:start;min-width:0;padding:clamp(24px,3.4vw,40px)}
.tc3-stay{position:relative;isolation:isolate;overflow:hidden;background:var(--band);color:var(--band-ink);border-radius:var(--tc3-r) 0 0 var(--tc3-r);--tc3-rule:color-mix(in oklch,var(--band-ink) 16%,var(--band));--tc3-soft:color-mix(in oklch,var(--band-ink) 82%,var(--band))}
.tc3-stay > .tc3-cell{position:relative;z-index:1}
.tc3-go{position:relative;z-index:1;margin-left:-1px;background:var(--card);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent) 26%,var(--card));border-radius:var(--tc3-r);box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32));--tc3-rule:oklch(from var(--ink) l c h / .1)}
.tc3-top{display:flex;align-items:center;justify-content:space-between;gap:16px}
.tc3-t{flex:1 1 auto;min-width:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;color:inherit;text-wrap:balance}
.tc3-spot{flex:none;display:block}
.tc3-product{flex:none;display:block;width:132px;height:132px;margin:-10px -6px -10px 0;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--tc3-shadow) l c h / .25)) drop-shadow(0 12px 14px oklch(from var(--tc3-shadow) l c h / .22))}
.tc3-row{display:grid;grid-template-columns:40px minmax(0,1fr);gap:16px;align-items:start;padding-top:20px;border-top:1px solid var(--tc3-rule)}
.tc3-ico{display:grid;place-items:center;width:40px;height:40px;border-radius:999px}
.tc3-stay .tc3-ico{background:oklch(from var(--band-ink) l c h / .12);color:var(--band-ink)}
.tc3-go .tc3-ico{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));box-shadow:inset 0 1px 0 oklch(from var(--accent-fill,var(--accent)) calc(l + .12) c h / .6),0 1px 2px oklch(from var(--tc3-shadow) l c h / .25)}
.tc3-lines{position:relative;display:grid;align-items:start;padding-top:4px}
.tc3-line{grid-area:1 / 1;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;line-height:1.35;text-wrap:pretty;opacity:0;visibility:hidden;transform:translateY(6px);transition:opacity .28s ease,transform .32s cubic-bezier(.2,.7,.2,1),visibility 0s linear .32s}
.tc3-line.is-on{opacity:1;visibility:visible;transform:none;transition-delay:0s}
.tc3-end{display:flex;flex-direction:column;gap:16px;padding-top:24px;border-top:1px solid var(--tc3-rule)}
.tc3-aside{font-style:italic;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--tc3-soft);text-wrap:pretty}
.tc3-cost{margin-top:auto;padding:16px 20px;border-radius:12px;background:oklch(from var(--band-ink) l c h / .08);font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.45;color:var(--band-ink);text-wrap:pretty}
.tc3-coupon{position:relative;display:flex;flex-direction:column;padding:clamp(20px,2.6vw,24px);border-radius:12px;background:color-mix(in oklch,var(--ink) 4%,var(--card));border:1px solid oklch(from var(--ink) l c h / .07)}
.tc3-save{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;color:var(--ink);text-wrap:balance}
.tc3-cnote{margin-top:16px;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
.tc3-cnote svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em;color:var(--success)}
.tc3-price{display:flex;flex-direction:column;gap:8px;margin-top:16px}
.tc3-today{font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted)}
.tc3-amount{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;white-space:nowrap}
.tc3-now-price{display:inline-flex;align-items:baseline;gap:4px}
.tc3-num{font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--ink)}
.tc3-unit{font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;color:var(--ink)}
.tc3-was{font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:600;color:var(--muted);text-decoration:line-through;text-decoration-color:var(--danger);text-decoration-thickness:2px;font-variant-numeric:tabular-nums}
.tc3-btn{--b:var(--button-bg,var(--cta));--b2:var(--button-bg-2,var(--cta-2));position:relative;display:flex;width:100%;min-height:72px;align-items:center;justify-content:center;gap:10px;margin-top:8px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--b) calc(l + .04) c h),oklch(from var(--b2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - .16) c h),0 1px 2px oklch(from var(--tc3-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--tc3-shadow) l c h / .45));cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.tc3-btn.is-hover,.tc3-btn:not(:disabled):not([aria-disabled='true']):hover{background:linear-gradient(oklch(from var(--b) calc(l - .01) c h),oklch(from var(--b2) calc(l - .07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--b) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--b) calc(l - .18) c h),0 1px 2px oklch(from var(--tc3-shadow) l c h / .32),0 12px 20px -6px oklch(from var(--tc3-shadow) l c h / .5))}
.tc3-btn.is-active,.tc3-btn:not(:disabled):not([aria-disabled='true']):active{background:linear-gradient(oklch(from var(--b) calc(l - .04) c h),oklch(from var(--b2) calc(l - .08) c h));transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--b) calc(l - .22) c h / .5),inset 0 -2px 0 oklch(from var(--b) calc(l - .16) c h),0 1px 2px oklch(from var(--tc3-shadow) l c h / .3)}
.tc3-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.tc3-btn:disabled,.tc3-btn[aria-disabled='true']{background:var(--button-2-bg,var(--secondary));color:var(--muted);text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 1px oklch(0.22 0.03 260 / .18),0 1px 3px oklch(0.22 0.03 260 / .14)));transform:none;cursor:not-allowed}
.tc3-btn[aria-busy='true']{cursor:progress}
.tc3-spin{flex:none;animation:tc3-spin .8s linear infinite}
@keyframes tc3-spin{to{transform:rotate(360deg)}}
.tc3-err{padding:10px 12px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:700;line-height:1.4;text-wrap:pretty}
.tc3-err svg,.tc3-note svg{display:inline-block;vertical-align:-.2em;margin-inline-end:.4em}
.tc3-note{text-align:center;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
.tc3-note svg{color:var(--success)}
@media (max-width:760px){
.tc3-scrub{position:sticky;top:8px;gap:10px;padding:14px 16px 8px;box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32))}
.tc3-scrub-top{flex-wrap:nowrap;align-items:center;gap:12px}
.tc3-prompt{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.tc3-slab{grid-template-columns:minmax(0,1fr);grid-template-rows:none}
.tc3-half{grid-row:auto;grid-template-rows:none;padding:24px 20px}
.tc3-coupon{padding:18px 16px}
.tc3-amount{gap:4px 10px}
.tc3-unit{font-size:1.0625rem}
.tc3-was{font-size:1rem}
.tc3-stay{border-radius:var(--tc3-r) var(--tc3-r) 0 0}
.tc3-go{margin-left:0;margin-top:-1px}
.tc3-product{width:96px;height:96px;margin:-6px -4px -6px 0}
}
@media (prefers-reduced-motion:reduce){
.tc3-line,.tc3-btn,.tc3-range::-webkit-slider-thumb,.tc3-range::-moz-range-thumb{transition:none}
.tc3-line{transform:none}
.tc3-spin{animation:none}
.tc3-btn.is-hover,.tc3-btn.is-active,.tc3-btn:not(:disabled):hover,.tc3-btn:not(:disabled):active{transform:none}
.tc3-range:hover::-webkit-slider-thumb,.tc3-range:active::-webkit-slider-thumb{transform:none}
.tc3-range:hover::-moz-range-thumb,.tc3-range:active::-moz-range-thumb{transform:none}
}
`
pieces/content/two-choices-close-3/specimen.tsx 66 lines
import __studioImage00df020c from "../assets/53de34428a407b77.webp";
import * as React from 'react'
import { TwoChoicesClose3, type TwoChoicesClose3State } from '../two-choices-close-3'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
const MONTHS = [
{
month: 1,
stay: ['4 hours sorting receipts into a spreadsheet', 'Two invoices you meant to send last week', 'Already behind, and it’s week four'],
go: ['30 minutes connecting your bank and cards', 'Invoices out the door, reminders switched on', 'Lighter. You can see where you stand'],
},
{
month: 3,
stay: ['12 hours of copy and paste so far', 'A quarter of receipts still in a shoebox', 'Quietly dreading your first tax estimate'],
go: ['About 10 minutes a week to review', 'Every receipt snapped and matched', 'Calm when the quarterly estimate comes up'],
},
{
month: 6,
stay: ['24 hours gone to the spreadsheet', 'Six months of receipts to match by hand', 'Avoiding your own bank app'],
go: ['Still about 10 minutes a week', 'Six months of clean, sorted books', 'Opening your numbers on purpose'],
},
{
month: 9,
stay: ['36 hours, and the formulas keep breaking', 'Three tax estimates, all guesses', '“I’ll sort it this weekend,” again'],
go: ['Minutes a week, never a lost weekend', 'Every estimate set aside as you get paid', 'Your weekends are yours again'],
},
{
month: 12,
stay: ['48 hours: a full working week, gone', 'A year of books to rebuild before tax day', 'Panicked, with tax day weeks away'],
go: ['About 9 hours across the whole year', 'Tax-ready books, one export away', 'Ready for tax day with weeks to spare'],
},
]
export default function TwoChoicesClose3Specimen({ state = 'default' }: { state?: TwoChoicesClose3State }) {
return (
<TwoChoicesClose3
headline='Same twelve months either way. Which year do you want?'
emphasis='Which year do you want?'
lead='Drag the slider forward and watch both paths play out, month by month.'
months={MONTHS}
totalMonths={12}
initialMonth={3}
stayTitle='Keep doing your books by hand'
stayAside='(I know. I ran my own freelance books from a spreadsheet for six years before we built Tallybook.)'
stayClose='Costs nothing today. By month 12, you’re still doing it by hand.'
goTitle='Start Tallybook today'
productImage={slot(
'product',
__studioImage00df020c
)}
productImageAlt='Tallybook open on a laptop and a phone'
couponText='Half off your first 12 months'
couponNote='Applied automatically at checkout'
todayLabel='Your price for the first year'
price='$12'
priceUnit='/month'
regularPrice='$24'
ctaLabel='Start my clean books'
note={defaults.sample.guarantee}
state={state}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalTwoChoicesClose3 |
string |
Default 'Same twelve months either way. Where do you want to be?'
|
emphasis OptionalTwoChoicesClose3 |
string |
Default 'Where do you want to be?'
|
lead OptionalTwoChoicesClose3 |
string |
Default 'Slide the months forward and watch both paths play out, side by side.'
|
months OptionalTwoChoicesClose3 |
ScrubberMonth[] |
Default DEFAULT_MONTHS
|
totalMonths OptionalTwoChoicesClose3 |
number |
Default 12
|
initialMonth OptionalTwoChoicesClose3 |
number |
|
rowLabels OptionalTwoChoicesClose3 |
string[] |
Default ['Time spent on it', 'Still undone', 'How it feels']
|
scrubberLabel OptionalTwoChoicesClose3 |
string |
Default 'Months from today'
|
scrubberPrompt OptionalTwoChoicesClose3 |
string |
Default 'Slide to see where each choice leaves you'
|
monthTemplate OptionalTwoChoicesClose3 |
string |
Default 'Month {month}'
|
ofTemplate OptionalTwoChoicesClose3 |
string |
Default 'of {total}'
|
announceTemplate OptionalTwoChoicesClose3 |
string |
Default '{label} of {total}'
|
stayTitle OptionalTwoChoicesClose3 |
string |
Default 'Keep doing it the way you do now'
|
stayAside OptionalTwoChoicesClose3 |
string |
Default '(I know. Month twelve always feels far away, until it isn’t.)'
|
stayClose OptionalTwoChoicesClose3 |
string |
Default 'It costs nothing today. It costs you every month you wait.'
|
staySpot OptionalTwoChoicesClose3 |
string | null |
Default clock
|
goTitle OptionalTwoChoicesClose3 |
string |
Default 'Start today with a clear plan'
|
productImage OptionalTwoChoicesClose3 |
string |
|
productImageAlt OptionalTwoChoicesClose3 |
string |
Default ''
|
couponText OptionalTwoChoicesClose3 |
string |
|
couponNote OptionalTwoChoicesClose3 |
string |
|
savingTemplate OptionalTwoChoicesClose3 |
string |
Default '{amount}{unit} off today'
|
todayLabel OptionalTwoChoicesClose3 |
string |
Default 'Your price today'
|
price OptionalTwoChoicesClose3 |
string |
|
priceUnit OptionalTwoChoicesClose3 |
string |
Default ''
|
regularPrice OptionalTwoChoicesClose3 |
string |
|
regularPriceLabel OptionalTwoChoicesClose3 |
string |
Default 'Regular price'
|
ctaLabel OptionalTwoChoicesClose3 |
string |
Default 'Start my first month'
|
loadingLabel OptionalTwoChoicesClose3 |
string |
Default 'Opening secure checkout…'
|
note OptionalTwoChoicesClose3 |
string |
|
errorMessage OptionalTwoChoicesClose3 |
string |
Default 'We couldn’t open checkout. Please try again.'
|
state OptionalTwoChoicesClose3 |
TwoChoicesClose3State |
Default 'default'
|
disabled OptionalTwoChoicesClose3 |
boolean |
Default false
|
href OptionalTwoChoicesClose3 |
string |
|
onAction OptionalTwoChoicesClose3 |
() => void | boolean | Promise<void | boolean> |
|
id OptionalTwoChoicesClose3 |
string |
|
className OptionalTwoChoicesClose3 |
string |
Default ''
|
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-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
53de34428a407b77.webp
image/webp · 33.3 KB
-
7c36d7f4dd4ae594.webp
image/webp · 26.5 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
f211b3080387e46d.webp
image/webp · 105 KB