Trial Offer 4
Team trial close: the light half makes the trial promise and asks how many people will use it; the dark half shows the buyer's own bill (nothing today, the date the trial ends, their monthly total after it) beside the start-trial button, so honest future pricing does the selling.
Use it in a prompt
Use offer/trial-offer-4 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-4.tsx. - Import it and pass your copy and images (Props tab):
import { TrialOffer4 } from "@/components/funneldna/offer/trial-offer-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/trial-offer-4/component.tsx 596 lines
// layout: split-contrast
// Team trial close: the light half makes the trial promise and asks how many people will use it; the dark half shows the buyer's own bill (nothing today, the date the trial ends, their monthly total after it) beside the start-trial button, so honest future pricing does the selling.
import * as React from "react"
import { CalendarX2 as CalendarXIcon, CircleAlert as AlertIcon, LoaderCircle as SpinnerIcon, Minus as MinusIcon, Plus as PlusIcon, UserRound as PersonIcon } from "lucide-react"
import { FX_HOST, Pattern } from "../fx/fx"
export type TrialOffer4State = "default" | "hover" | "active" | "disabled" | "error"
export type TrialOffer4Pricing = "per-seat" | "flat"
/** Every other visible word. Templates: {trialDays}, {seats}, {seatsText}, {seatPrice}, {total}, {endDate}, {minSeats}, {maxSeats}, {count}. */
export type TrialOffer4Copy = Record<keyof typeof DEFAULT_COPY, string>
/** What the buyer chose, passed to onAction. */
export type TrialOffer4Selection = {
seats: number
monthlyTotal: number
trialEnds: Date
pricing: TrialOffer4Pricing
}
export type TrialOffer4Props = {
/** Headline before the marker phrase; strings support the templates. */
headline?: React.ReactNode
/** Phrase swiped with the marker; supports the templates. */
accent?: string
lead?: string
/** Photo of the team the product serves (slot "scene"); omitted when empty. */
sceneImage?: string
sceneImageAlt?: string
/** Plain caption under the photo; omitted when empty. */
sceneCaption?: string
/** Trial length in days; the end date is computed from it. */
trialDays?: number
/** "per-seat" shows the stepper; "flat" hides it and bills flatPrice. */
pricing?: TrialOffer4Pricing
/** Monthly price per person after the trial. */
seatPrice?: number
/** Monthly price for the whole team in the flat variant. */
flatPrice?: number
/** ISO 4217 currency code used to format prices. */
currency?: string
locale?: string
/** Seat count the stepper starts on. */
initialSeats?: number
minSeats?: number
maxSeats?: number
/** Day the trial starts (YYYY-MM-DD); defaults to today. */
startDate?: string
copy?: Partial<TrialOffer4Copy>
state?: TrialOffer4State
disabled?: boolean
/** Called with each valid seat change. */
onSeatsChange?: (seats: number) => void
/** Start-trial click with the buyer's choice. The builder wires what happens next; a rejected promise shows the error line. */
onAction?: (selection: TrialOffer4Selection) => void | Promise<void>
className?: string
style?: React.CSSProperties
}
type Phase = "idle" | "loading" | "error"
const PIPS = 10
export function TrialOffer4({
headline = "Try it with your whole team,",
accent = "free for {trialDays} days",
lead = "Choose your team size and see exactly what you'll pay after the trial, before you start.",
sceneImage,
sceneImageAlt = "",
sceneCaption,
trialDays = 14,
pricing = "per-seat",
seatPrice = 12,
flatPrice = 49,
currency = "USD",
locale = "en-US",
initialSeats = 5,
minSeats = 1,
maxSeats = 50,
startDate,
copy,
state = "default",
disabled = false,
onSeatsChange,
onAction,
className,
style,
}: TrialOffer4Props) {
const t: TrialOffer4Copy = { ...DEFAULT_COPY, ...copy }
const flat = pricing === "flat"
const lo = Math.max(1, Math.floor(minSeats) || 1)
const hi = Math.max(lo, Math.floor(maxSeats) || lo)
const days = Math.max(1, Math.round(trialDays) || 14)
const start0 = clamp(Math.round(initialSeats) || lo, lo, hi)
const [seats, setSeats] = React.useState(start0)
const [raw, setRaw] = React.useState(String(start0))
const [fieldError, setFieldError] = React.useState(false)
const [phase, setPhase] = React.useState<Phase>("idle")
const [today] = React.useState(() => new Date())
const seatsRef = React.useRef(start0)
seatsRef.current = seats
const alive = React.useRef(true)
const pending = React.useRef(false)
const inputRef = React.useRef<HTMLInputElement>(null)
const uid = React.useId()
const ids = { title: uid + "t", input: uid + "i", hint: uid + "h", note: uid + "n", err: uid + "e", cancel: uid + "c", status: uid + "s" }
React.useEffect(() => {
setSeats(start0)
setRaw(String(start0))
setFieldError(false)
}, [start0])
React.useEffect(() => {
if (state === "error" && !flat) {
setRaw(String(hi + 1))
setFieldError(true)
setPhase("idle")
} else {
setRaw(String(seatsRef.current))
setFieldError(false)
setPhase(state === "error" ? "error" : "idle")
}
}, [state, flat, hi])
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
const isValid = (value: string) => {
const text = value.trim()
if (!text) return false
const n = Number(text)
return Number.isInteger(n) && n >= lo && n <= hi
}
const commit = (n: number) => {
setSeats(n)
setRaw(String(n))
setFieldError(false)
onSeatsChange?.(n)
}
const nudge = (delta: number) => commit(clamp(seats + delta, lo, hi))
const onType = (event: React.ChangeEvent<HTMLInputElement>) => {
const value = event.target.value
setRaw(value)
if (!value.trim()) {
setFieldError(false)
return
}
if (isValid(value)) {
const n = Number(value)
setSeats(n)
setFieldError(false)
onSeatsChange?.(n)
} else {
setFieldError(true)
}
}
const onBlur = () => {
if (!isValid(raw)) setFieldError(true)
}
const perSeat = Math.max(0, Number(seatPrice) || 0)
const monthly = round2(flat ? Math.max(0, Number(flatPrice) || 0) : perSeat * seats)
const money = (n: number) => formatMoney(n, currency, locale)
const ends = addDays(parseStart(startDate) ?? today, days)
const endDate = formatDate(ends, locale)
const seatsText = (seats === 1 ? t.seatOne : t.seatMany).split("{seats}").join(String(seats))
const vals: Record<string, string> = {
trialDays: String(days),
seats: String(seats),
seatsText,
seatPrice: money(perSeat),
total: money(monthly),
endDate,
minSeats: String(lo),
maxSeats: String(hi),
}
const fill = (text: string) => text.replace(/\{(\w+)\}/g, (match: string, key: string) => (key in vals ? vals[key] : match))
const node = (value: React.ReactNode) => (typeof value === "string" ? fill(value) : value)
const isDisabled = disabled || state === "disabled"
const busy = phase === "loading"
const force = !isDisabled && phase === "idle" && (state === "hover" || state === "active") ? state : undefined
const slots = Math.min(hi, PIPS)
const filled = Math.min(seats, slots)
const extra = Math.max(0, seats - slots)
const described = [t.seatsHint ? ids.hint : "", t.seatsNote ? ids.note : "", fieldError ? ids.err : ""].filter(Boolean).join(" ")
const showStatus = phase === "error" || isDisabled
const handleStart = async () => {
if (isDisabled || busy || pending.current) return
if (!flat && (fieldError || !isValid(raw))) {
setFieldError(true)
inputRef.current?.focus()
return
}
if (!onAction) return
pending.current = true
setPhase("loading")
try {
await onAction({ seats, monthlyTotal: monthly, trialEnds: ends, pricing })
if (alive.current) setPhase("idle")
} catch {
if (alive.current) setPhase("error")
} finally {
pending.current = false
}
}
return (
<section className={["cf-trial-offer-4", className].filter(Boolean).join(" ")} style={{ ...FX_HOST, ...style }} aria-labelledby={ids.title}>
<style>{CSS}</style>
<Pattern name="grid" fade="corner" />
<div className="t4-wrap">
<div className="t4-slab">
<div className="t4-light">
<h2 id={ids.title} className="t4-title">
{node(headline)}
{accent ? (
<>
{" "}
<span className="t4-mark">{fill(accent)}</span>
</>
) : null}
</h2>
{lead ? <p className="t4-lead">{fill(lead)}</p> : null}
{!flat ? (
<div className="t4-seats">
<label htmlFor={ids.input} className="t4-label">
{fill(t.seatsLabel)}
</label>
{t.seatsHint ? (
<p id={ids.hint} className="t4-hint">
{fill(t.seatsHint)}
</p>
) : null}
<div className="t4-ctrl">
<div className="t4-stepper">
<button type="button" className="t4-step" onClick={() => nudge(-1)} disabled={seats <= lo} aria-label={t.decrease} aria-controls={ids.input}>
<MinusIcon size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
<input
ref={inputRef}
id={ids.input}
name="seats"
className="t4-num"
type="number"
inputMode="numeric"
min={lo}
max={hi}
step={1}
value={raw}
placeholder={String(start0)}
onChange={onType}
onBlur={onBlur}
aria-invalid={fieldError || undefined}
aria-describedby={described || undefined}
/>
<button
type="button"
className="t4-step"
onClick={() => nudge(1)}
disabled={seats >= hi}
data-force={seats < hi ? force : undefined}
aria-label={t.increase}
aria-controls={ids.input}
>
<PlusIcon size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
</div>
<span className="t4-unit" aria-hidden="true">
{seats === 1 ? t.unitOne : t.unitMany}
</span>
</div>
<div className="t4-pips" aria-hidden="true">
{Array.from({ length: slots }, (_, index) => (
<span key={index} className={index < filled ? "t4-pip is-on" : "t4-pip"}>
<PersonIcon size={20} strokeWidth={2.5} />
</span>
))}
{extra ? <span className="t4-more">{t.more.split("{count}").join(String(extra))}</span> : null}
</div>
{t.seatsNote ? (
<p id={ids.note} className="t4-note">
{fill(t.seatsNote)}
</p>
) : null}
{fieldError ? (
<p id={ids.err} className="t4-err" role="alert">
<AlertIcon className="t4-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{fill(t.seatError)}
</p>
) : null}
</div>
) : null}
{sceneImage ? (
<figure className="t4-scene">
<img src={sceneImage} alt={sceneImageAlt} width={1200} height={675} loading="lazy" decoding="async" />
{sceneCaption ? <figcaption>{sceneCaption}</figcaption> : null}
</figure>
) : null}
</div>
<div className="t4-dark">
<h3 className="t4-sum-title">{fill(flat ? t.summaryTitleFlat : t.summaryTitle)}</h3>
<dl className="t4-rows">
<div className="t4-row">
<dt>{fill(t.todayLabel)}</dt>
<dd className="t4-val">{money(0)}</dd>
<dd className="t4-sub">{fill(t.todayNote)}</dd>
</div>
<div className="t4-row">
<dt>{fill(t.endLabel)}</dt>
<dd className="t4-val">
<time dateTime={isoDate(ends)}>{endDate}</time>
</dd>
<dd className="t4-sub">{fill(t.endNote)}</dd>
</div>
</dl>
<div className="t4-total" aria-live="polite" aria-atomic="true">
<p className="t4-total-label">{fill(t.afterLabel)}</p>
<p className="t4-big">
<span key={monthly} className="t4-figure">
{money(monthly)}
</span>
<span className="t4-per">
<span aria-hidden="true">{t.perMonth}</span>
<span className="t4-sr">{t.perMonthSr}</span>
</span>
</p>
<p className="t4-breakdown">{fill(flat ? t.breakdownFlat : t.breakdown)}</p>
</div>
{t.cancelLine ? (
<p id={ids.cancel} className="t4-cancel">
<CalendarXIcon className="t4-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{fill(t.cancelLine)}
</p>
) : null}
</div>
<div className="t4-ask">{t.question ? <p className="t4-q">{fill(t.question)}</p> : null}</div>
<div className="t4-close">
<button
type="button"
className="t4-go"
onClick={handleStart}
disabled={isDisabled}
aria-busy={busy || undefined}
data-force={force}
aria-describedby={[t.cancelLine ? ids.cancel : "", showStatus ? ids.status : ""].filter(Boolean).join(" ") || undefined}
>
{busy ? (
<>
<SpinnerIcon className="t4-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{fill(t.loading)}</span>
</>
) : (
<span>{fill(t.action)}</span>
)}
</button>
{phase === "error" ? (
<p id={ids.status} className="t4-alert" role="alert">
<AlertIcon className="t4-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{fill(t.actionError)}
</p>
) : isDisabled ? (
<p id={ids.status} className="t4-off">
{fill(t.disabledNote)}
</p>
) : null}
</div>
<div className="t4-ps">
{t.ps ? (
<p>
<strong>{t.psLabel}</strong> {fill(t.ps)}
</p>
) : null}
</div>
</div>
</div>
</section>
)
}
export default TrialOffer4
const DEFAULT_COPY = {
seatsLabel: "How many people will use it?",
seatsHint: "Count everyone who will sign in.",
seatsNote: "{seatPrice} per person, per month after the trial. Choose {minSeats} to {maxSeats}.",
seatError: "Enter a whole number from {minSeats} to {maxSeats}.",
decrease: "Remove a person",
increase: "Add a person",
unitOne: "person",
unitMany: "people",
seatOne: "{seats} person",
seatMany: "{seats} people",
more: "+{count}",
summaryTitle: "Your exact bill for {seatsText}",
summaryTitleFlat: "Your exact bill, before you start",
todayLabel: "Charged today",
todayNote: "{trialDays}-day free trial",
endLabel: "Trial ends",
endNote: "{trialDays} days from today",
afterLabel: "Then, every month",
perMonth: "/month",
perMonthSr: "per month",
breakdown: "{seatsText} × {seatPrice} each",
breakdownFlat: "One price for your whole team",
cancelLine: "Cancel before {endDate} and you pay nothing.",
question: "Ready to try it with your team?",
action: "Yes, start my free trial",
loading: "Starting your trial…",
actionError: "We couldn't start your trial and nothing was charged. Please try again.",
disabledNote: "This trial isn't open right now.",
psLabel: "P.S.",
ps: "You pay nothing today. Cancel before {endDate} and you won't be charged at all.",
}
function clamp(n: number, min: number, max: number) {
return Math.min(max, Math.max(min, n))
}
function round2(n: number) {
return Math.round(n * 100) / 100
}
function formatMoney(n: number, currency: string, locale: string) {
const whole = Math.round(n * 100) % 100 === 0
try {
return new Intl.NumberFormat(locale, { style: "currency", currency, minimumFractionDigits: whole ? 0 : 2, maximumFractionDigits: whole ? 0 : 2 }).format(n)
} catch {
return "$" + (whole ? String(Math.round(n)) : n.toFixed(2))
}
}
function parseStart(value?: string) {
if (!value) return undefined
const parts = value.split("-").map(Number)
if (parts.length === 3 && parts.every((part) => Number.isInteger(part))) return new Date(parts[0], parts[1] - 1, parts[2])
const date = new Date(value)
return Number.isNaN(date.getTime()) ? undefined : date
}
function addDays(date: Date, n: number) {
return new Date(date.getFullYear(), date.getMonth(), date.getDate() + n)
}
function formatDate(date: Date, locale: string) {
try {
return new Intl.DateTimeFormat(locale, { weekday: "short", month: "short", day: "numeric" }).format(date)
} catch {
return date.toDateString()
}
}
function isoDate(date: Date) {
const pad = (n: number) => String(n).padStart(2, "0")
return date.getFullYear() + "-" + pad(date.getMonth() + 1) + "-" + pad(date.getDate())
}
const CSS = `
.cf-trial-offer-4{
--t4-r:var(--card-radius,var(--radius,14px));
--t4-br:var(--button-radius,var(--radius,12px));
--t4-fr:var(--field-radius,var(--radius,12px));
--t4-sh:var(--shadow,oklch(0.22 0.03 260));
--t4-band-soft:color-mix(in oklch,var(--band-ink) 82%,var(--band));
--t4-band-rule:oklch(from var(--band-ink) l c h / .16);
--t4-well:color-mix(in oklch,var(--ink) 4%,var(--card));
--t4-border:var(--card-border,oklch(from var(--ink) l c h / .12));
--t4-mark:var(--marker,#fae37c);
position:relative;
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-4 *,.cf-trial-offer-4 *::before,.cf-trial-offer-4 *::after{box-sizing:border-box}
.cf-trial-offer-4 .t4-wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto}
.cf-trial-offer-4 .t4-slab{display:flex;flex-direction:column}
.cf-trial-offer-4 .t4-slab>*{animation:t4-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-trial-offer-4 .t4-slab>:nth-child(2){animation-delay:.07s}
.cf-trial-offer-4 .t4-slab>:nth-child(3){animation-delay:.14s}
.cf-trial-offer-4 .t4-slab>:nth-child(4){animation-delay:.21s}
.cf-trial-offer-4 .t4-slab>:nth-child(5){animation-delay:.28s}
.cf-trial-offer-4 .t4-light{background:var(--card);color:var(--ink);border:1px solid var(--t4-border);border-radius:var(--t4-r);box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--t4-sh) l c h / .22),0 4px 10px -2px oklch(from var(--t4-sh) l c h / .2)));padding:28px 20px;margin-bottom:12px}
.cf-trial-offer-4 .t4-title{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--ink);text-wrap:balance}
.cf-trial-offer-4 .t4-mark{background-image:linear-gradient(color-mix(in oklch,var(--t4-mark) 85%,transparent),color-mix(in oklch,var(--t4-mark) 85%,transparent));background-repeat:no-repeat;background-size:100% .46em;background-position:0 88%;padding-inline:.08em;margin-inline:-.04em;border-radius:.1em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-trial-offer-4 .t4-lead{margin:0;max-width:60ch;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-4 .t4-seats{margin-top:28px;padding:20px 14px;border-radius:10px;background:var(--t4-well)}
.cf-trial-offer-4 .t4-label{display:block;font-size:17px;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
.cf-trial-offer-4 .t4-hint{margin:4px 0 0;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-trial-offer-4 .t4-ctrl{display:flex;align-items:center;gap:12px;margin-top:16px}
.cf-trial-offer-4 .t4-stepper{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;max-width:232px}
.cf-trial-offer-4 .t4-step{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;margin:0;padding:0;border:1px solid var(--button-2-border,transparent);border-radius:var(--t4-br);background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-trial-offer-4 .t4-step{flex:none}
.cf-trial-offer-4 .t4-step:not(:disabled):hover,.cf-trial-offer-4 .t4-step[data-force=hover]{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .05) c h);transform:translateY(-1px)}
.cf-trial-offer-4 .t4-step:not(:disabled):active,.cf-trial-offer-4 .t4-step[data-force=active]{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .09) c h);transform:translateY(1px);box-shadow:none}
.cf-trial-offer-4 .t4-step:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-trial-offer-4 .t4-step:disabled{background:color-mix(in oklch,var(--ink) 6%,var(--card));color:color-mix(in oklch,var(--ink) 38%,var(--card));box-shadow:none;cursor:not-allowed}
.cf-trial-offer-4 .t4-num{flex:1 1 0;width:auto;min-width:56px;height:52px;margin:0;padding:0 8px;border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--t4-fr);background:var(--field);color:var(--field-ink);font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:2rem;line-height:1;letter-spacing:-.02em;text-align:center;font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield;transition:border-color .16s ease,box-shadow .16s ease}
.cf-trial-offer-4 .t4-num::-webkit-outer-spin-button,.cf-trial-offer-4 .t4-num::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.cf-trial-offer-4 .t4-num::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-trial-offer-4 .t4-num:hover{border-color:color-mix(in oklch,var(--ink) 40%,transparent)}
.cf-trial-offer-4 .t4-num:focus{outline:none;border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
.cf-trial-offer-4 .t4-num[aria-invalid=true]{border-color:var(--danger)}
.cf-trial-offer-4 .t4-num[aria-invalid=true]:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-trial-offer-4 .t4-unit{flex:none;font-size:18px;font-weight:700;line-height:1.2;color:var(--ink)}
.cf-trial-offer-4 .t4-pips{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin-top:16px}
.cf-trial-offer-4 .t4-pip{display:inline-flex;color:oklch(from var(--ink) l c h / .2);transition:color .16s ease}
.cf-trial-offer-4 .t4-pip.is-on{color:var(--accent);animation:t4-pop .3s ease both}
.cf-trial-offer-4 .t4-more{display:inline-flex;align-items:center;min-height:28px;margin-left:4px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink) 10%,var(--card));color:var(--ink);font-size:14px;font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums}
.cf-trial-offer-4 .t4-note{margin:12px 0 0;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-trial-offer-4 .t4-err{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:15px;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-trial-offer-4 .t4-icon{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-trial-offer-4 .t4-scene{margin:28px 0 0}
.cf-trial-offer-4 .t4-scene img{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;object-position:center 40%;border-radius:12px}
.cf-trial-offer-4 .t4-scene figcaption{margin-top:12px;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-trial-offer-4 .t4-dark,.cf-trial-offer-4 .t4-ask,.cf-trial-offer-4 .t4-close,.cf-trial-offer-4 .t4-ps{background:var(--band);color:var(--band-ink);padding-inline:20px}
.cf-trial-offer-4 .t4-dark{border-radius:var(--t4-r) var(--t4-r) 0 0;padding-top:28px;padding-bottom:4px}
.cf-trial-offer-4 .t4-ask{padding-top:32px}
.cf-trial-offer-4 .t4-close{padding-top:16px}
.cf-trial-offer-4 .t4-ps{border-radius:0 0 var(--t4-r) var(--t4-r);padding-top:16px;padding-bottom:28px;color:var(--t4-band-soft)}
.cf-trial-offer-4 .t4-ps strong{color:var(--band-ink);font-weight:800}
.cf-trial-offer-4 .t4-ps p{margin:0;font-size:17px;line-height:1.5;text-wrap:pretty}
.cf-trial-offer-4 .t4-sum-title{margin:0 0 8px;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;color:var(--band-ink);text-wrap:balance}
.cf-trial-offer-4 .t4-rows{margin:0}
.cf-trial-offer-4 .t4-row{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:16px;row-gap:2px;padding:16px 0;border-bottom:1px solid var(--t4-band-rule)}
.cf-trial-offer-4 .t4-row dt{grid-column:1;font-size:17px;font-weight:700;line-height:1.3;color:var(--band-ink)}
.cf-trial-offer-4 .t4-row .t4-sub{grid-column:1;margin:0;font-size:15px;line-height:1.4;font-weight:500;color:var(--t4-band-soft)}
.cf-trial-offer-4 .t4-row .t4-val{grid-column:2;grid-row:1 / span 2;align-self:start;margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--band-ink);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
.cf-trial-offer-4 .t4-total{margin-top:24px;padding:24px 20px;border-radius:12px;background:color-mix(in oklch,var(--band-ink) 8%,var(--band))}
.cf-trial-offer-4 .t4-total-label{margin:0;font-size:17px;font-weight:700;line-height:1.3;color:var(--t4-band-soft)}
.cf-trial-offer-4 .t4-big{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;margin:12px 0 0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(3rem,5.6vw,4.5rem);line-height:1;letter-spacing:-.03em;color:var(--band-ink);font-variant-numeric:tabular-nums}
.cf-trial-offer-4 .t4-figure{display:inline-block;animation:t4-tick .3s cubic-bezier(.2,.7,.2,1) both}
.cf-trial-offer-4 .t4-per{font-family:var(--font-body);font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;letter-spacing:0;color:var(--t4-band-soft)}
.cf-trial-offer-4 .t4-breakdown{margin:12px 0 0;font-size:17px;line-height:1.4;font-weight:600;color:var(--band-ink);font-variant-numeric:tabular-nums}
.cf-trial-offer-4 .t4-cancel{margin:16px 0 0;font-size:15px;line-height:1.4;font-weight:600;color:var(--t4-band-soft);text-wrap:pretty}
.cf-trial-offer-4 .t4-q{margin:0;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;color:var(--band-ink);text-wrap:balance}
.cf-trial-offer-4 .t4-go{--t4-b:var(--button-bg,var(--cta));--t4-b2:var(--button-bg-2,var(--cta-2));display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:64px;margin:0;padding:12px 20px;border:0;border-radius:var(--t4-br);background:linear-gradient(oklch(from var(--t4-b) calc(l + .04) c h),oklch(from var(--t4-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;text-align:center;text-wrap:balance;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--t4-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--t4-b) calc(l - .16) c h),0 1px 2px oklch(from var(--t4-sh) l c h / .3),0 8px 16px -6px oklch(from var(--t4-sh) l c h / .45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-trial-offer-4 .t4-go:not(:disabled):hover,.cf-trial-offer-4 .t4-go[data-force=hover]{background:linear-gradient(oklch(from var(--t4-b) calc(l - .01) c h),oklch(from var(--t4-b2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--t4-b) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--t4-b) calc(l - .18) c h),0 1px 2px oklch(from var(--t4-sh) l c h / .34),0 10px 18px -6px oklch(from var(--t4-sh) l c h / .55))}
.cf-trial-offer-4 .t4-go:not(:disabled):active,.cf-trial-offer-4 .t4-go[data-force=active]{transform:translateY(1px);background:linear-gradient(oklch(from var(--t4-b) calc(l - .05) c h),oklch(from var(--t4-b2) calc(l - .09) c h));box-shadow:inset 0 2px 4px oklch(from var(--t4-b) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--t4-b) calc(l - .16) c h),0 1px 1px oklch(from var(--t4-sh) l c h / .3)}
.cf-trial-offer-4 .t4-go:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-trial-offer-4 .t4-go[aria-busy=true]{cursor:progress}
.cf-trial-offer-4 .t4-go:disabled{background:color-mix(in oklch,var(--band-ink) 14%,var(--band));color:color-mix(in oklch,var(--band-ink) 62%,var(--band));text-shadow:none;box-shadow:none;cursor:not-allowed}
.cf-trial-offer-4 .t4-spin{animation:t4-spin .8s linear infinite}
.cf-trial-offer-4 .t4-alert{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:15px;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-trial-offer-4 .t4-off{margin:12px 0 0;font-size:15px;line-height:1.4;font-weight:600;color:var(--t4-band-soft);text-align:center;text-wrap:pretty}
.cf-trial-offer-4 .t4-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
@keyframes t4-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes t4-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@keyframes t4-tick{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes t4-spin{to{transform:rotate(360deg)}}
@media (min-width:860px){
.cf-trial-offer-4 .t4-slab{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);grid-template-areas:"light dark" "light ask" "light close" "light ps";grid-template-rows:auto 1fr auto auto;background:var(--band);border:1px solid var(--t4-border);border-radius:var(--t4-r);overflow:clip;box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--t4-sh) l c h / .22),0 12px 24px -8px oklch(from var(--t4-sh) l c h / .32)))}
.cf-trial-offer-4 .t4-light{grid-area:light;margin:0;border:0;border-radius:0;box-shadow:none;padding:clamp(32px,4vw,56px)}
.cf-trial-offer-4 .t4-seats{padding:24px}
.cf-trial-offer-4 .t4-step{width:56px;height:56px}
.cf-trial-offer-4 .t4-num{height:56px;font-size:2.25rem}
.cf-trial-offer-4 .t4-scene img{aspect-ratio:16/9}
.cf-trial-offer-4 .t4-dark{grid-area:dark;border-radius:0;padding:clamp(32px,4vw,56px) clamp(28px,3.5vw,48px) 0}
.cf-trial-offer-4 .t4-ask{grid-area:ask;align-self:end;padding:40px clamp(28px,3.5vw,48px) 0}
.cf-trial-offer-4 .t4-close{grid-area:close;padding:16px clamp(28px,3.5vw,48px) 0}
.cf-trial-offer-4 .t4-go{min-height:72px;padding:0 28px}
.cf-trial-offer-4 .t4-ps{grid-area:ps;border-radius:0;padding:20px clamp(28px,3.5vw,48px) clamp(32px,4vw,56px)}
}
@media (prefers-reduced-motion:reduce){
.cf-trial-offer-4 .t4-slab>*,.cf-trial-offer-4 .t4-pip.is-on,.cf-trial-offer-4 .t4-figure,.cf-trial-offer-4 .t4-spin{animation:none}
.cf-trial-offer-4 .t4-step,.cf-trial-offer-4 .t4-num,.cf-trial-offer-4 .t4-go,.cf-trial-offer-4 .t4-pip{transition:none}
.cf-trial-offer-4 .t4-step:not(:disabled):active,.cf-trial-offer-4 .t4-go:not(:disabled):active,.cf-trial-offer-4 .t4-step[data-force=active],.cf-trial-offer-4 .t4-go[data-force=active]{transform:none}
}
`
pieces/offer/trial-offer-4/specimen.tsx 34 lines
import __studioImageec559f22 from "../assets/51069e6f81eedea3.webp";
import { TrialOffer4, type TrialOffer4State } from "../trial-offer-4"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled", "error"]
export default function TrialOffer4Specimen({ state = "default" }: { state?: TrialOffer4State }) {
return (
<TrialOffer4
state={state}
headline="Put your whole clinic on one rota,"
accent="free for {trialDays} days"
lead="Shifts, swaps and holiday cover in one place your whole team can see. Pick your team size and you'll see your exact bill before you start."
sceneImage={slot(
"scene",
__studioImageec559f22
)}
sceneImageAlt="A small clinic team of a receptionist, nurses and clinicians chatting at a bright front desk"
sceneCaption="One rota your front desk, nurses and clinicians can all see."
trialDays={14}
seatPrice={8}
initialSeats={6}
minSeats={1}
maxSeats={40}
copy={{
seatsHint: "Count everyone who works shifts or books them.",
summaryTitle: "Your clinic's bill for {seatsText}",
question: "Ready to stop rebuilding the rota every Friday?",
action: "Yes, start our free trial",
ps: "Rosterly costs your clinic nothing today. Cancel before {endDate} and you won't pay a cent.",
}}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalTrialOffer4 |
React.ReactNode |
Default "Try it with your whole team,"
|
accent OptionalTrialOffer4 |
string |
Default "free for {trialDays} days"
|
lead OptionalTrialOffer4 |
string |
Default "Choose your team size and see exactly what you'll pay after the trial, before you start."
|
sceneImage OptionalTrialOffer4 |
string |
|
sceneImageAlt OptionalTrialOffer4 |
string |
Default ""
|
sceneCaption OptionalTrialOffer4 |
string |
|
trialDays OptionalTrialOffer4 |
number |
Default 14
|
pricing OptionalTrialOffer4 |
TrialOffer4Pricing |
Default "per-seat"
|
seatPrice OptionalTrialOffer4 |
number |
Default 12
|
flatPrice OptionalTrialOffer4 |
number |
Default 49
|
currency OptionalTrialOffer4 |
string |
Default "USD"
|
locale OptionalTrialOffer4 |
string |
Default "en-US"
|
initialSeats OptionalTrialOffer4 |
number |
Default 5
|
minSeats OptionalTrialOffer4 |
number |
Default 1
|
maxSeats OptionalTrialOffer4 |
number |
Default 50
|
startDate OptionalTrialOffer4 |
string |
|
copy OptionalTrialOffer4 |
Partial<TrialOffer4Copy> |
|
state OptionalTrialOffer4 |
TrialOffer4State |
Default "default"
|
disabled OptionalTrialOffer4 |
boolean |
Default false
|
onSeatsChange OptionalTrialOffer4 |
(seats: number) => void |
|
onAction OptionalTrialOffer4 |
(selection: TrialOffer4Selection) => void | Promise<void> |
|
className OptionalTrialOffer4 |
string |
|
style OptionalTrialOffer4 |
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-border--button-2-ink--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--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.
scene- A wide atmosphere photo behind or beside the copy.
-
51069e6f81eedea3.webp
image/webp · 104 KB