Pay Later 1
Pay-later offer band (Russell's invisible funnel): "Get it free now. Only pay if you love it." Shows today's ledger, the exact charge day and amount
Use it in a prompt
Use offer/pay-later from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/offer/pay-later.tsx. - Import it and pass your copy and images (Props tab):
import { PayLaterOffer } from "@/components/funneldna/offer/pay-later"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/pay-later/component.tsx 507 lines
// layout: diagonal-split
// Pay-later offer band (Russell's invisible funnel): "Get it free now. Only pay if you love it." Shows today's ledger, the exact charge day and amount
// on a tappable timeline, why the card is on file, the full terms beside the button, and one start action.
// Theme: every colour, face, radius and shadow reads the theme contract tokens. The only hex is the documented
// marker default (#fae37c) inside the --marker fallback; images arrive as src props filled from slots.
import * as React from "react"
import { AlertCircle, Check, CreditCard, Loader2, Lock } from "lucide-react"
export type PayLaterItem = {
name: string
detail?: string
/** Value on the ledger line, e.g. "$49". */
value?: string
/** Thumbnail image (slot item-n). */
image?: string
imageAlt?: string
}
export type PayLaterStop = {
/** Timeline label, e.g. "Today" or "Day {day}". */
when: string
/** Total charged to the card by this point, e.g. "{today}" or "{price}". */
amount: string
title: string
detail: string
}
export type PayLaterOfferState = "default" | "hover" | "active" | "disabled" | "error"
/**
* String props accept these placeholders, replaced as text: {today} = todayPrice, {price} = price,
* {days} = trialDays, {day} = the charge day (trialDays + 1), {date} = chargeDate, or today + trialDays.
*/
export type PayLaterOfferProps = {
headline?: React.ReactNode
/** The promise phrase set on one marker stroke. */
highlight?: React.ReactNode
lead?: React.ReactNode
/** Transparent cut-out of what they get (slot product). */
productImage?: string
productImageAlt?: string
ledgerTitle?: string
items?: PayLaterItem[]
valueLabel?: string
/** Ledger total; empty hides the total line. */
regularValue?: string
todayLabel?: string
/** What they pay today, e.g. "$0". */
todayPrice?: string
/** The one later charge, e.g. "$47". */
price?: string
/** Free days before the charge. */
trialDays?: number
/** Fixed charge date text; otherwise today + trialDays in the visitor's locale. */
chargeDate?: string
laterNote?: string
timelineTitle?: React.ReactNode
/** Accessible name of the timeline buttons. */
timelineLabel?: string
meterLabel?: string
meterHint?: string
stops?: PayLaterStop[]
initialStop?: number
cardNoteTitle?: string
cardNote?: string
/** Acknowledgement checkbox beside the button; an empty string removes it. */
consentLabel?: string
consentError?: string
label?: string
busyLabel?: string
reassurance?: string
termsLabel?: string
terms?: string
href?: string
/** Runs after the acknowledgement passes; a returned promise shows the busy state until it settles. */
onAction?: () => void | Promise<unknown>
state?: PayLaterOfferState
className?: string
}
const DEFAULT_ITEMS: PayLaterItem[] = [
{ name: "Funnel Planning Guide", detail: "Map your offer and the pages your funnel needs.", value: "$49" },
{ name: "Page Copy Workbook", detail: "Draft your headline, offer, and call to action.", value: "$29" },
{ name: "Launch Checklist", detail: "Review the links, forms, and next steps before launch.", value: "$19" },
]
const DEFAULT_STOPS: PayLaterStop[] = [
{ when: "Today", amount: "{today}", title: "Your kit downloads right away", detail: "Your card is saved, not charged. You pay {today} at checkout." },
{ when: "Days 1–{days}", amount: "{today}", title: "Use every page, free", detail: "Not for you? Cancel any time before {date} and you're never charged." },
{ when: "Day {day}", amount: "{price}", title: "Love it? Keep it", detail: "Your card is charged {price} once on {date}. No recurring charges." },
]
export function PayLaterOffer(props: PayLaterOfferProps) {
const {
headline = "Get it free now.",
highlight = "Only pay if you love it.",
lead = "Download the kit today for {today}. Use every page for {days} days. Keep it, and you pay {price} once.",
productImage,
productImageAlt = "",
ledgerTitle = "Everything you can use today",
items = DEFAULT_ITEMS,
valueLabel = "Total value",
regularValue = "$97",
todayLabel = "Due today",
todayPrice = "$0",
price = "$47",
trialDays = 14,
chargeDate,
laterNote = "Then {price} once on {date}, only if you keep it.",
timelineTitle = "Exactly when you'd pay, and how to pay nothing",
timelineLabel = "When your card is charged",
meterLabel = "Charged to your card so far",
meterHint = "Tap a day",
stops = DEFAULT_STOPS,
initialStop = 0,
cardNoteTitle = "Why we ask for your card:",
cardNote = "so the kit stays yours after day {days} without a second checkout. Nothing is charged today.",
consentLabel = "I understand: {today} today, then {price} once on {date} unless I cancel before then.",
consentError = "Tick the box so we know you've seen when you'd be charged.",
label = "Send me the kit for {today}",
busyLabel = "One moment…",
reassurance = "Secure checkout · Nothing charged today",
termsLabel = "The full terms:",
terms = "Your {days}-day free trial starts at checkout. Cancel before {date} and your card is never charged. If you keep it, your card is charged {price} once on {date}.",
href,
onAction,
state = "default",
className = "",
} = props
const uid = React.useId()
const titleId = `${uid}-title`
const detailId = `${uid}-detail`
const consentId = `${uid}-consent`
const errorId = `${uid}-error`
const lastStop = Math.max(0, stops.length - 1)
const [active, setActive] = React.useState(() => Math.min(Math.max(0, initialStop), lastStop))
const [agreed, setAgreed] = React.useState(false)
const [tried, setTried] = React.useState(false)
const [busy, setBusy] = React.useState(false)
const consentRef = React.useRef<HTMLInputElement>(null)
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
const date = React.useMemo(() => chargeDate || chargeDateFrom(trialDays), [chargeDate, trialDays])
const vars: Record<string, string> = {
today: todayPrice,
price,
days: String(trialDays),
day: String(trialDays + 1),
date,
}
const t = (text?: string) => (text ? fill(text, vars) : "")
const needsConsent = Boolean(consentLabel)
const disabled = state === "disabled"
const showError = needsConsent && (state === "error" || (tried && !agreed))
const safeActive = Math.min(active, lastStop)
const current = stops[safeActive]
const progress = stops.length > 1 ? safeActive / (stops.length - 1) : 0
const handleAction = (event: React.MouseEvent<HTMLElement>) => {
if (disabled || busy) {
event.preventDefault()
return
}
if (needsConsent && !agreed) {
event.preventDefault()
setTried(true)
consentRef.current?.focus()
return
}
const result: unknown = onAction?.()
if (result instanceof Promise) {
setBusy(true)
const done = () => {
if (alive.current) setBusy(false)
}
result.then(done, done)
}
}
const buttonClass = `pl-btn${state === "hover" ? " is-hover" : ""}${state === "active" ? " is-active" : ""}`
const buttonContent = (
<>
{busy ? <Loader2 className="pl-spin" size={20} strokeWidth={2.5} aria-hidden="true" /> : null}
<span>{busy ? busyLabel : t(label)}</span>
</>
)
return (
<section className={`cf-pay-later${className ? ` ${className}` : ""}`} aria-labelledby={titleId}>
<style>{CSS}</style>
<div className="pl-inner">
<div className="pl-now">
<h2 id={titleId} className="pl-title">
{fillNode(headline, vars)}
{highlight ? (
<>
{" "}
<span className="pl-mark">{fillNode(highlight, vars)}</span>
</>
) : null}
</h2>
{lead ? <p className="pl-lead">{fillNode(lead, vars)}</p> : null}
<div className="pl-offer">
{productImage ? (
<figure className="pl-product">
<img src={productImage} alt={productImageAlt} width={640} height={640} />
</figure>
) : null}
<div className={`pl-ledger${productImage ? " pl-ledger--image" : ""}`}>
{ledgerTitle ? <h3 className="pl-card-title">{t(ledgerTitle)}</h3> : null}
{items.length ? (
<ul className="pl-items">
{items.map((item, i) => (
<li key={`${item.name}-${i}`} className={`pl-item${item.image ? "" : " pl-item--plain"}`}>
{item.image ? (
<img className="pl-thumb" src={item.image} alt={item.imageAlt ?? ""} width={48} height={48} loading="lazy" />
) : null}
<div className="pl-item-body">
<div className="pl-line">
<span className="pl-name">{t(item.name)}</span>
{item.value ? (
<>
<span className="pl-dots" aria-hidden="true" />
<span className="pl-value">{t(item.value)}</span>
</>
) : null}
</div>
{item.detail ? <p className="pl-item-detail">{t(item.detail)}</p> : null}
</div>
</li>
))}
</ul>
) : null}
<div className="pl-sum">
{regularValue ? (
<div className="pl-line pl-sum-line">
<span className="pl-name">{t(valueLabel)}</span>
<span className="pl-dots" aria-hidden="true" />
<span className="pl-value">{t(regularValue)}</span>
</div>
) : null}
<div className="pl-today">
<div>
<span className="pl-today-label">{t(todayLabel)}</span>
<span className="pl-today-num">{t(todayPrice)}</span>
</div>
{laterNote ? <p className="pl-today-note">{t(laterNote)}</p> : null}
</div>
</div>
</div>
</div>
</div>
<div className="pl-later">
{timelineTitle ? <h3 className="pl-later-title">{fillNode(timelineTitle, vars)}</h3> : null}
{current ? (
<div className="pl-meter">
<div className="pl-meter-top">
<span className="pl-meter-label">{t(meterLabel)}</span>
{meterHint ? <span className="pl-hint">{t(meterHint)}</span> : null}
</div>
<div className="pl-meter-num" key={`num-${safeActive}`} aria-hidden="true">
{t(current.amount)}
</div>
<div
className="pl-track"
role="group"
aria-label={t(timelineLabel)}
style={{ "--pl-n": stops.length, "--pl-p": progress } as React.CSSProperties}
>
<span className="pl-rail" aria-hidden="true">
<span className="pl-fill" />
</span>
{stops.map((stop, i) => (
<button
key={`${stop.when}-${i}`}
type="button"
className="pl-stop"
aria-pressed={i === safeActive}
aria-controls={detailId}
data-reached={i <= safeActive ? "true" : "false"}
onClick={() => setActive(i)}
>
<span className="pl-node" aria-hidden="true">
{i <= safeActive ? <Check size={16} strokeWidth={2.5} /> : null}
</span>
<span className="pl-when">{t(stop.when)}</span>
<span className="pl-amt">{t(stop.amount)}</span>
</button>
))}
</div>
<div className="pl-detail" id={detailId} aria-live="polite">
<div className="pl-detail-in" key={`detail-${safeActive}`}>
<span className="pl-sr">
{t(meterLabel)}: {t(current.amount)}.{" "}
</span>
<p className="pl-detail-title">{t(current.title)}</p>
<p className="pl-detail-text">{t(current.detail)}</p>
</div>
</div>
</div>
) : null}
{cardNote ? (
<p className="pl-cardnote">
<CreditCard className="pl-inline" size={18} strokeWidth={2.5} aria-hidden="true" />
{cardNoteTitle ? <strong>{t(cardNoteTitle)}</strong> : null} {t(cardNote)}
</p>
) : null}
<div className="pl-decide">
{needsConsent ? (
<div className="pl-consent-wrap">
<label className={`pl-consent${showError ? " is-invalid" : ""}`} htmlFor={consentId}>
<span className="pl-check">
<input
ref={consentRef}
id={consentId}
type="checkbox"
checked={agreed}
onChange={(event) => setAgreed(event.target.checked)}
aria-invalid={showError || undefined}
aria-describedby={showError ? errorId : undefined}
/>
<Check size={18} strokeWidth={2.5} aria-hidden="true" />
</span>
<span className="pl-consent-text">{t(consentLabel)}</span>
</label>
{showError ? (
<p id={errorId} className="pl-error" role="alert">
<AlertCircle className="pl-inline" size={16} strokeWidth={2.5} aria-hidden="true" />
{t(consentError)}
</p>
) : null}
</div>
) : null}
{href && !disabled ? (
<a className={buttonClass} href={href} onClick={handleAction} aria-busy={busy || undefined}>
{buttonContent}
</a>
) : (
<button type="button" className={buttonClass} disabled={disabled} onClick={handleAction} aria-busy={busy || undefined}>
{buttonContent}
</button>
)}
{reassurance ? (
<p className="pl-reassure">
<Lock className="pl-inline" size={16} strokeWidth={2.5} aria-hidden="true" />
{t(reassurance)}
</p>
) : null}
{terms ? (
<p className="pl-terms">
{termsLabel ? <strong>{t(termsLabel)}</strong> : null} {t(terms)}
</p>
) : null}
</div>
</div>
</div>
</section>
)
}
export default PayLaterOffer
function fill(text: string, vars: Record<string, string>): string {
return Object.keys(vars).reduce((out, key) => out.split(`{${key}}`).join(vars[key]), text)
}
function fillNode(node: React.ReactNode, vars: Record<string, string>): React.ReactNode {
return typeof node === "string" ? fill(node, vars) : node
}
function chargeDateFrom(days: number): string {
const d = new Date()
d.setDate(d.getDate() + days)
try {
return new Intl.DateTimeFormat(undefined, { month: "long", day: "numeric" }).format(d)
} catch {
return d.toDateString()
}
}
const CSS = `
.cf-pay-later{--pl-gutter:clamp(16px,5vw,48px);--pl-angle:clamp(40px,5vw,72px);--pl-angle-y:40px;--pl-pad-t:clamp(56px,8vw,112px);--pl-pad-b:clamp(64px,8.5vw,120px);--pl-overlap:clamp(32px,4vw,56px);--pl-card-pad:clamp(20px,3vw,32px);--pl-ease:cubic-bezier(.2,.7,.2,1);--pl-shadow:var(--shadow,oklch(0.22 0.03 260));--pl-shadow-md:0 1px 2px oklch(from var(--pl-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--pl-shadow) l c h / .2);--pl-shadow-lg:0 2px 4px oklch(from var(--pl-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--pl-shadow) l c h / .32);--pl-marker:var(--marker,#fae37c);position:relative;overflow:hidden;background:var(--surface);color:var(--ink);font-family:var(--font-body);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5}
.cf-pay-later *,.cf-pay-later *::before,.cf-pay-later *::after{box-sizing:border-box}
.cf-pay-later p{text-wrap:pretty}
.cf-pay-later .pl-inner{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;max-width:calc(1120px + 2 * var(--pl-gutter));margin:0 auto;padding-inline:var(--pl-gutter)}
.cf-pay-later .pl-now{min-width:0;padding:var(--pl-pad-t) clamp(16px,3vw,40px) var(--pl-pad-b) 0}
.cf-pay-later .pl-later{--pl-meter-bg:color-mix(in oklch,var(--band-ink) 7%,var(--band));--pl-stop-hover:color-mix(in oklch,var(--band-ink) 12%,var(--band));--pl-stop-on:color-mix(in oklch,var(--band-ink) 17%,var(--band));position:relative;isolation:isolate;min-width:0;padding:var(--pl-pad-t) 0 var(--pl-pad-b) calc(var(--pl-angle) + clamp(24px,3vw,40px));background-color:var(--band);color:var(--band-ink);clip-path:polygon(var(--pl-angle) 0,calc(100% + 100vw) 0,calc(100% + 100vw) 100%,0 100%)}
.cf-pay-later .pl-later::before{content:"";position:absolute;z-index:-1;top:0;bottom:0;left:0;right:calc(-1 * max(var(--pl-gutter),(100vw - 1120px) / 2) - 8px);background:var(--band)}
.cf-pay-later .pl-title{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);text-wrap:balance;color:var(--ink)}
.cf-pay-later .pl-mark{--pl-mark-fill:oklch(from var(--pl-marker) l c h / 1);color:oklch(from var(--pl-marker) clamp(0.2,(0.62 - l) * 1000,0.97) 0.02 h);background:linear-gradient(var(--pl-mark-fill),var(--pl-mark-fill)) 0 72% / 100% 84% no-repeat;padding:0 .12em;margin:0 -.06em;border-radius:.18em .34em .24em .4em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-pay-later .pl-lead{margin:0 0 32px;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted)}
.cf-pay-later .pl-offer{position:relative}
.cf-pay-later .pl-product{position:relative;z-index:1;width:min(100%,320px);margin:0 auto calc(-1 * var(--pl-overlap))}
.cf-pay-later .pl-product img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 2px 3px oklch(from var(--pl-shadow) l c h / .28)) drop-shadow(0 14px 16px oklch(from var(--pl-shadow) l c h / .22))}
.cf-pay-later .pl-ledger,.cf-pay-later .pl-decide{background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));padding:var(--pl-card-pad)}
.cf-pay-later .pl-ledger{box-shadow:var(--card-shadow,var(--shadow-md,var(--pl-shadow-md)))}
.cf-pay-later .pl-ledger--image{padding-top:calc(var(--pl-card-pad) + var(--pl-overlap))}
.cf-pay-later .pl-card-title{margin:0 0 20px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;text-transform:var(--display-case,none);text-wrap:balance}
.cf-pay-later .pl-items{list-style:none;margin:0;padding:0;display:grid;gap:16px}
.cf-pay-later .pl-item{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;align-items:start}
.cf-pay-later .pl-item--plain{grid-template-columns:minmax(0,1fr)}
.cf-pay-later .pl-thumb{display:block;width:48px;height:48px;border-radius:min(8px,var(--radius,14px));object-fit:cover;object-position:center}
.cf-pay-later .pl-item-body{min-width:0}
.cf-pay-later .pl-line{display:flex;align-items:baseline;gap:8px}
.cf-pay-later .pl-name{min-width:0;font-weight:700;line-height:1.3}
.cf-pay-later .pl-dots{flex:1 1 16px;min-width:16px;height:3px;transform:translateY(-.28em);background-image:radial-gradient(circle,oklch(from var(--ink) l c h / .4) 1.1px,transparent 1.5px);background-size:7px 3px;background-repeat:repeat-x;background-position:left center}
.cf-pay-later .pl-value{flex:none;font-weight:800;font-variant-numeric:tabular-nums;line-height:1.3}
.cf-pay-later .pl-item-detail{margin:4px 0 0;font-size:15px;line-height:1.4;color:var(--muted)}
.cf-pay-later .pl-sum{margin-top:24px;padding:16px 20px 20px;border-radius:min(10px,var(--card-radius,var(--radius,14px)));background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-pay-later .pl-sum-line .pl-name{font-weight:700}
.cf-pay-later .pl-today{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;margin-top:16px}
.cf-pay-later .pl-sum>.pl-today:first-child{margin-top:0}
.cf-pay-later .pl-today-label{display:block;margin-bottom:12px;font-size:15px;font-weight:700;line-height:1.2;color:var(--muted)}
.cf-pay-later .pl-today-num{display:block;font-family:var(--font-display);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)}
.cf-pay-later .pl-today-note{flex:1 1 180px;max-width:26ch;margin:0;font-size:15px;font-weight:600;line-height:1.4;color:var(--ink)}
.cf-pay-later .pl-later-title{margin:0 0 24px;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;text-transform:var(--display-case,none);text-wrap:balance;color:var(--band-ink)}
.cf-pay-later .pl-meter{padding:clamp(20px,3vw,28px);border-radius:var(--card-radius,var(--radius,14px));background-color:var(--pl-meter-bg);color:var(--band-ink);border:1px solid oklch(from var(--band-ink) l c h / .18);box-shadow:var(--shadow-md,var(--pl-shadow-md))}
.cf-pay-later .pl-meter-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;margin-bottom:12px}
.cf-pay-later .pl-meter-label{font-size:15px;font-weight:700;line-height:1.3}
.cf-pay-later .pl-hint{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background-color:var(--pl-stop-on);color:var(--band-ink);font-size:14px;font-weight:800;line-height:1.2;white-space:nowrap}
.cf-pay-later .pl-meter-num{margin-bottom:24px;font-family:var(--font-display);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;transform-origin:left bottom;animation:pl-pop .3s var(--pl-ease) both}
.cf-pay-later .pl-track{position:relative;display:grid;grid-template-columns:repeat(var(--pl-n),minmax(0,1fr))}
.cf-pay-later .pl-rail{position:absolute;top:20.5px;left:calc(100% / var(--pl-n) / 2);right:calc(100% / var(--pl-n) / 2);height:3px;border-radius:3px;background:oklch(from var(--band-ink) l c h / .22)}
.cf-pay-later .pl-fill{position:absolute;top:0;bottom:0;left:0;width:calc(var(--pl-p) * 100%);border-radius:inherit;background:var(--band-ink);transition:width .45s var(--pl-ease)}
.cf-pay-later .pl-stop{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0;min-height:44px;padding:8px 4px 10px;border:0;border-radius:min(10px,var(--button-radius,var(--radius,14px)));background:transparent;color:var(--band-ink);font:inherit;text-align:center;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background-color .16s ease}
.cf-pay-later .pl-stop:hover{background-color:var(--pl-stop-hover)}
.cf-pay-later .pl-stop[aria-pressed="true"]{background-color:var(--pl-stop-on)}
.cf-pay-later .pl-stop:focus-visible{outline:3px solid var(--band-ink);outline-offset:2px}
.cf-pay-later .pl-stop:active .pl-node{transform:scale(.92)}
.cf-pay-later .pl-node{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--pl-meter-bg);color:var(--band);box-shadow:inset 0 0 0 2px oklch(from var(--band-ink) l c h / .55);transition:background-color .16s ease,transform .16s ease}
.cf-pay-later .pl-stop[data-reached="true"] .pl-node{background:var(--band-ink);box-shadow:none}
.cf-pay-later .pl-stop[aria-pressed="true"] .pl-node{outline:3px solid oklch(from var(--band-ink) l c h / .32);outline-offset:3px}
.cf-pay-later .pl-when{font-size:14px;font-weight:800;line-height:1.2}
.cf-pay-later .pl-amt{font-size:15px;font-weight:600;line-height:1.2;font-variant-numeric:tabular-nums}
.cf-pay-later .pl-detail{margin-top:16px;min-height:4.8em}
.cf-pay-later .pl-detail-in{animation:pl-rise .45s var(--pl-ease) both}
.cf-pay-later .pl-detail-title{margin:0 0 4px;font-weight:800;line-height:1.3}
.cf-pay-later .pl-detail-text{margin:0;line-height:1.5}
.cf-pay-later .pl-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-pay-later .pl-cardnote{margin:20px 0 0;line-height:1.5}
.cf-pay-later .pl-cardnote strong{font-weight:800}
.cf-pay-later .pl-inline{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-pay-later .pl-decide{margin-top:24px;box-shadow:var(--card-shadow,var(--shadow-lg,var(--pl-shadow-lg)))}
.cf-pay-later .pl-consent{display:grid;grid-template-columns:24px minmax(0,1fr);gap:12px;align-items:start;font-weight:600;line-height:1.4;color:var(--label-ink,var(--ink));cursor:pointer}
.cf-pay-later .pl-consent-text{text-wrap:pretty}
.cf-pay-later .pl-check{position:relative;display:block;width:24px;height:24px;margin-top:.05em}
.cf-pay-later .pl-check input{-webkit-appearance:none;appearance:none;display:block;width:24px;height:24px;margin:0;border:2px solid var(--field-border,color-mix(in oklch,var(--field-ink) 50%,var(--field)));border-radius:min(6px,var(--field-radius,var(--radius,6px)));background:var(--field);cursor:pointer;transition:background-color .16s ease,border-color .16s ease}
.cf-pay-later .pl-consent:hover .pl-check input{border-color:color-mix(in oklch,var(--field-ink) 78%,var(--field))}
.cf-pay-later .pl-check input:checked{background:var(--accent-fill,var(--accent));border-color:var(--accent-fill,var(--accent))}
.cf-pay-later .pl-check input:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .45);outline-offset:2px}
.cf-pay-later .pl-check svg{position:absolute;left:3px;top:3px;width:18px;height:18px;color:var(--accent-fill-ink,var(--card));opacity:0;transform:scale(.6);transition:opacity .16s ease,transform .16s ease;pointer-events:none}
.cf-pay-later .pl-check input:checked+svg{opacity:1;transform:none}
.cf-pay-later .pl-consent.is-invalid .pl-check input{border-color:var(--danger)}
.cf-pay-later .pl-error{margin:10px 0 0 36px;font-size:15px;font-weight:600;line-height:1.4;color:var(--danger)}
.cf-pay-later .pl-btn{--pl-b:var(--button-bg,var(--cta));--pl-b2:var(--button-bg-2,var(--cta-2));position:relative;display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:64px;margin-top:20px;padding:12px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--pl-b) calc(l + .04) c h),oklch(from var(--pl-b2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));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;letter-spacing:-.005em;text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--pl-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--pl-b) calc(l - .16) c h),0 1px 2px oklch(from var(--pl-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--pl-shadow) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-pay-later .pl-decide>.pl-btn:first-child{margin-top:0}
.cf-pay-later .pl-btn:not(:disabled):hover,.cf-pay-later .pl-btn.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--pl-b) calc(l - .01) c h),oklch(from var(--pl-b2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--pl-b) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--pl-b) calc(l - .2) c h),0 1px 2px oklch(from var(--pl-shadow) l c h / .32),0 10px 18px -6px oklch(from var(--pl-shadow) l c h / .52));transform:translateY(-1px)}
.cf-pay-later .pl-btn:not(:disabled):active,.cf-pay-later .pl-btn.is-active:not(:disabled){background:linear-gradient(oklch(from var(--pl-b) calc(l - .05) c h),oklch(from var(--pl-b2) calc(l - .09) c h));box-shadow:inset 0 2px 4px oklch(from var(--pl-b) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--pl-b) calc(l - .16) c h),0 1px 1px oklch(from var(--pl-shadow) l c h / .3);transform:translateY(1px)}
.cf-pay-later .pl-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-pay-later .pl-btn:disabled{background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:none;text-shadow:none;cursor:not-allowed;transform:none}
.cf-pay-later .pl-btn[aria-busy="true"]{cursor:progress}
.cf-pay-later .pl-reassure{margin:12px 0 0;text-align:center;font-size:15px;font-weight:600;line-height:1.4;color:var(--muted)}
.cf-pay-later .pl-terms{margin:24px 0 0;padding:16px 20px;border-radius:min(10px,var(--card-radius,var(--radius,14px)));background:color-mix(in oklch,var(--ink) 4%,var(--card));font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink)}
.cf-pay-later .pl-terms strong{font-weight:800}
@keyframes pl-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes pl-pop{from{transform:scale(.9)}to{transform:none}}
@keyframes pl-spin{to{transform:rotate(360deg)}}
.cf-pay-later .pl-now>*,.cf-pay-later .pl-later>*{animation:pl-rise .45s var(--pl-ease) both}
.cf-pay-later .pl-now>:nth-child(2),.cf-pay-later .pl-later>:nth-child(2){animation-delay:.07s}
.cf-pay-later .pl-now>:nth-child(3),.cf-pay-later .pl-later>:nth-child(3){animation-delay:.14s}
.cf-pay-later .pl-now>:nth-child(4),.cf-pay-later .pl-later>:nth-child(4){animation-delay:.21s}
.cf-pay-later .pl-now>:nth-child(n+5),.cf-pay-later .pl-later>:nth-child(n+5){animation-delay:.28s}
.cf-pay-later .pl-spin{flex:none;animation:pl-spin .8s linear infinite}
@media (max-width:900px){
.cf-pay-later .pl-inner{grid-template-columns:minmax(0,1fr)}
.cf-pay-later .pl-now{padding:var(--pl-pad-t) 0 clamp(48px,9vw,72px)}
.cf-pay-later .pl-later{padding:calc(var(--pl-angle-y) + clamp(32px,6vw,48px)) 0 var(--pl-pad-b);clip-path:polygon(calc(-1 * var(--pl-gutter)) var(--pl-angle-y),calc(100% + var(--pl-gutter)) 0,calc(100% + var(--pl-gutter)) 100%,calc(-1 * var(--pl-gutter)) 100%)}
.cf-pay-later .pl-later::before{left:calc(-1 * var(--pl-gutter));right:calc(-1 * var(--pl-gutter))}
.cf-pay-later .pl-product{width:min(100%,280px)}
}
@media (max-width:480px){
.cf-pay-later .pl-btn{padding-inline:20px}
.cf-pay-later .pl-sum{padding:14px 16px 16px}
.cf-pay-later .pl-terms{padding:14px 16px}
.cf-pay-later .pl-detail{min-height:6.2em}
}
@media (prefers-reduced-motion:reduce){
.cf-pay-later *,.cf-pay-later *::before,.cf-pay-later *::after{animation:none !important;transition:none !important}
}
`
pieces/offer/pay-later/specimen.tsx 69 lines
import __studioImage42a67c31 from "../assets/f83a163c55f3cdc7.webp";
import * as React from "react"
import { PayLaterOffer, type PayLaterOfferState } from "../pay-later"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled", "error"]
export default function PayLaterSpecimen({ state = "default" }: { state?: PayLaterOfferState }) {
const sample = defaults.sample
const items = sample.items.map((item, i) => ({
name: item.name,
detail: item.detail,
value: item.value,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))
return (
<PayLaterOffer
state={state}
headline="Get it free now."
highlight="Only pay if you love it."
lead={`Download ${sample.name} today for {today}. Use every page for {days} days. Keep it, and you pay {price} once.`}
productImage={slot(
"product",
__studioImage42a67c31
)}
productImageAlt={`${sample.name}: the planning guide, copy workbook and launch checklist`}
ledgerTitle="Everything you can use today"
items={items}
valueLabel="Total value"
regularValue={sample.regularPrice}
todayLabel="Due today"
todayPrice="$0"
price={sample.price}
trialDays={14}
laterNote="Then {price} once on {date}, only if you keep it."
timelineTitle="Exactly when you'd pay, and how to pay nothing"
stops={[
{
when: "Today",
amount: "{today}",
title: "Your kit downloads right away",
detail: "Your card is saved, not charged. You pay {today} at checkout.",
},
{
when: "Days 1–{days}",
amount: "{today}",
title: "Use every page, free",
detail: "Not for you? Cancel any time before {date} and you're never charged.",
},
{
when: "Day {day}",
amount: "{price}",
title: "Love it? Keep it",
detail: "Your card is charged {price} once on {date}. One payment, lifetime access.",
},
]}
cardNoteTitle="Why we ask for your card:"
cardNote="so the kit stays yours after day {days} without a second checkout. Nothing is charged today."
consentLabel="I understand: {today} today, then {price} once on {date} unless I cancel before then."
label="Send me the kit for {today}"
reassurance="Secure checkout · Nothing charged today"
termsLabel="The full terms:"
terms={`Your {days}-day free trial starts at checkout. Cancel before {date} and you're never charged. Keep the kit and you pay {price} once on {date}, with no recurring charges. Your ${sample.guarantee} still applies after that.`}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalPayLaterOffer |
React.ReactNode |
|
highlight OptionalPayLaterOffer |
React.ReactNode |
|
lead OptionalPayLaterOffer |
React.ReactNode |
|
productImage OptionalPayLaterOffer |
string |
|
productImageAlt OptionalPayLaterOffer |
string |
|
ledgerTitle OptionalPayLaterOffer |
string |
|
items OptionalPayLaterOffer |
PayLaterItem[] |
|
valueLabel OptionalPayLaterOffer |
string |
|
regularValue OptionalPayLaterOffer |
string |
|
todayLabel OptionalPayLaterOffer |
string |
|
todayPrice OptionalPayLaterOffer |
string |
|
price OptionalPayLaterOffer |
string |
|
trialDays OptionalPayLaterOffer |
number |
|
chargeDate OptionalPayLaterOffer |
string |
|
laterNote OptionalPayLaterOffer |
string |
|
timelineTitle OptionalPayLaterOffer |
React.ReactNode |
|
timelineLabel OptionalPayLaterOffer |
string |
|
meterLabel OptionalPayLaterOffer |
string |
|
meterHint OptionalPayLaterOffer |
string |
|
stops OptionalPayLaterOffer |
PayLaterStop[] |
|
initialStop OptionalPayLaterOffer |
number |
|
cardNoteTitle OptionalPayLaterOffer |
string |
|
cardNote OptionalPayLaterOffer |
string |
|
consentLabel OptionalPayLaterOffer |
string |
|
consentError OptionalPayLaterOffer |
string |
|
label OptionalPayLaterOffer |
string |
|
busyLabel OptionalPayLaterOffer |
string |
|
reassurance OptionalPayLaterOffer |
string |
|
termsLabel OptionalPayLaterOffer |
string |
|
terms OptionalPayLaterOffer |
string |
|
href OptionalPayLaterOffer |
string |
|
onAction OptionalPayLaterOffer |
() => void | Promise<unknown> |
|
state OptionalPayLaterOffer |
PayLaterOfferState |
|
className OptionalPayLaterOffer |
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-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.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
product- The main product shot or cover (ebook, kit, bottle).
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
f83a163c55f3cdc7.webp
image/webp · 195 KB