Trial Offer 2
Trial offer close: a huge centred trial price, a day slider that shows exactly what is charged on any day of the trial, a short letter and one start-trial button, so honest billing does the selling.
Use it in a prompt
Use offer/trial-offer-2 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/trial-offer-2.tsx. - Import it and pass your copy and images (Props tab):
import { TrialOffer2 } from "@/components/funneldna/offer/trial-offer-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/trial-offer-2/component.tsx 451 lines
// layout: classic-centred-stack
// Trial offer close: a huge centred trial price, a day slider that shows exactly what is charged on any day of the trial, a short letter and one start-trial button, so honest billing does the selling.
import * as React from "react"
import { CalendarX2 as CalendarXIcon, CircleAlert as AlertIcon, LoaderCircle as SpinnerIcon, ShieldCheck as ShieldIcon } from "lucide-react"
import { FX_HOST, Pattern } from "../fx/fx"
export type TrialOffer2State = "default" | "hover" | "active" | "disabled" | "error"
/** Billing words. Templates: {day}, {trialDays}, {trialPrice}, {chargeAmount}, {zeroAmount}. */
export type TrialOffer2Copy = { [K in keyof typeof DEFAULT_COPY]: string }
export type TrialOffer2Props = {
/** Headline before the marker phrase. */
headline?: React.ReactNode
/** Phrase swiped with the marker; supports the templates. */
accent?: string
lead?: string
/** Product composite on a transparent background (slot "product"). */
productImage?: string
productImageAlt?: string
/** Price paid today to start the trial, set huge. */
trialPrice?: string
/** Trial length in days; the slider runs from today to this day. */
trialDays?: number
/** One payment on the last day of the trial, only if the buyer keeps the product. */
chargeAmount?: string
/** Amount shown for days with no charge. */
zeroAmount?: string
/** Day the slider starts on; defaults to the charge day. */
initialDay?: number
/** Letter salutation, e.g. "Dear friend,"; omitted when empty. */
salutation?: string
/** Short letter paragraphs; support the templates. */
letter?: string[]
signOff?: string
/** Signer's name, set in the page's display face (or --signature-face when a page sets one); omitted when empty. */
signName?: string
/** Printed line under the signature. */
signRole?: string
/** Button label; supports the templates. */
ctaLabel?: string
/** Button label while onAction is pending. */
loadingLabel?: string
/** Cancel line under the button; supports the templates; omitted when empty. */
cancelLine?: string
/** Guarantee line under the button; omitted when empty. */
guarantee?: string
/** Plain secondary line under the button. */
secondaryLine?: string
/** Makes the secondary line a link. */
secondaryHref?: string
/** Shown when onAction rejects or state is "error". */
errorMessage?: string
/** Shown under the button when it is disabled. */
disabledNote?: string
copy?: Partial<TrialOffer2Copy>
state?: TrialOffer2State
disabled?: boolean
/** Start-trial click. The builder wires what happens next; a rejected promise shows the error line. */
onAction?: () => void | Promise<void>
className?: string
style?: React.CSSProperties
}
export function TrialOffer2({
headline = "Try the whole kit",
accent = "for {trialDays} days for {trialPrice}",
lead = "Plan your funnel, write your page copy, and check every step before you launch.",
productImage,
productImageAlt = "",
trialPrice = "$1",
trialDays = 14,
chargeAmount = "$47",
zeroAmount = "$0",
initialDay,
salutation = "Dear friend,",
letter = DEFAULT_LETTER,
signOff = "To your first launch,",
signName,
signRole,
ctaLabel = "Start My {trialPrice} Trial",
loadingLabel = "Starting your trial\u2026",
cancelLine = "Cancel before day {trialDays} and you pay nothing more.",
guarantee,
secondaryLine = "or keep reading to see what\u2019s inside",
secondaryHref,
errorMessage = "We couldn\u2019t start your trial and nothing was charged. Please try again.",
disabledNote = "This trial isn\u2019t open right now.",
copy,
state = "default",
disabled = false,
onAction,
className,
style,
}: TrialOffer2Props) {
const t: TrialOffer2Copy = { ...DEFAULT_COPY, ...copy }
const last = Math.max(2, Math.round(trialDays) || 14)
const startDay = clamp(Math.round(initialDay ?? last), 1, last)
const [day, setDay] = React.useState(startDay)
const [phase, setPhase] = React.useState<Phase>(state === "error" ? "error" : "idle")
const alive = React.useRef(true)
const pending = React.useRef(false)
const uid = React.useId()
const ids = { title: uid + "title", meter: uid + "meter", terms: uid + "terms", status: uid + "status" }
React.useEffect(() => {
setDay(startDay)
}, [startDay])
React.useEffect(() => {
setPhase(state === "error" ? "error" : "idle")
}, [state])
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
const values: Record<string, string> = { day: String(day), trialDays: String(last), trialPrice, chargeAmount, zeroAmount }
const fill = (text: string) => text.replace(/\{(day|trialDays|trialPrice|chargeAmount|zeroAmount)\}/g, (match: string, key: string) => values[key] ?? match)
const kind: "today" | "mid" | "charge" = day <= 1 ? "today" : day >= last ? "charge" : "mid"
const amount = kind === "today" ? trialPrice : kind === "charge" ? chargeAmount : zeroAmount
const dayName = fill(kind === "today" ? t.todayName : t.dayName)
const sentence = fill(kind === "today" ? t.todaySay : kind === "charge" ? t.chargeSay : t.midSay)
const progress = (day - 1) / (last - 1)
const ticks = last <= 31 ? Array.from({ length: last }, (_, i) => i + 1) : []
const amountWidth = Math.max(trialPrice.length, chargeAmount.length, zeroAmount.length)
const todayParts = splitPrice(trialPrice)
const laterParts = splitPrice(chargeAmount)
const isDisabled = disabled || state === "disabled"
const busy = phase === "loading"
const force = !isDisabled && phase === "idle" && (state === "hover" || state === "active") ? state : undefined
const paras = (letter || []).filter(Boolean)
const cancel = cancelLine ? fill(cancelLine) : ""
const showTerms = Boolean(cancel || guarantee)
const showStatus = phase === "error" || isDisabled
const handleStart = async () => {
if (isDisabled || busy || pending.current || !onAction) return
pending.current = true
setPhase("loading")
try {
await onAction()
if (alive.current) setPhase("idle")
} catch {
if (alive.current) setPhase("error")
} finally {
pending.current = false
}
}
return (
<section className={["cf-trial-offer-2", className].filter(Boolean).join(" ")} style={{ ...FX_HOST, ...style }} aria-labelledby={ids.title}>
<style>{CSS}</style>
<Pattern name="rings" fade="edges" />
<div className="t2-stack">
<header className="t2-head t2-rise" style={at(0)}>
<h2 id={ids.title} className="t2-title">
{headline}
{accent ? (
<>
{" "}
<span className="t2-mark">{fill(accent)}</span>
</>
) : null}
</h2>
{lead ? <p className="t2-lead">{fill(lead)}</p> : null}
</header>
{productImage ? (
<figure className="t2-shot t2-rise" style={at(1)}>
<img src={productImage} alt={productImageAlt} width={512} height={512} decoding="async" />
</figure>
) : null}
<div className="t2-prices t2-rise" style={at(2)}>
<p className="t2-sr">{fill(t.priceSummary)}</p>
<div className="t2-pair" aria-hidden="true">
<span className="t2-fig t2-fig--today">
<PriceFigure parts={todayParts} />
</span>
<span className="t2-then">{fill(t.thenWord)}</span>
<span className="t2-fig t2-fig--later">
<PriceFigure parts={laterParts} />
</span>
<span className="t2-under t2-under--today">{fill(t.todayUnder)}</span>
<span className="t2-under t2-under--later">{fill(t.laterUnder)}</span>
</div>
</div>
<section className="t2-meter t2-rise" style={at(3)} aria-labelledby={ids.meter}>
<h3 id={ids.meter} className="t2-meter-title">{fill(t.meterTitle)}</h3>
<div className="t2-scale" style={{ "--t2-p": progress } as React.CSSProperties}>
<div className="t2-rail" aria-hidden="true">
<span className="t2-fill" />
{ticks.map((d) => (
<span
key={d}
className={["t2-tick", d <= day ? "is-on" : "", d === 1 || d === last ? "is-key" : ""].filter(Boolean).join(" ")}
style={{ "--t2-x": (d - 1) / (last - 1) } as React.CSSProperties}
/>
))}
</div>
<input
className="t2-range"
type="range"
min={1}
max={last}
step={1}
value={day}
onChange={(event) => setDay(clamp(Number(event.target.value), 1, last))}
aria-label={fill(t.sliderLabel)}
aria-valuetext={dayName + ": " + amount + ". " + sentence}
/>
</div>
<div className="t2-ends" aria-hidden="true">
<span>{fill(t.startEnd)}</span>
<span>{fill(t.endEnd)}</span>
</div>
<div className="t2-readout" style={{ "--t2-w": amountWidth + "ch" } as React.CSSProperties}>
<p className="t2-charged">
<span className="t2-when">{dayName}</span>
<span className="t2-amount">{amount}</span>
</p>
<p className="t2-say">{sentence}</p>
</div>
{t.afterLine ? <p className="t2-after">{fill(t.afterLine)}</p> : null}
</section>
{salutation || paras.length ? (
<div className="t2-letter t2-rise" style={at(4)}>
{salutation ? <p className="t2-salute">{salutation}</p> : null}
{paras.map((paragraph, index) => (
<p key={index} className="t2-para">
{fill(paragraph)}
</p>
))}
{signOff || signName ? (
<div className="t2-sign">
{signOff ? <p className="t2-signoff">{signOff}</p> : null}
{signName ? <p className="t2-signature">{signName}</p> : null}
{signName && signRole ? <p className="t2-role">{signRole}</p> : null}
</div>
) : null}
</div>
) : null}
<div className="t2-action t2-rise" style={at(5)}>
<button
type="button"
className={["t2-btn", force ? "is-" + force : "", busy ? "is-busy" : ""].filter(Boolean).join(" ")}
onClick={handleStart}
disabled={isDisabled}
aria-busy={busy || undefined}
aria-describedby={[showTerms ? ids.terms : "", showStatus ? ids.status : ""].filter(Boolean).join(" ") || undefined}
>
{busy ? (
<>
<SpinnerIcon className="t2-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{loadingLabel}</span>
</>
) : (
<span>{fill(ctaLabel)}</span>
)}
</button>
{showTerms ? (
<p id={ids.terms} className="t2-assure">
{cancel ? (
<span>
<CalendarXIcon className="t2-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{cancel}
</span>
) : null}
{guarantee ? (
<span>
<ShieldIcon className="t2-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{guarantee}
</span>
) : null}
</p>
) : null}
{showStatus ? (
<p id={ids.status} className={phase === "error" ? "t2-status is-error" : "t2-status"} role={phase === "error" ? "alert" : undefined}>
{phase === "error" ? (
<>
<AlertIcon className="t2-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{errorMessage}
</>
) : (
disabledNote
)}
</p>
) : null}
{secondaryLine ? (
secondaryHref ? (
<a className="t2-quiet" href={secondaryHref}>
{secondaryLine}
</a>
) : (
<p className="t2-quiet">{secondaryLine}</p>
)
) : null}
</div>
</div>
</section>
)
}
export default TrialOffer2
type Phase = "idle" | "loading" | "error"
type PriceParts = { cur: string; num: string }
const DEFAULT_COPY = {
priceSummary: "{trialPrice} today to start your {trialDays}-day trial, then {chargeAmount} once on day {trialDays}, only if you keep it.",
thenWord: "then",
todayUnder: "today, to start your {trialDays}-day trial",
laterUnder: "one-time payment on day {trialDays}, only if you keep it",
meterTitle: "Slide to any day and see exactly what you pay",
sliderLabel: "Day of your {trialDays}-day trial",
todayName: "Today",
dayName: "Day {day}",
startEnd: "Today \u00b7 {trialPrice}",
endEnd: "Day {trialDays} \u00b7 {chargeAmount}",
todaySay: "Charged when you start. Every download unlocks right away.",
midSay: "Nothing is charged. You\u2019ve paid {trialPrice} so far, and nothing more comes out until day {trialDays}.",
chargeSay: "Charged once, only if you keep the kit. Cancel before day {trialDays} and you pay nothing more.",
afterLine: "After day {trialDays}, nothing more to pay. One payment, yours to keep.",
}
const DEFAULT_LETTER = [
"You don\u2019t need another course sitting in a folder. You need a plan you can follow tonight.",
"So start for {trialPrice} and put the guide, the workbook and the checklist to work for {trialDays} days. Keep the kit only if it earns its place.",
]
const at = (index: number) => ({ "--t2-i": index }) as React.CSSProperties
function clamp(value: number, low: number, high: number) {
return Math.min(high, Math.max(low, Number.isFinite(value) ? value : high))
}
function splitPrice(value: string): PriceParts {
const match = /^([^\d\s]*)\s*(\d.*)$/.exec(value.trim())
return match && match[1] ? { cur: match[1], num: match[2] } : { cur: "", num: value }
}
function PriceFigure({ parts }: { parts: PriceParts }) {
return (
<>
{parts.cur ? <sup className="t2-cur">{parts.cur}</sup> : null}
<span>{parts.num}</span>
</>
)
}
const CSS = `
.cf-trial-offer-2{--t2-shadow:var(--shadow, oklch(0.22 0.03 260));--t2-marker:color-mix(in oklch, var(--marker, #fae37c) 72%, var(--surface, #ffffff));--signature-ink:var(--ink);--signature-font:var(--signature-face, var(--font-display));position:relative;isolation:isolate;overflow:hidden;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-trial-offer-2 *,.cf-trial-offer-2 *::before,.cf-trial-offer-2 *::after{box-sizing:border-box}
.cf-trial-offer-2 :where(h2,h3,p,figure){margin:0}
.cf-trial-offer-2 .t2-stack{position:relative;z-index:1;max-width:1120px;margin-inline:auto;display:flex;flex-direction:column;align-items:center;text-align:center}
.cf-trial-offer-2 .t2-head{width:100%;max-width:62rem}
.cf-trial-offer-2 .t2-title{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2.5rem,5.4vw,4.875rem);line-height:1.04;color:var(--ink);text-wrap:balance}
.cf-trial-offer-2 .t2-mark{background-image:linear-gradient(176deg,transparent 54%,var(--t2-marker) 55%,var(--t2-marker) 93%,transparent 94%);padding:0 .1em;margin:0 -.04em;border-radius:.18em .4em .3em .5em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-trial-offer-2 .t2-lead{margin:16px auto 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-trial-offer-2 .t2-shot{margin-top:32px;width:min(100%,24rem)}
.cf-trial-offer-2 .t2-shot img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:0;filter:drop-shadow(0 2px 3px oklch(from var(--t2-shadow) l c h / .28)) drop-shadow(0 14px 18px oklch(from var(--t2-shadow) l c h / .2))}
.cf-trial-offer-2 .t2-prices{position:relative;margin-top:32px;width:min(100%,42rem)}
.cf-trial-offer-2 .t2-shot + .t2-prices{margin-top:16px}
.cf-trial-offer-2 .t2-pair{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);grid-template-areas:"a t b" "ua . ub";column-gap:clamp(12px,3vw,32px);row-gap:12px;align-items:end}
.cf-trial-offer-2 .t2-fig{display:inline-flex;align-items:flex-start;justify-content:center;justify-self:center;font-family:var(--font-display);font-weight:800;line-height:.9;letter-spacing:-.04em;font-variant-numeric:tabular-nums;color:var(--ink)}
.cf-trial-offer-2 .t2-fig--today{grid-area:a;font-size:clamp(4.5rem,10vw,8rem)}
.cf-trial-offer-2 .t2-fig--later{grid-area:b;font-size:clamp(2.5rem,4.2vw,3.75rem)}
.cf-trial-offer-2 .t2-cur{position:static;vertical-align:baseline;font-size:.42em;line-height:1;margin:.12em .04em 0 0;letter-spacing:0}
.cf-trial-offer-2 .t2-then{grid-area:t;padding-bottom:.6em;font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.cf-trial-offer-2 .t2-under{align-self:start;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--ink);text-wrap:pretty}
.cf-trial-offer-2 .t2-under--today{grid-area:ua}
.cf-trial-offer-2 .t2-under--later{grid-area:ub}
.cf-trial-offer-2 .t2-meter{margin-top:40px;width:100%;max-width:56rem;padding:clamp(20px,3vw,32px);border-radius:var(--card-radius,var(--radius,14px));background:var(--band);color:var(--band-ink);box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--t2-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--t2-shadow) l c h / .2))}
.cf-trial-offer-2 .t2-meter-title{font-family:var(--font-display);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:var(--band-ink);text-wrap:balance}
.cf-trial-offer-2 .t2-scale{--t2-th:30px;position:relative;height:44px;margin-top:24px}
.cf-trial-offer-2 .t2-rail{position:absolute;left:calc(var(--t2-th) / 2);right:calc(var(--t2-th) / 2);top:50%;height:6px;margin-top:-3px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .22)}
.cf-trial-offer-2 .t2-fill{position:absolute;left:0;top:0;bottom:0;width:calc(var(--t2-p,0) * 100%);border-radius:inherit;background:var(--accent-fill,var(--accent));transition:width .16s ease}
.cf-trial-offer-2 .t2-tick{position:absolute;top:50%;left:calc(var(--t2-x,0) * 100%);width:8px;height:8px;border-radius:50%;transform:translate(-50%,-50%);background:oklch(from var(--band-ink) l c h / .45);transition:background .16s ease}
.cf-trial-offer-2 .t2-tick.is-on{background:var(--accent-fill,var(--accent))}
.cf-trial-offer-2 .t2-tick.is-key{width:18px;height:18px;border:4px solid var(--band)}
.cf-trial-offer-2 .t2-range{position:absolute;inset:0;width:100%;height:44px;margin:0;padding:0;background:transparent;-webkit-appearance:none;appearance:none;cursor:pointer;touch-action:pan-y}
.cf-trial-offer-2 .t2-range:focus{outline:none}
.cf-trial-offer-2 .t2-range::-webkit-slider-runnable-track{height:44px;background:transparent;border:0}
.cf-trial-offer-2 .t2-range::-moz-range-track{height:44px;background:transparent;border:0}
.cf-trial-offer-2 .t2-range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:30px;height:30px;margin-top:7px;border-radius:50%;background:var(--field,var(--card));border:5px solid var(--accent-fill,var(--accent));box-shadow:0 1px 2px oklch(from var(--t2-shadow) l c h / .45),0 4px 8px -2px oklch(from var(--t2-shadow) l c h / .5);transition:transform .16s ease}
.cf-trial-offer-2 .t2-range::-moz-range-thumb{box-sizing:border-box;width:30px;height:30px;border-radius:50%;background:var(--field,var(--card));border:5px solid var(--accent-fill,var(--accent));box-shadow:0 1px 2px oklch(from var(--t2-shadow) l c h / .45),0 4px 8px -2px oklch(from var(--t2-shadow) l c h / .5);transition:transform .16s ease}
.cf-trial-offer-2 .t2-range:hover::-webkit-slider-thumb{transform:scale(1.08)}
.cf-trial-offer-2 .t2-range:hover::-moz-range-thumb{transform:scale(1.08)}
.cf-trial-offer-2 .t2-range:active::-webkit-slider-thumb{transform:scale(.94)}
.cf-trial-offer-2 .t2-range:active::-moz-range-thumb{transform:scale(.94)}
.cf-trial-offer-2 .t2-range:focus-visible::-webkit-slider-thumb{box-shadow:0 0 0 3px var(--band),0 0 0 6px var(--band-ink)}
.cf-trial-offer-2 .t2-range:focus-visible::-moz-range-thumb{box-shadow:0 0 0 3px var(--band),0 0 0 6px var(--band-ink)}
.cf-trial-offer-2 .t2-ends{display:flex;justify-content:space-between;gap:12px;margin-top:4px;font-size:.875rem;line-height:1.2;font-weight:800;color:var(--band-ink);font-variant-numeric:tabular-nums}
.cf-trial-offer-2 .t2-readout{margin-top:20px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px 24px;padding:16px 20px;border-radius:10px;background:oklch(from var(--band-ink) l c h / .09);text-align:left}
.cf-trial-offer-2 .t2-charged{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.cf-trial-offer-2 .t2-when{font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--band-ink)}
.cf-trial-offer-2 .t2-amount{min-width:var(--t2-w,3ch);font-family:var(--font-display);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(--band-ink)}
.cf-trial-offer-2 .t2-say{min-height:3em;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:500;color:var(--band-ink);text-wrap:pretty}
.cf-trial-offer-2 .t2-after{margin-top:16px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--band-ink);text-wrap:pretty}
.cf-trial-offer-2 .t2-letter{margin-top:48px;width:100%;max-width:40rem}
.cf-trial-offer-2 .t2-salute{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;color:var(--ink)}
.cf-trial-offer-2 .t2-para{margin-top:12px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.55;color:var(--ink);text-wrap:pretty}
.cf-trial-offer-2 .t2-sign{margin-top:24px}
.cf-trial-offer-2 .t2-signoff{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink)}
.cf-trial-offer-2 .t2-signature{margin-top:12px;font-family:var(--signature-font);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:var(--signature-ink,var(--ink));text-wrap:balance}
.cf-trial-offer-2 .t2-role{margin-top:8px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-trial-offer-2 .t2-action{margin-top:32px;width:100%;display:flex;flex-direction:column;align-items:center}
.cf-trial-offer-2 .t2-btn{--t2-bg:var(--button-bg,var(--cta));--t2-bg2:var(--button-bg-2,var(--cta-2,var(--cta)));appearance:none;border:0;margin:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:10px;width:min(100%,30rem);min-height:72px;padding:12px 28px;border-radius:var(--button-radius,var(--radius,12px));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;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--t2-bg) calc(l + .04) c h),oklch(from var(--t2-bg2) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--t2-bg) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--t2-bg) calc(l - .16) c h),0 1px 2px oklch(from var(--t2-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--t2-shadow) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-trial-offer-2 .t2-btn > span{text-wrap:balance}
.cf-trial-offer-2 .t2-btn:not(:disabled):hover,.cf-trial-offer-2 .t2-btn.is-hover{background:linear-gradient(oklch(from var(--t2-bg) calc(l - .01) c h),oklch(from var(--t2-bg2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--t2-bg) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--t2-bg) calc(l - .16) c h),0 1px 2px oklch(from var(--t2-shadow) l c h / .34),0 10px 18px -6px oklch(from var(--t2-shadow) l c h / .55));transform:translateY(-1px)}
.cf-trial-offer-2 .t2-btn:not(:disabled):active,.cf-trial-offer-2 .t2-btn.is-active{transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--t2-bg) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--t2-bg) calc(l - .16) c h),0 1px 2px oklch(from var(--t2-shadow) l c h / .3)}
.cf-trial-offer-2 .t2-btn:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.cf-trial-offer-2 .t2-btn.is-busy{cursor:progress}
.cf-trial-offer-2 .t2-btn:disabled{cursor:not-allowed;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));text-shadow:none;transform:none}
.cf-trial-offer-2 .t2-assure{margin-top:16px;max-width:40rem;display:flex;flex-wrap:wrap;justify-content:center;gap:6px 20px;font-size:.9375rem;line-height:1.5;font-weight:600;color:var(--muted)}
.cf-trial-offer-2 .t2-assure > span{display:block;min-width:0;text-align:center;text-wrap:pretty}
.cf-trial-offer-2 .t2-ico{display:inline-block;width:16px;height:16px;vertical-align:-.15em;margin-inline-end:.4em;color:var(--accent)}
.cf-trial-offer-2 .t2-status{margin-top:12px;max-width:40rem;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-trial-offer-2 .t2-status.is-error,.cf-trial-offer-2 .t2-status.is-error .t2-ico{color:var(--danger)}
.cf-trial-offer-2 .t2-quiet{margin-top:8px;font-size:.9375rem;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-trial-offer-2 a.t2-quiet{text-decoration:underline;text-decoration-color:oklch(from var(--muted) l c h / .5);text-underline-offset:.18em}
.cf-trial-offer-2 a.t2-quiet:hover{color:var(--ink);text-decoration-color:currentColor}
.cf-trial-offer-2 a.t2-quiet:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:4px}
.cf-trial-offer-2 .t2-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.cf-trial-offer-2 .t2-rise{animation:t2-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--t2-i,0) * .07s),.28s)}
.cf-trial-offer-2 .t2-spin{animation:t2-spin .8s linear infinite}
@keyframes t2-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes t2-spin{to{transform:rotate(360deg)}}
@media (max-width:560px){
.cf-trial-offer-2 .t2-readout{grid-template-columns:1fr;justify-items:center;text-align:center}
.cf-trial-offer-2 .t2-charged{align-items:center}
.cf-trial-offer-2 .t2-say{min-height:4.5em}
.cf-trial-offer-2 .t2-btn{width:100%}
}
@media (prefers-reduced-motion:reduce){
.cf-trial-offer-2 .t2-rise,.cf-trial-offer-2 .t2-spin{animation:none}
.cf-trial-offer-2 .t2-fill,.cf-trial-offer-2 .t2-tick,.cf-trial-offer-2 .t2-btn{transition:none}
.cf-trial-offer-2 .t2-range::-webkit-slider-thumb{transition:none}
.cf-trial-offer-2 .t2-range::-moz-range-thumb{transition:none}
}
`
pieces/offer/trial-offer-2/specimen.tsx 31 lines
import __studioImage9d1ced02 from "../assets/65238e5a47c3beb5.webp";
import * as React from "react"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { TrialOffer2, type TrialOffer2State } from "../trial-offer-2"
export const states = ["default", "hover", "active", "disabled", "error"]
const sample = defaults.sample
export default function TrialOffer2Specimen({ state = "default" }: { state?: TrialOffer2State }) {
return (
<TrialOffer2
state={state}
headline={"Try " + sample.name}
lead={sample.lead}
productImage={slot("product", __studioImage9d1ced02)}
productImageAlt={sample.name + ": the planning guide, page copy workbook and launch checklist"}
chargeAmount={sample.price}
guarantee={sample.guarantee}
signName="Alex Morgan"
signRole={"Creator of " + sample.name}
onAction={() =>
new Promise<void>((resolve) => {
window.setTimeout(resolve, 1200)
})
}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalTrialOffer2 |
React.ReactNode |
Default "Try the whole kit"
|
accent OptionalTrialOffer2 |
string |
Default "for {trialDays} days for {trialPrice}"
|
lead OptionalTrialOffer2 |
string |
Default "Plan your funnel, write your page copy, and check every step before you launch."
|
productImage OptionalTrialOffer2 |
string |
|
productImageAlt OptionalTrialOffer2 |
string |
Default ""
|
trialPrice OptionalTrialOffer2 |
string |
Default "$1"
|
trialDays OptionalTrialOffer2 |
number |
Default 14
|
chargeAmount OptionalTrialOffer2 |
string |
Default "$47"
|
zeroAmount OptionalTrialOffer2 |
string |
Default "$0"
|
initialDay OptionalTrialOffer2 |
number |
|
salutation OptionalTrialOffer2 |
string |
Default "Dear friend,"
|
letter OptionalTrialOffer2 |
string[] |
Default DEFAULT_LETTER
|
signOff OptionalTrialOffer2 |
string |
Default "To your first launch,"
|
signName OptionalTrialOffer2 |
string |
|
signRole OptionalTrialOffer2 |
string |
|
ctaLabel OptionalTrialOffer2 |
string |
Default "Start My {trialPrice} Trial"
|
loadingLabel OptionalTrialOffer2 |
string |
Default "Starting your trial\u2026"
|
cancelLine OptionalTrialOffer2 |
string |
Default "Cancel before day {trialDays} and you pay nothing more."
|
guarantee OptionalTrialOffer2 |
string |
|
secondaryLine OptionalTrialOffer2 |
string |
Default "or keep reading to see what\u2019s inside"
|
secondaryHref OptionalTrialOffer2 |
string |
|
errorMessage OptionalTrialOffer2 |
string |
Default "We couldn\u2019t start your trial and nothing was charged. Please try again."
|
disabledNote OptionalTrialOffer2 |
string |
Default "This trial isn\u2019t open right now."
|
copy OptionalTrialOffer2 |
Partial<TrialOffer2Copy> |
|
state OptionalTrialOffer2 |
TrialOffer2State |
Default "default"
|
disabled OptionalTrialOffer2 |
boolean |
Default false
|
onAction OptionalTrialOffer2 |
() => void | Promise<void> |
|
className OptionalTrialOffer2 |
string |
|
style OptionalTrialOffer2 |
React.CSSProperties |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-radius- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field- 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).
-
65238e5a47c3beb5.webp
image/webp · 186 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB