Trial Started Hero 1
Trial-started hero: confirms the free trial by product name and supplied dates, spotlights the one first click inside the product,
Use it in a prompt
Use hero/trial-started-hero 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/hero/trial-started-hero.tsx. - Import it and pass your copy and images (Props tab):
import { TrialStartedHero } from "@/components/funneldna/hero/trial-started-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/trial-started-hero/component.tsx 562 lines
// layout: segmented-stepper
// Trial-started hero: confirms the free trial by product name and supplied dates, spotlights the one first click inside the product,
// and lays the trial out day by day up to the charge day, so the next action is obvious and the trial feels safe.
import * as React from "react";
import { Check, CreditCard, Lock, Mail } from "lucide-react";
import { Divider, FX_HOST } from "../fx/fx";
export type TrialStep = {
label: string;
};
export type ReceiptLine = {
label: string;
amount: string;
// "subtotal" reads quiet, "discount" reads in the success colour, "total" sits bold in a grey well
kind?: "item" | "subtotal" | "discount" | "total";
};
// every default label; templates replace {days}, {product}, {date}, {n}, {total}, {label} and {today} as text
export type TrialStartedHeroCopy = typeof DEFAULT_COPY;
export type TrialStartedHeroProps = {
// product name used in the headline, e.g. "Ledgerline"
productName?: string;
// trial length in days; the headline and day strip only show it when supplied
trialDays?: number;
// which trial day it is now (1 = the day they signed up)
todayDay?: number;
// date shown under "Today" in the strip, e.g. "Nov 22"
startDateLabel?: string;
// first charge date, e.g. "Dec 6"; feeds the subline, strip and caption
chargeDateLabel?: string;
// overrides the composed headline
headline?: React.ReactNode;
// overrides the composed subline
subline?: React.ReactNode;
// screenshot of the product shown in the app window (slot: product)
screenImage?: string;
// alt text for the screenshot; empty keeps it decorative
screenAlt?: string;
// full-bleed scene behind the band, under a token scrim (slot: scene)
sceneImage?: string;
// address shown in the window's location bar
appUrl?: string;
// spotlight position as a percentage of the screenshot's width and height
spotX?: number;
spotY?: number;
// spotlight callout heading; falls back to copy.calloutTitle
calloutTitle?: string;
// short line under the callout heading
calloutDetail?: string;
// setup steps shown as segments above the app window
steps?: TrialStep[];
// index of the step the spotlight belongs to
activeStep?: number;
// primary button label; repeat the first action
actionLabel?: string;
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
// the quiet line under the button
secondaryLabel?: string;
secondaryHref?: string;
onSecondary?: () => void;
// what arrives, when and from whom
arrivalNote?: React.ReactNode;
// receipt card heading; falls back to copy.receiptTitle
receiptTitle?: string;
// receipt rows; an empty list hides the card
receipt?: ReceiptLine[];
// P.S. line after the arrival note
ps?: React.ReactNode;
// disables the primary button
disabled?: boolean;
// forced visual state for specimens and previews
state?: "default" | "hover" | "active" | "disabled";
// overrides for any default label (see TrialStartedHeroCopy placeholders)
copy?: Partial<TrialStartedHeroCopy>;
className?: string;
};
export function TrialStartedHero(props: TrialStartedHeroProps) {
const {
productName,
trialDays,
todayDay = 1,
startDateLabel,
chargeDateLabel,
headline,
subline,
screenImage,
screenAlt,
sceneImage,
appUrl,
spotX = 26,
spotY = 36,
calloutTitle,
calloutDetail,
steps = DEFAULT_STEPS,
activeStep = 1,
actionLabel,
href,
onAction,
secondaryLabel,
secondaryHref,
onSecondary,
arrivalNote,
receiptTitle,
receipt = [],
ps,
disabled = false,
state = "default",
copy,
className,
} = props;
const c: TrialStartedHeroCopy = { ...DEFAULT_COPY, ...copy };
const uid = React.useId().replace(/:/g, "");
const [hint, setHint] = React.useState(false);
const [pulse, setPulse] = React.useState(0);
const isDisabled = disabled || state === "disabled";
const hintOn = !isDisabled && (hint || state === "hover");
const product = productName?.trim() || "";
const days =
typeof trialDays === "number" && Number.isFinite(trialDays) && trialDays >= 1 ? Math.round(trialDays) : undefined;
const today = days ? clampNum(Math.round(todayDay), 1, days) : 1;
const x = clampNum(spotX, 0, 100);
const y = clampNum(spotY, 0, 100);
// phones show the left two thirds of the screen (150% wide), shifted only as far as needed to keep the spotlight in view
const shift = clampNum(x * 1.5 - 50, 0, 50);
const active = steps.length ? clampNum(Math.round(activeStep), 0, steps.length - 1) : 0;
const hasShot = Boolean(screenImage);
const autoHeadline = fillCopy(
days ? (product ? c.headlineDays : c.headlineDaysBare) : product ? c.headlineProduct : c.headlineBare,
{ days: days ?? "", product },
);
const lead = subline ?? (chargeDateLabel ? fillCopy(c.sublineDate, { date: chargeDateLabel }) : c.sublineNoDate);
const btnText = actionLabel || c.actionLabel;
const tipTitle = calloutTitle || c.calloutTitle;
const startHint = () => {
if (isDisabled) return;
setHint(true);
setPulse((p) => p + 1);
};
const endHint = () => setHint(false);
const handleAction = (event: React.MouseEvent<HTMLElement>) => {
if (isDisabled) {
event.preventDefault();
return;
}
onAction?.(event);
};
const btnClass =
"tsh-btn" + (state === "hover" ? " is-hover" : "") + (state === "active" ? " is-active" : "");
const tipId = uid + "-tip";
const button =
href && !isDisabled ? (
<a
className={btnClass}
href={href}
onClick={handleAction}
onMouseEnter={startHint}
onMouseLeave={endHint}
onFocus={startHint}
onBlur={endHint}
aria-describedby={tipId}
>
{btnText}
</a>
) : (
<button
type="button"
className={btnClass}
disabled={isDisabled}
onClick={handleAction}
onMouseEnter={startHint}
onMouseLeave={endHint}
onFocus={startHint}
onBlur={endHint}
aria-describedby={tipId}
>
{btnText}
</button>
);
const secondary =
secondaryLabel && (secondaryHref || onSecondary) ? (
secondaryHref ? (
<a className="tsh-quiet" href={secondaryHref} onClick={onSecondary ? () => onSecondary() : undefined}>
{secondaryLabel}
</a>
) : (
<button type="button" className="tsh-quiet" onClick={() => onSecondary?.()}>
{secondaryLabel}
</button>
)
) : null;
const vars = {
"--tsh-x": x + "%",
"--tsh-y": y + "%",
"--tsh-shift": String(shift),
"--tsh-n": String(Math.max(steps.length, 1)),
} as React.CSSProperties;
const hasFoot = Boolean(arrivalNote || ps || receipt.length);
return (
<section
className={["cf-trial-started-hero", className].filter(Boolean).join(" ")}
style={{ ...FX_HOST, ...vars }}
aria-labelledby={uid + "-h"}
>
<style>{CSS}</style>
{sceneImage ? (
<div className="tsh-scene" aria-hidden="true">
<img src={sceneImage} alt="" />
</div>
) : null}
<div className="tsh-wrap">
<div className="tsh-head tsh-rise">
<h1 id={uid + "-h"} className="tsh-h1">
{headline ?? autoHeadline}
</h1>
{lead ? <p className="tsh-lead">{lead}</p> : null}
<div className="tsh-act">
{button}
{secondary}
</div>
</div>
{steps.length ? (
<div className="tsh-stepblock tsh-rise" style={{ "--tsh-d": ".07s" } as React.CSSProperties}>
<p className="tsh-stepnow" aria-hidden="true">
{fillCopy(c.stepNow, { n: active + 1, total: steps.length, label: steps[active].label })}
</p>
<ol className="tsh-steps" aria-label={c.stepsLabel}>
{steps.map((step, i) => {
const status = i < active ? "is-done" : i === active ? "is-active" : "is-next";
return (
<li key={i} className={"tsh-seg " + status} aria-current={i === active ? "step" : undefined}>
<span className="tsh-seg__mark">
{i < active ? (
<>
<Check size={16} strokeWidth={3} aria-hidden="true" />
<span className="tsh-sr">{c.stepDone}</span>
</>
) : (
i + 1
)}
</span>
<span className="tsh-seg__label">{step.label}</span>
</li>
);
})}
</ol>
</div>
) : null}
<div
className={"tsh-win tsh-rise" + (hintOn ? " is-hint" : "")}
role="group"
aria-label={product ? fillCopy(c.windowLabel, { product }) : c.windowLabelBare}
style={{ "--tsh-d": ".14s" } as React.CSSProperties}
>
<div className="tsh-chrome" aria-hidden="true">
<span className="tsh-dots">
<i />
<i />
<i />
</span>
<span className="tsh-url">
{appUrl ? (
<>
<Lock size={16} strokeWidth={2.5} />
<span className="tsh-url__text">{appUrl}</span>
</>
) : null}
</span>
<span className="tsh-dots tsh-dots--ghost" />
</div>
<div className={"tsh-stage" + (hasShot ? "" : " is-empty")}>
<div className="tsh-view">
<div className="tsh-shot">
{hasShot ? (
<>
<img src={screenImage} alt={screenAlt || ""} />
<span className="tsh-dim" aria-hidden="true" />
<span className="tsh-ring" aria-hidden="true">
<span key={pulse} className="tsh-pulse" data-on={pulse > 0 ? "true" : "false"} />
</span>
</>
) : (
<span className="tsh-empty">{c.emptyScreen}</span>
)}
</div>
</div>
<div id={tipId} className={"tsh-callout" + (x >= 58 ? " is-left" : "")}>
<span className="tsh-callout__dot" aria-hidden="true" />
<span className="tsh-callout__text">
<strong className="tsh-callout__title">{tipTitle}</strong>
{calloutDetail ? <span className="tsh-callout__detail">{calloutDetail}</span> : null}
</span>
</div>
</div>
</div>
{days ? (
<div className="tsh-strip tsh-rise" style={{ "--tsh-d": ".21s" } as React.CSSProperties}>
<p className="tsh-strip__cap">
{chargeDateLabel
? fillCopy(c.stripCaption, { today, days, date: chargeDateLabel })
: fillCopy(c.stripCaptionNoDate, { today, days })}
</p>
<div className="tsh-days-scroll" role="region" aria-label={c.stripLabel} tabIndex={0}>
<ol className="tsh-days">
{Array.from({ length: days }, (_, i) => {
const n = i + 1;
if (n === today) {
return (
<li key={n} className="tsh-day is-today" aria-current="date">
<span className="tsh-sr">{fillCopy(c.dayN, { n })}, </span>
<span className="tsh-day__big">{c.today}</span>
<span className="tsh-day__small">{startDateLabel || fillCopy(c.dayN, { n })}</span>
</li>
);
}
return (
<li key={n} className={"tsh-day" + (n < today ? " is-past" : "")}>
<span aria-hidden="true">{n}</span>
<span className="tsh-sr">{fillCopy(c.dayN, { n })}</span>
</li>
);
})}
{chargeDateLabel ? (
<li className="tsh-day is-charge">
<CreditCard size={16} strokeWidth={2.5} aria-hidden="true" />
<span className="tsh-day__stack">
<span className="tsh-day__big">{c.chargeDay}</span>
<span className="tsh-day__small">{chargeDateLabel}</span>
</span>
</li>
) : null}
</ol>
</div>
</div>
) : null}
{hasFoot ? (
<div
className={"tsh-foot tsh-rise" + (receipt.length ? "" : " is-single")}
style={{ "--tsh-d": ".28s" } as React.CSSProperties}
>
<div className="tsh-notes">
{arrivalNote ? (
<p>
<Mail className="tsh-ico" size={18} strokeWidth={2.5} aria-hidden="true" />
{arrivalNote}
</p>
) : null}
{ps ? (
<p className="tsh-ps">
<strong>{c.psLead}</strong> {ps}
</p>
) : null}
</div>
{receipt.length ? (
<div className="tsh-receipt">
<h2 className="tsh-receipt__title">{receiptTitle || c.receiptTitle}</h2>
<dl className="tsh-rows">
{receipt.map((line, i) => (
<div key={i} className={"tsh-row is-" + (line.kind || "item")}>
<dt>{line.label}</dt>
<dd>{line.amount}</dd>
</div>
))}
</dl>
</div>
) : null}
</div>
) : null}
</div>
<div className="tsh-edge" aria-hidden="true">
<Divider shape="step" tone="surface" height={56} />
</div>
</section>
);
}
export default TrialStartedHero;
function clampNum(value: number, lo: number, hi: number) {
if (!Number.isFinite(value)) return lo;
return Math.min(Math.max(value, lo), hi);
}
function fillCopy(template: string, values: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => (key in values ? String(values[key]) : match));
}
const DEFAULT_COPY = {
headlineDays: "Your {days}-day trial of {product} has started",
headlineDaysBare: "Your {days}-day free trial has started",
headlineProduct: "Your trial of {product} has started",
headlineBare: "Your free trial has started",
sublineDate: "You won't be charged before {date}.",
sublineNoDate: "Your account is ready. Here's the one thing to do first.",
actionLabel: "Take your first step",
calloutTitle: "Start here",
stepsLabel: "Your setup steps",
stepNow: "Step {n} of {total}: {label}",
stepDone: "Done:",
windowLabel: "{product} app window",
windowLabelBare: "App window",
emptyScreen: "Your dashboard opens here",
stripCaption: "Day {today} of {days}. First charge on {date}.",
stripCaptionNoDate: "Day {today} of {days} of your trial.",
stripLabel: "Your trial, day by day",
today: "Today",
dayN: "Day {n}",
chargeDay: "First charge",
receiptTitle: "What you pay today",
psLead: "P.S.",
};
const DEFAULT_STEPS: TrialStep[] = [
{ label: "Trial started" },
{ label: "Your first step" },
{ label: "Explore your dashboard" },
];
const CSS = `
.cf-trial-started-hero{--tsh-sh:var(--shadow, oklch(0.22 0.03 260));--tsh-gut:clamp(16px, 5vw, 48px);position:relative;isolation:isolate;overflow:hidden;background:var(--band, oklch(0.27 0.07 256));color:var(--band-ink, #fff);font-family:var(--font-body);padding:clamp(56px, 8vw, 112px) 0 calc(clamp(64px, 8.5vw, 120px) + 56px)}
.cf-trial-started-hero *,.cf-trial-started-hero *::before,.cf-trial-started-hero *::after{box-sizing:border-box}
.cf-trial-started-hero .tsh-scene{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.cf-trial-started-hero .tsh-scene img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;filter:grayscale(1)}
.cf-trial-started-hero .tsh-scene::after{content:"";position:absolute;inset:0;background:oklch(from var(--band, oklch(0.27 0.07 256)) l c h / 0.86)}
.cf-trial-started-hero .tsh-wrap{position:relative;z-index:1;width:min(1120px, calc(100% - 2 * var(--tsh-gut)));margin:0 auto}
.cf-trial-started-hero .tsh-head{max-width:58rem}
.cf-trial-started-hero .tsh-h1{margin:0;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;text-wrap:balance;color:var(--band-ink, #fff)}
.cf-trial-started-hero .tsh-lead{margin:20px 0 0;max-width:52ch;font-size:clamp(1.125rem, 1.5vw, 1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;color:var(--band-ink, #fff)}
.cf-trial-started-hero .tsh-act{margin-top:32px;display:flex;flex-direction:column;align-items:stretch;gap:16px;width:fit-content;max-width:100%}
.cf-trial-started-hero .tsh-btn{--tsh-bg:var(--button-bg, var(--cta));appearance:none;border:0;margin:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-height:72px;padding:0 32px;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;white-space:nowrap;text-align:center;text-decoration:none;color:var(--button-ink, var(--cta-ink));text-shadow:var(--button-text-shadow, none);background:linear-gradient(oklch(from var(--tsh-bg) calc(l + 0.04) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.02) c h));box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--tsh-bg) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--tsh-bg) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--tsh-sh) l c h / 0.4), 0 8px 16px -6px oklch(from var(--tsh-sh) l c h / 0.55));transition:transform .16s ease, box-shadow .16s ease, background .16s ease}
.cf-trial-started-hero .tsh-btn:hover:not(:disabled),.cf-trial-started-hero .tsh-btn.is-hover{background:linear-gradient(oklch(from var(--tsh-bg) calc(l - 0.01) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--tsh-bg) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--tsh-bg) calc(l - 0.18) c h), 0 1px 2px oklch(from var(--tsh-sh) l c h / 0.45), 0 10px 18px -6px oklch(from var(--tsh-sh) l c h / 0.62))}
.cf-trial-started-hero .tsh-btn:active:not(:disabled),.cf-trial-started-hero .tsh-btn.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--tsh-bg) calc(l - 0.04) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--tsh-sh) l c h / 0.3), inset 0 -2px 0 oklch(from var(--tsh-bg) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--tsh-sh) l c h / 0.4)}
.cf-trial-started-hero .tsh-btn:focus-visible{outline:3px solid var(--band-ink, #fff);outline-offset:3px}
.cf-trial-started-hero .tsh-btn:disabled{cursor:not-allowed;transform:none;background:var(--button-2-bg, var(--secondary));color:var(--button-2-ink, var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow, var(--shadow-sm))}
.cf-trial-started-hero .tsh-quiet{appearance:none;background:none;border:0;padding:0;margin:0;align-self:center;cursor:pointer;font:inherit;font-size:clamp(1.0625rem, 1.25vw, 1.125rem);font-weight:500;line-height:1.4;text-align:center;color:var(--band-ink, #fff);text-decoration:underline;text-decoration-color:oklch(from var(--band-ink, #fff) l c h / 0.5);text-decoration-thickness:1px;text-underline-offset:0.18em;text-wrap:pretty}
.cf-trial-started-hero .tsh-quiet:hover{text-decoration-color:var(--band-ink, #fff)}
.cf-trial-started-hero .tsh-quiet:focus-visible{outline:3px solid var(--band-ink, #fff);outline-offset:3px;border-radius:4px}
.cf-trial-started-hero .tsh-stepblock{margin-top:clamp(40px, 5vw, 56px)}
.cf-trial-started-hero .tsh-stepnow{display:none}
.cf-trial-started-hero .tsh-steps{display:grid;grid-template-columns:repeat(var(--tsh-n, 3), minmax(0, 1fr));gap:8px;margin:0;padding:0;list-style:none}
.cf-trial-started-hero .tsh-seg{position:relative;display:flex;align-items:center;gap:12px;min-height:56px;min-width:0;padding:8px 16px;border-radius:var(--radius, 12px);background:oklch(from var(--band-ink, #fff) l c h / 0.1);color:var(--band-ink, #fff);font-size:16px;font-weight:700;line-height:1.2}
.cf-trial-started-hero .tsh-seg.is-active{background:var(--card);color:var(--ink);box-shadow:var(--shadow-md, 0 1px 2px oklch(from var(--tsh-sh) l c h / 0.22), 0 4px 10px -2px oklch(from var(--tsh-sh) l c h / 0.2))}
.cf-trial-started-hero .tsh-seg__mark{flex:0 0 auto;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;font-size:14px;font-weight:800;font-variant-numeric:tabular-nums}
.cf-trial-started-hero .tsh-seg.is-done .tsh-seg__mark{background:var(--success);color:oklch(from var(--success) 1 0 h)}
.cf-trial-started-hero .tsh-seg.is-active .tsh-seg__mark{background:var(--accent-fill, var(--accent));color:var(--accent-fill-ink, var(--card))}
.cf-trial-started-hero .tsh-seg.is-next .tsh-seg__mark{border:2px solid oklch(from var(--band-ink, #fff) l c h / 0.5)}
.cf-trial-started-hero .tsh-seg__label{min-width:0;text-wrap:balance}
.cf-trial-started-hero .tsh-win{position:relative;background:var(--card);color:var(--ink);border:1px solid var(--card-border, oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius, var(--radius, 14px));box-shadow:var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--tsh-sh) l c h / 0.22), 0 12px 24px -8px oklch(from var(--tsh-sh) l c h / 0.32)));overflow:hidden}
.cf-trial-started-hero .tsh-head + .tsh-win{margin-top:clamp(40px, 5vw, 56px)}
.cf-trial-started-hero .tsh-stepblock + .tsh-win{margin-top:12px}
.cf-trial-started-hero .tsh-chrome{display:flex;align-items:center;gap:16px;height:48px;padding:0 16px;background:color-mix(in oklch, var(--ink) 5%, var(--card));border-bottom:1px solid oklch(from var(--ink) l c h / 0.1)}
.cf-trial-started-hero .tsh-dots{flex:0 0 52px;display:flex;gap:8px}
.cf-trial-started-hero .tsh-dots i{display:block;width:12px;height:12px;border-radius:999px;background:color-mix(in oklch, var(--ink) 20%, var(--card))}
.cf-trial-started-hero .tsh-url{flex:1 1 auto;min-width:0;max-width:440px;height:30px;margin:0 auto;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;border-radius:999px;background:var(--card);color:var(--ink);font-size:14px;font-weight:600;white-space:nowrap}
.cf-trial-started-hero .tsh-url svg{flex:0 0 auto}
.cf-trial-started-hero .tsh-url__text{min-width:0;overflow:hidden;text-overflow:ellipsis}
.cf-trial-started-hero .tsh-stage{position:relative}
.cf-trial-started-hero .tsh-view{position:relative;overflow:hidden;background:color-mix(in oklch, var(--ink) 4%, var(--card))}
.cf-trial-started-hero .tsh-shot{position:relative;width:100%;aspect-ratio:16 / 9}
.cf-trial-started-hero .tsh-shot img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:left top}
.cf-trial-started-hero .tsh-dim{position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at var(--tsh-x) var(--tsh-y), transparent 46px, oklch(from var(--band, oklch(0.27 0.07 256)) l c h / 0.4) 50px)}
.cf-trial-started-hero .tsh-ring{position:absolute;left:var(--tsh-x);top:var(--tsh-y);width:76px;height:76px;margin:-38px 0 0 -38px;border-radius:999px;border:3px solid var(--accent-fill, var(--accent));outline:5px solid oklch(from var(--accent-fill, var(--accent)) l c h / 0.32);transition:outline-width .16s ease, outline-color .16s ease;pointer-events:none}
.cf-trial-started-hero .tsh-win.is-hint .tsh-ring{outline-width:10px;outline-color:oklch(from var(--accent-fill, var(--accent)) l c h / 0.42)}
.cf-trial-started-hero .tsh-pulse{position:absolute;inset:-3px;border-radius:999px;border:3px solid var(--accent-fill, var(--accent));opacity:0}
.cf-trial-started-hero .tsh-pulse[data-on="true"]{animation:cf-tsh-pulse .9s cubic-bezier(.2,.7,.2,1) 1 both}
@keyframes cf-tsh-pulse{0%{opacity:.95;transform:scale(1)}100%{opacity:0;transform:scale(1.75)}}
.cf-trial-started-hero .tsh-callout{position:absolute;z-index:2;left:var(--tsh-x);top:clamp(64px, var(--tsh-y), calc(100% - 64px));transform:translate(60px, -50%);width:min(300px, 42%);display:flex;gap:12px;align-items:flex-start;padding:16px 20px;border-radius:var(--card-radius, var(--radius, 12px));background:var(--card);color:var(--ink);border:1px solid var(--card-border, oklch(from var(--ink) l c h / 0.12));box-shadow:var(--shadow-lg, 0 2px 4px oklch(from var(--tsh-sh) l c h / 0.22), 0 12px 24px -8px oklch(from var(--tsh-sh) l c h / 0.32))}
.cf-trial-started-hero .tsh-callout.is-left{transform:translate(calc(-100% - 60px), -50%)}
.cf-trial-started-hero .tsh-callout__dot{display:none;flex:0 0 auto;width:16px;height:16px;margin-top:5px;border-radius:999px;border:3px solid var(--accent-fill, var(--accent))}
.cf-trial-started-hero .tsh-callout__text{display:flex;flex-direction:column;gap:4px;min-width:0}
.cf-trial-started-hero .tsh-callout__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:-0.01em;text-wrap:balance}
.cf-trial-started-hero .tsh-callout__detail{font-size:15px;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-trial-started-hero .tsh-stage.is-empty .tsh-callout{position:static;transform:none;width:auto;border:0;border-top:1px solid oklch(from var(--ink) l c h / 0.1);border-radius:0;box-shadow:none;background:var(--card);padding:16px 20px}
.cf-trial-started-hero .tsh-stage.is-empty .tsh-callout__dot{display:block}
.cf-trial-started-hero .tsh-empty{position:absolute;inset:0;display:grid;place-items:center;padding:24px;text-align:center;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;color:var(--ink)}
.cf-trial-started-hero .tsh-strip{margin-top:24px}
.cf-trial-started-hero .tsh-strip__cap{margin:0 0 12px;font-size:15px;font-weight:600;line-height:1.4;color:var(--band-ink, #fff)}
.cf-trial-started-hero .tsh-days-scroll{overflow-x:auto;overscroll-behavior-x:contain;padding-bottom:6px;border-radius:10px;scrollbar-width:thin;scrollbar-color:oklch(from var(--band-ink, #fff) l c h / 0.35) transparent}
.cf-trial-started-hero .tsh-days-scroll:focus-visible{outline:3px solid var(--band-ink, #fff);outline-offset:3px}
.cf-trial-started-hero .tsh-days{display:flex;gap:4px;margin:0;padding:0;list-style:none}
.cf-trial-started-hero .tsh-day{position:relative;flex:1 0 36px;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border-radius:8px;background:oklch(from var(--band-ink, #fff) l c h / 0.1);color:var(--band-ink, #fff);font-size:14px;font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums}
.cf-trial-started-hero .tsh-day.is-past{background:oklch(from var(--band-ink, #fff) l c h / 0.22)}
.cf-trial-started-hero .tsh-day.is-today{flex:0 0 auto;padding:0 16px;background:var(--accent-fill, var(--accent));color:var(--accent-fill-ink, var(--card))}
.cf-trial-started-hero .tsh-day.is-charge{flex:0 0 auto;flex-direction:row;gap:8px;padding:0 16px;background:var(--card);color:var(--ink)}
.cf-trial-started-hero .tsh-day__stack{display:flex;flex-direction:column;gap:2px}
.cf-trial-started-hero .tsh-day__big{font-size:15px;font-weight:800;white-space:nowrap}
.cf-trial-started-hero .tsh-day__small{font-size:14px;font-weight:600;white-space:nowrap}
.cf-trial-started-hero .tsh-foot{margin-top:clamp(32px, 4vw, 48px);display:grid;grid-template-columns:minmax(0, 1fr) minmax(0, 380px);gap:clamp(32px, 5vw, 72px);align-items:start}
.cf-trial-started-hero .tsh-foot.is-single{grid-template-columns:minmax(0, 1fr)}
.cf-trial-started-hero .tsh-notes p{margin:0;max-width:62ch;font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.5;text-wrap:pretty;color:var(--band-ink, #fff)}
.cf-trial-started-hero .tsh-notes p + p{margin-top:16px}
.cf-trial-started-hero .tsh-ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-trial-started-hero .tsh-ps strong{font-weight:800}
.cf-trial-started-hero .tsh-receipt{background:var(--card);color:var(--ink);border:1px solid var(--card-border, oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius, var(--radius, 14px));box-shadow:var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(from var(--tsh-sh) l c h / 0.22), 0 4px 10px -2px oklch(from var(--tsh-sh) l c h / 0.2)));padding:clamp(20px, 3vw, 28px)}
.cf-trial-started-hero .tsh-receipt__title{margin:0 0 16px;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:-0.01em;text-wrap:balance;color:var(--ink)}
.cf-trial-started-hero .tsh-rows{margin:0;display:grid;gap:12px}
.cf-trial-started-hero .tsh-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;font-size:17px;line-height:1.4}
.cf-trial-started-hero .tsh-row dt{min-width:0;text-wrap:pretty}
.cf-trial-started-hero .tsh-row dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-trial-started-hero .tsh-row.is-subtotal{color:var(--muted)}
.cf-trial-started-hero .tsh-row.is-discount{color:var(--success)}
.cf-trial-started-hero .tsh-row.is-total{margin-top:6px;padding:12px 16px;border-radius:10px;background:color-mix(in oklch, var(--ink) 5%, var(--card));font-family:var(--font-display);font-size:clamp(1.125rem, 1.5vw, 1.375rem);font-weight:800}
.cf-trial-started-hero .tsh-row.is-total dd{font-weight:800}
.cf-trial-started-hero .tsh-edge{position:absolute;left:0;right:0;bottom:0;height:56px;z-index:1;pointer-events:none}
.cf-trial-started-hero .tsh-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}
.cf-trial-started-hero .tsh-rise{animation:cf-tsh-in .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--tsh-d, 0s)}
@keyframes cf-tsh-in{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width: 860px){
.cf-trial-started-hero .tsh-foot{grid-template-columns:minmax(0, 1fr)}
}
@media (max-width: 640px){
.cf-trial-started-hero .tsh-act{width:100%}
.cf-trial-started-hero .tsh-btn{width:100%;min-height:64px;padding:12px 24px;white-space:normal;text-wrap:balance}
.cf-trial-started-hero .tsh-quiet{align-self:center}
.cf-trial-started-hero .tsh-stepblock{margin-top:32px}
.cf-trial-started-hero .tsh-stepnow{display:block;margin:0 0 10px;font-size:15px;font-weight:700;line-height:1.4;color:var(--band-ink, #fff);text-wrap:pretty}
.cf-trial-started-hero .tsh-steps{gap:4px}
.cf-trial-started-hero .tsh-seg{min-height:0;height:6px;padding:0;border-radius:999px;background:oklch(from var(--band-ink, #fff) l c h / 0.22)}
.cf-trial-started-hero .tsh-seg.is-done{background:var(--success)}
.cf-trial-started-hero .tsh-seg.is-active{background:var(--accent-fill, var(--accent));box-shadow:none}
.cf-trial-started-hero .tsh-seg__mark,.cf-trial-started-hero .tsh-seg__label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}
.cf-trial-started-hero .tsh-stepblock + .tsh-win{margin-top:16px}
.cf-trial-started-hero .tsh-chrome{height:44px;gap:12px;padding:0 12px}
.cf-trial-started-hero .tsh-dots{flex-basis:42px;gap:6px}
.cf-trial-started-hero .tsh-dots i{width:10px;height:10px}
.cf-trial-started-hero .tsh-dots--ghost{display:none}
.cf-trial-started-hero .tsh-shot{width:150%;margin-left:calc(var(--tsh-shift, 0) * -1%)}
.cf-trial-started-hero .tsh-stage.is-empty .tsh-shot{width:100%;margin-left:0}
.cf-trial-started-hero .tsh-ring{width:60px;height:60px;margin:-30px 0 0 -30px}
.cf-trial-started-hero .tsh-dim{background:radial-gradient(circle at var(--tsh-x) var(--tsh-y), transparent 38px, oklch(from var(--band, oklch(0.27 0.07 256)) l c h / 0.4) 42px)}
.cf-trial-started-hero .tsh-callout,.cf-trial-started-hero .tsh-callout.is-left{position:static;transform:none;width:auto;border:0;border-radius:0;box-shadow:none;background:color-mix(in oklch, var(--ink) 4%, var(--card));padding:16px}
.cf-trial-started-hero .tsh-stage.is-empty .tsh-callout{background:var(--card);padding:16px}
.cf-trial-started-hero .tsh-callout__dot{display:block}
.cf-trial-started-hero .tsh-day{flex:0 0 36px}
.cf-trial-started-hero .tsh-day.is-today,.cf-trial-started-hero .tsh-day.is-charge{flex:0 0 auto}
}
@media (prefers-reduced-motion: reduce){
.cf-trial-started-hero .tsh-rise{animation:none}
.cf-trial-started-hero .tsh-pulse{display:none}
.cf-trial-started-hero .tsh-btn,.cf-trial-started-hero .tsh-ring{transition:none}
.cf-trial-started-hero .tsh-btn:hover:not(:disabled),.cf-trial-started-hero .tsh-btn.is-hover,.cf-trial-started-hero .tsh-btn:active:not(:disabled),.cf-trial-started-hero .tsh-btn.is-active{transform:none}
}
`;
pieces/hero/trial-started-hero/specimen.tsx 54 lines
import __studioImage0ee1c053 from "../assets/30f86ea4f152fe42.webp";
import __studioImagef7d6c02e from "../assets/880e69b619108379.webp";
// Specimen: Ledgerline (fictional bookkeeping software for freelancers), the first screen after a 14-day trial starts.
import { TrialStartedHero, type TrialStartedHeroProps } from "../trial-started-hero";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled"];
export default function TrialStartedHeroSpecimen({ state = "default" }: { state?: TrialStartedHeroProps["state"] }) {
return (
<TrialStartedHero
state={state}
productName="Ledgerline"
trialDays={14}
todayDay={1}
startDateLabel="Nov 22"
chargeDateLabel="Dec 6"
copy={{ sublineDate: "You won't be charged before {date}; cancel in two clicks." }}
sceneImage={slot(
"scene",
__studioImage0ee1c053,
)}
screenImage={slot(
"product",
__studioImagef7d6c02e,
)}
screenAlt="Ledgerline dashboard with the bank feed setup panel open"
appUrl="app.ledgerline.com"
spotX={26}
spotY={36}
steps={[{ label: "Trial started" }, { label: "Connect your bank feed" }, { label: "Send your first invoice" }]}
activeStep={1}
calloutTitle="Connect your bank feed"
calloutDetail="About 2 minutes. Click here first."
actionLabel="Connect my bank feed"
onAction={() => undefined}
secondaryLabel="or take the 90-second tour first"
secondaryHref="#tour"
arrivalNote={
<>
Your receipt and login link are on their way now from <strong>hello@ledgerline.app</strong>.
</>
}
receiptTitle="Nothing to pay until Dec 6"
receipt={[
{ label: "Ledgerline Solo, monthly", amount: "$24.00" },
{ label: "Subtotal", amount: "$24.00", kind: "subtotal" },
{ label: "14-day free trial", amount: "−$24.00", kind: "discount" },
{ label: "Due today", amount: "$0.00", kind: "total" },
]}
ps="Cancel in two clicks from Settings any time before Dec 6, and you won't pay a cent."
/>
);
}
| Name | Type | Details |
|---|---|---|
productName OptionalTrialStartedHero |
string |
|
trialDays OptionalTrialStartedHero |
number |
|
todayDay OptionalTrialStartedHero |
number |
|
startDateLabel OptionalTrialStartedHero |
string |
|
chargeDateLabel OptionalTrialStartedHero |
string |
|
headline OptionalTrialStartedHero |
React.ReactNode |
|
subline OptionalTrialStartedHero |
React.ReactNode |
|
screenImage OptionalTrialStartedHero |
string |
|
screenAlt OptionalTrialStartedHero |
string |
|
sceneImage OptionalTrialStartedHero |
string |
|
appUrl OptionalTrialStartedHero |
string |
|
spotX OptionalTrialStartedHero |
number |
|
spotY OptionalTrialStartedHero |
number |
|
calloutTitle OptionalTrialStartedHero |
string |
|
calloutDetail OptionalTrialStartedHero |
string |
|
steps OptionalTrialStartedHero |
TrialStep[] |
|
activeStep OptionalTrialStartedHero |
number |
|
actionLabel OptionalTrialStartedHero |
string |
|
href OptionalTrialStartedHero |
string |
|
onAction OptionalTrialStartedHero |
(event: React.MouseEvent<HTMLElement>) => void |
|
secondaryLabel OptionalTrialStartedHero |
string |
|
secondaryHref OptionalTrialStartedHero |
string |
|
onSecondary OptionalTrialStartedHero |
() => void |
|
arrivalNote OptionalTrialStartedHero |
React.ReactNode |
|
receiptTitle OptionalTrialStartedHero |
string |
|
receipt OptionalTrialStartedHero |
ReceiptLine[] |
|
ps OptionalTrialStartedHero |
React.ReactNode |
|
disabled OptionalTrialStartedHero |
boolean |
|
state OptionalTrialStartedHero |
"default" | "hover" | "active" | "disabled" |
|
copy OptionalTrialStartedHero |
Partial<TrialStartedHeroCopy> |
|
className OptionalTrialStartedHero |
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--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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
scene- A wide atmosphere photo behind or beside the copy.
-
30f86ea4f152fe42.webp
image/webp · 38.7 KB
-
880e69b619108379.webp
image/webp · 23.5 KB