Saas Trial Hero 1
Software free-trial hero: an outcome headline, then a numbered rail whose first step is the email field and trial button, beside the product screenshot in a clean window frame.
Use it in a prompt
Use hero/saas-trial-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/saas-trial-hero.tsx. - Import it and pass your copy and images (Props tab):
import { SaasTrialHero } from "@/components/funneldna/hero/saas-trial-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/saas-trial-hero/component.tsx 705 lines
// layout: number-rail
// Software free-trial hero: an outcome headline, then a numbered rail whose first step is the email field and trial button, beside the product screenshot in a clean window frame.
// An optional hello bar keeps the trial one tap away once the hero form scrolls out of view.
import * as React from "react";
import { AlertTriangle, Check, Lock, X } from "lucide-react";
export type SaasTrialHeroStep = {
title: string;
body: string;
};
export type SaasTrialHeroLogo = {
src: string;
alt: string;
};
export type SaasTrialHeroProps = {
/** Outcome headline (the page's h1). */
headline?: string;
/** Phrase inside the headline set in the accent colour. */
highlight?: string;
/** Deck under the headline: what the trial gets them. */
deck?: string;
/** Subhead over rail step 01, the email step (tinted toward the action colour). */
actionTitle?: string;
/** Rail steps after the email step (02, 03 and so on). */
steps?: SaasTrialHeroStep[];
/** Visible label above the email field. */
emailLabel?: string;
/** Example answer shown inside the empty email field. */
emailPlaceholder?: string;
/** Trial button label, also used by the hello-bar form. */
buttonLabel?: string;
/** Second button line, e.g. the price after the trial. Hidden when empty. */
buttonSubLabel?: string;
/** Reassurance lines under the form (e.g. a supplied "No credit card" line). Shown only when supplied. */
reassurance?: string[];
/** Product screenshot (slot "screenshot"). The frame column is hidden without it. */
screenshotImage?: string;
/** Alt text for the product screenshot. */
screenshotAlt?: string;
/** Title shown in the window frame's top bar. */
frameLabel?: string;
/** Caption under the screenshot. */
screenshotCaption?: string;
/** Optional supplied logo row. */
logos?: SaasTrialHeroLogo[];
/** Small label above the logo row. Hidden when empty. */
logosLabel?: string;
/** Show a hello bar along the top once the hero form scrolls out of view. */
sticky?: boolean;
/** Hello-bar title (hidden under 560px). Hidden when empty. */
stickyTitle?: string;
/** Hello-bar button label; defaults to buttonLabel. */
stickyLabel?: string;
/** Generated copy: required/invalid email messages, close button label and the hello bar's region label. */
copy?: {
required?: string;
invalid?: string;
close?: string;
bar?: string;
};
/** Called with the validated email. */
onSubmit?: (values: { email: string }) => void;
/** Called after a valid submit. */
onAction?: () => void;
state?: "default" | "hover" | "active" | "disabled" | "error";
className?: string;
};
export function SaasTrialHero(props: SaasTrialHeroProps) {
const {
headline = "Build your first funnel with a clear plan",
highlight = "a clear plan",
deck = "Start your free trial and plan your funnel, write your page copy, and check every step before you launch.",
actionTitle = "Start your free trial now",
steps = DEFAULT_STEPS,
emailLabel = "Your best email",
emailPlaceholder = "you@example.com",
buttonLabel = "Send my free trial",
buttonSubLabel = "",
reassurance = [],
screenshotImage = "",
screenshotAlt = "Product screenshot",
frameLabel = "",
screenshotCaption = "",
logos = [],
logosLabel = "",
sticky = false,
stickyTitle = "",
stickyLabel,
copy,
onSubmit,
onAction,
state = "default",
className,
} = props;
const msgRequired = copy?.required ?? "Enter your email so we know where to send your trial.";
const msgInvalid = copy?.invalid ?? "That email looks off. Check it and try again.";
const closeLabel = copy?.close ?? "Close";
const barLabel = copy?.bar ?? "Start your free trial";
const disabled = state === "disabled";
const forced = state === "hover" ? "is-hover" : state === "active" ? "is-active" : "";
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, "");
const titleId = `sth-${uid}-title`;
const panelId = `sth-${uid}-panel`;
const [email, setEmail] = React.useState("");
const [errors, setErrors] = React.useState<FormErrors>(() => (state === "error" ? { main: msgRequired } : {}));
React.useEffect(() => {
setErrors(state === "error" ? { main: msgRequired } : {});
}, [state, msgRequired]);
const mainInput = React.useRef<HTMLInputElement>(null);
const barInput = React.useRef<HTMLInputElement>(null);
const toggleRef = React.useRef<HTMLButtonElement>(null);
const barRef = React.useRef<HTMLDivElement>(null);
const watchRef = React.useRef<HTMLDivElement>(null);
const [showBar, setShowBar] = React.useState(false);
const [open, setOpen] = React.useState(false);
// Show the hello bar only after the hero form has scrolled up past the top of the viewport.
React.useEffect(() => {
if (!sticky) {
setShowBar(false);
return;
}
const el = watchRef.current;
if (!el || typeof IntersectionObserver === "undefined") return;
const io = new IntersectionObserver(([entry]) => {
setShowBar(!entry.isIntersecting && entry.boundingClientRect.top < 0);
});
io.observe(el);
return () => io.disconnect();
}, [sticky]);
React.useEffect(() => {
if (!showBar) setOpen(false);
}, [showBar]);
// While the hello-bar panel is open: focus its field, close on Escape or an outside pointer press.
React.useEffect(() => {
if (!open) return;
barInput.current?.focus();
const onKey = (event: KeyboardEvent) => {
if (event.key === "Escape") {
setOpen(false);
toggleRef.current?.focus();
}
};
const onDown = (event: PointerEvent) => {
if (barRef.current && !barRef.current.contains(event.target as Node)) setOpen(false);
};
document.addEventListener("keydown", onKey);
document.addEventListener("pointerdown", onDown);
return () => {
document.removeEventListener("keydown", onKey);
document.removeEventListener("pointerdown", onDown);
};
}, [open]);
const submit = (which: FormKey) => (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
if (disabled) return;
const value = email.trim();
const message = !value ? msgRequired : EMAIL_RE.test(value) ? "" : msgInvalid;
if (message) {
setErrors({ [which]: message });
(which === "main" ? mainInput : barInput).current?.focus();
return;
}
setErrors({});
onSubmit?.({ email: value });
onAction?.();
};
const change = (which: FormKey) => (value: string) => {
setEmail(value);
if (errors[which]) setErrors((prev) => ({ ...prev, [which]: undefined }));
};
const closePanel = () => {
setOpen(false);
toggleRef.current?.focus();
};
const hasShot = Boolean(screenshotImage);
const rootClass = ["cf-saas-trial-hero", hasShot ? "" : "is-noshot", className].filter(Boolean).join(" ");
return (
<section className={rootClass} aria-labelledby={titleId} data-state={state}>
<style>{CSS}</style>
{sticky && showBar ? (
<div className="sth-bar" ref={barRef} role="region" aria-label={barLabel}>
<div className="sth-bar-inner">
{stickyTitle ? <p className="sth-bar-title">{stickyTitle}</p> : null}
<button
ref={toggleRef}
type="button"
className="sth-btn sth-btn--bar"
aria-expanded={open}
aria-controls={panelId}
onClick={() => setOpen((value) => !value)}
disabled={disabled}
>
<span className="sth-btn-label">{stickyLabel ?? buttonLabel}</span>
</button>
</div>
<div id={panelId} className="sth-panel" hidden={!open}>
<div className="sth-panel-inner">
<TrialForm
idBase={`sth-${uid}-bar`}
inputRef={barInput}
email={email}
onEmail={change("bar")}
error={errors.bar}
onSubmit={submit("bar")}
disabled={disabled}
emailLabel={emailLabel}
emailPlaceholder={emailPlaceholder}
buttonLabel={buttonLabel}
buttonSubLabel={buttonSubLabel}
/>
<button type="button" className="sth-close" aria-label={closeLabel} onClick={closePanel}>
<X size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
</div>
</div>
</div>
) : null}
<div className="sth-wrap">
<div className="sth-grid">
<div className="sth-head sth-reveal">
<h1 id={titleId} className="sth-h1">
{renderHeadline(headline, highlight)}
</h1>
{deck ? <p className="sth-deck">{deck}</p> : null}
</div>
<ol className="sth-rail sth-act" role="list">
<RailStep number={1} act end={steps.length === 0} delay="0.07s">
{actionTitle ? <h2 className="sth-sub sth-sub--act">{actionTitle}</h2> : null}
<div ref={watchRef}>
<TrialForm
idBase={`sth-${uid}-main`}
inputRef={mainInput}
email={email}
onEmail={change("main")}
error={errors.main}
onSubmit={submit("main")}
disabled={disabled}
forced={forced}
emailLabel={emailLabel}
emailPlaceholder={emailPlaceholder}
buttonLabel={buttonLabel}
buttonSubLabel={buttonSubLabel}
reassurance={reassurance}
/>
</div>
</RailStep>
</ol>
{hasShot ? (
<div className="sth-shot sth-reveal" style={revealDelay("0.14s")}>
<figure className="sth-figure">
<div className="sth-stage">
<div className="sth-frame">
<div className="sth-chrome" aria-hidden="true">
<span className="sth-dots">
<i />
<i />
<i />
</span>
{frameLabel ? (
<span className="sth-frame-title">
<Lock size={16} strokeWidth={2.5} aria-hidden="true" />
{frameLabel}
</span>
) : (
<span className="sth-frame-title" />
)}
</div>
<img
className="sth-img"
src={screenshotImage}
alt={screenshotAlt}
width={1600}
height={1000}
loading="eager"
decoding="async"
/>
</div>
</div>
{screenshotCaption ? <figcaption className="sth-cap">{screenshotCaption}</figcaption> : null}
</figure>
</div>
) : null}
{steps.length ? (
<ol className="sth-rail sth-rest" role="list" start={2}>
{steps.map((step, index) => (
<RailStep
key={`${step.title}-${index}`}
number={index + 2}
end={index === steps.length - 1}
delay={`${Math.min(0.21 + index * 0.07, 0.28).toFixed(2)}s`}
>
<h2 className="sth-sub">{step.title}</h2>
{step.body ? <p className="sth-text">{step.body}</p> : null}
</RailStep>
))}
</ol>
) : null}
</div>
{logos.length ? (
<div className="sth-logos">
{logosLabel ? <p className="sth-logos-label">{logosLabel}</p> : null}
<ul role="list">
{logos.map((logo, index) => (
<li key={`${logo.src}-${index}`}>
<img src={logo.src} alt={logo.alt} loading="lazy" decoding="async" />
</li>
))}
</ul>
</div>
) : null}
</div>
</section>
);
}
export default SaasTrialHero;
type FormKey = "main" | "bar";
type FormErrors = Partial<Record<FormKey, string>>;
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
const DEFAULT_STEPS: SaasTrialHeroStep[] = [
{ title: "Map every page in one sitting", body: "Lay out your offer and each page your funnel needs." },
{ title: "Check it twice, then go live", body: "Review your links, forms and next steps before you launch." },
];
/** Staggered entrance delay, read by `.sth-reveal` through `--d`. */
function revealDelay(delay: string): React.CSSProperties {
return { ["--d" as string]: delay } as React.CSSProperties;
}
function renderHeadline(text: string, phrase?: string) {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="sth-em">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
type RailStepProps = {
number: number;
/** The email step: its connector line hides on narrow layouts with a screenshot. */
act?: boolean;
/** Last step in its rail: no connector line, no bottom padding. */
end?: boolean;
delay: string;
children: React.ReactNode;
};
function RailStep({ number, act = false, end = false, delay, children }: RailStepProps) {
const cls = ["sth-step", act ? "sth-step--act" : "", end ? "is-end" : "", "sth-reveal"].filter(Boolean).join(" ");
return (
<li className={cls} style={revealDelay(delay)}>
<div className="sth-mark" aria-hidden="true">
<span className="sth-num">{String(number).padStart(2, "0")}</span>
{end ? null : <span className="sth-line" />}
</div>
<div className="sth-body">{children}</div>
</li>
);
}
type TrialFormProps = {
idBase: string;
inputRef: React.Ref<HTMLInputElement>;
email: string;
onEmail: (value: string) => void;
error?: string;
onSubmit: (event: React.FormEvent<HTMLFormElement>) => void;
disabled: boolean;
/** Forced visual state class for the specimen (`is-hover` / `is-active`). */
forced?: string;
emailLabel: string;
emailPlaceholder: string;
buttonLabel: string;
buttonSubLabel?: string;
reassurance?: string[];
};
function TrialForm(p: TrialFormProps) {
const fieldId = `${p.idBase}-email`;
const errorId = `${p.idBase}-error`;
return (
<form className="sth-form" noValidate onSubmit={p.onSubmit}>
<label className="sth-label" htmlFor={fieldId}>
{p.emailLabel}
</label>
<div className="sth-row">
<input
ref={p.inputRef}
id={fieldId}
className="sth-field"
type="email"
name="email"
autoComplete="email"
inputMode="email"
spellCheck={false}
placeholder={p.emailPlaceholder}
value={p.email}
onChange={(event) => p.onEmail(event.target.value)}
disabled={p.disabled}
aria-invalid={p.error ? true : undefined}
aria-describedby={p.error ? errorId : undefined}
/>
<button type="submit" className={["sth-btn", p.forced].filter(Boolean).join(" ")} disabled={p.disabled}>
<span className="sth-btn-label">{p.buttonLabel}</span>
{p.buttonSubLabel ? <span className="sth-btn-sub">{p.buttonSubLabel}</span> : null}
</button>
</div>
{p.error ? (
<p id={errorId} className="sth-error" role="alert">
<AlertTriangle size={16} strokeWidth={2.5} aria-hidden="true" />
{p.error}
</p>
) : null}
{p.reassurance && p.reassurance.length ? (
<ul className="sth-assure" role="list">
{p.reassurance.map((line, index) => (
<li key={`${line}-${index}`}>
<Check size={16} strokeWidth={2.5} aria-hidden="true" />
{line}
</li>
))}
</ul>
) : null}
</form>
);
}
const CSS = `
.cf-saas-trial-hero{
--sth-gutter:clamp(16px,5vw,48px);
--sth-num:clamp(2.5rem,4.2vw,3.75rem);
--sth-rail:calc(var(--sth-num) * 1.25);
--sth-subhead:color-mix(in oklab,var(--cta) 42%,var(--ink));
--sth-shadow:var(--shadow,oklch(0.22 0.03 260));
--sth-btn:var(--button-bg,var(--cta));
--sth-btn-2:var(--button-bg-2,var(--cta-2));
--sth-focus:var(--field-focus,var(--accent));
position:relative;
overflow-x:clip;
background:var(--surface);
color:var(--ink);
font-family:var(--font-body);
padding:clamp(56px,8vw,112px) var(--sth-gutter) clamp(64px,8.5vw,120px);
}
.cf-saas-trial-hero *,.cf-saas-trial-hero *::before,.cf-saas-trial-hero *::after{box-sizing:border-box}
.cf-saas-trial-hero .sth-wrap{max-width:1120px;margin:0 auto}
.cf-saas-trial-hero .sth-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:'head' 'act' 'shot' 'rest'}
.cf-saas-trial-hero .sth-head{grid-area:head;margin-bottom:clamp(32px,4vw,44px)}
.cf-saas-trial-hero .sth-act{grid-area:act}
.cf-saas-trial-hero .sth-rest{grid-area:rest}
.cf-saas-trial-hero .sth-shot{grid-area:shot;min-width:0;margin:8px 0 48px}
@media (min-width:960px){
.cf-saas-trial-hero .sth-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);column-gap:clamp(32px,5vw,72px);grid-template-areas:'head shot' 'act shot' 'rest shot';grid-template-rows:auto auto 1fr}
.cf-saas-trial-hero .sth-shot{margin:0;padding-top:8px;position:sticky;top:92px;align-self:start}
}
.cf-saas-trial-hero.is-noshot .sth-grid{max-width:46rem;grid-template-columns:minmax(0,1fr);grid-template-areas:'head' 'act' 'rest';grid-template-rows:auto}
.cf-saas-trial-hero .sth-h1{
margin:0 0 clamp(16px,1.6vw,22px);
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,4.9vw,4.375rem);
line-height:1.04;
color:var(--ink);
text-wrap:balance;
}
.cf-saas-trial-hero .sth-em{color:var(--accent)}
.cf-saas-trial-hero .sth-deck{margin:0;max-width:56ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-saas-trial-hero .sth-rail{list-style:none;margin:0;padding:0}
.cf-saas-trial-hero .sth-step{display:grid;grid-template-columns:var(--sth-rail) minmax(0,1fr);column-gap:clamp(14px,2vw,24px)}
.cf-saas-trial-hero .sth-mark{display:flex;flex-direction:column;align-items:center}
.cf-saas-trial-hero .sth-num{
font-family:var(--font-display);
font-weight:var(--display-weight,800);
font-size:var(--sth-num);
line-height:.84;
letter-spacing:-0.04em;
font-variant-numeric:tabular-nums;
color:var(--accent);
}
.cf-saas-trial-hero .sth-line{flex:1 1 auto;width:2px;min-height:24px;margin:12px 0 10px;border-radius:2px;background:oklch(from var(--accent-fill,var(--accent)) l c h / .28)}
.cf-saas-trial-hero .sth-step--act .sth-line{display:none}
.cf-saas-trial-hero.is-noshot .sth-step--act .sth-line{display:block}
@media (min-width:960px){.cf-saas-trial-hero .sth-step--act .sth-line{display:block}}
.cf-saas-trial-hero .sth-body{min-width:0;padding:4px 0 clamp(28px,3vw,40px)}
.cf-saas-trial-hero .sth-step--act .sth-body{padding-bottom:clamp(36px,4vw,56px)}
.cf-saas-trial-hero .sth-step.is-end .sth-body{padding-bottom:0}
.cf-saas-trial-hero .sth-sub{
margin:0 0 12px;
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:-0.01em;
color:var(--sth-subhead);
text-wrap:balance;
}
.cf-saas-trial-hero .sth-sub--act{margin-bottom:16px}
.cf-saas-trial-hero .sth-text{margin:0;max-width:60ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
.cf-saas-trial-hero .sth-form{container-type:inline-size;margin:0;min-width:0}
.cf-saas-trial-hero .sth-label{display:block;margin:0 0 8px;font-size:1.0625rem;line-height:1.3;font-weight:700;color:var(--label-ink,var(--ink))}
.cf-saas-trial-hero .sth-row{display:flex;flex-wrap:wrap;align-items:stretch;gap:10px}
.cf-saas-trial-hero .sth-field{
flex:1000 1 12.5rem;
min-width:0;
width:100%;
min-height:64px;
padding:0 18px;
margin:0;
font-family:var(--font-body);
font-size:1.0625rem;
line-height:1.2;
font-weight:400;
color:var(--field-ink);
background:var(--field);
border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));
border-radius:var(--field-radius,var(--radius,12px));
box-shadow:inset 0 1px 2px oklch(from var(--sth-shadow) l c h / .08);
transition:border-color .16s ease,box-shadow .16s ease;
appearance:none;
}
.cf-saas-trial-hero .sth-field::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-saas-trial-hero .sth-field:focus{outline:none;border-color:var(--sth-focus);box-shadow:0 0 0 3px oklch(from var(--sth-focus) l c h / .35)}
.cf-saas-trial-hero .sth-field[aria-invalid='true']{border-color:var(--danger);box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .22)}
.cf-saas-trial-hero .sth-field:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--ink) 6%,var(--field))}
.cf-saas-trial-hero .sth-btn{
position:relative;
display:inline-flex;
flex-direction:column;
align-items:center;
justify-content:center;
gap:3px;
width:100%;
max-width:100%;
min-height:64px;
padding:10px clamp(20px,3vw,28px);
margin:0;
border:0;
cursor:pointer;
text-align:center;
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);
color:var(--button-ink,var(--cta-ink));
text-shadow:var(--button-text-shadow,none);
background:linear-gradient(oklch(from var(--sth-btn) calc(l + .04) c h),oklch(from var(--sth-btn-2) calc(l - .02) c h));
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--sth-btn) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--sth-btn) calc(l - .16) c h),0 1px 2px oklch(from var(--sth-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--sth-shadow) l c h / .45));
transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
-webkit-tap-highlight-color:transparent;
}
.cf-saas-trial-hero .sth-btn-label{font-size:clamp(1.125rem,1.55vw,1.3125rem);line-height:1.15;text-wrap:balance}
.cf-saas-trial-hero .sth-row .sth-btn{flex:1 1 auto;width:auto}
.cf-saas-trial-hero .sth-btn-sub{font-family:var(--font-body);font-size:.875rem;line-height:1.25;font-weight:600;text-transform:none;text-wrap:balance}
.cf-saas-trial-hero .sth-btn:hover:not(:disabled),.cf-saas-trial-hero .sth-btn.is-hover:not(:disabled){
transform:translateY(-1px);
background:linear-gradient(oklch(from var(--sth-btn) calc(l - .01) c h),oklch(from var(--sth-btn-2) calc(l - .07) c h));
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--sth-btn) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--sth-btn) calc(l - .2) c h),0 1px 2px oklch(from var(--sth-shadow) l c h / .34),0 10px 20px -6px oklch(from var(--sth-shadow) l c h / .55));
}
.cf-saas-trial-hero .sth-btn:active:not(:disabled),.cf-saas-trial-hero .sth-btn.is-active:not(:disabled){
transform:translateY(1px);
background:linear-gradient(oklch(from var(--sth-btn) calc(l - .06) c h),oklch(from var(--sth-btn-2) calc(l - .1) c h));
box-shadow:inset 0 2px 4px oklch(from var(--sth-btn) calc(l - .24) c h / .5),inset 0 -2px 0 oklch(from var(--sth-btn) calc(l - .18) c h),0 1px 1px oklch(from var(--sth-shadow) l c h / .3);
}
.cf-saas-trial-hero .sth-btn:focus-visible{outline:3px solid var(--sth-focus);outline-offset:3px}
.cf-saas-trial-hero .sth-btn:disabled{
cursor:not-allowed;
transform:none;
color:var(--button-2-ink,var(--secondary-ink));
text-shadow:none;
background:var(--button-2-bg,var(--secondary));
box-shadow:inset 0 -2px 0 oklch(from var(--button-2-bg,var(--secondary)) calc(l - .1) c h);
}
.cf-saas-trial-hero .sth-error{margin:10px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
.cf-saas-trial-hero .sth-error svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-saas-trial-hero .sth-assure{list-style:none;margin:14px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px 20px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted)}
.cf-saas-trial-hero .sth-assure svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;color:var(--success)}
.cf-saas-trial-hero .sth-figure{margin:0}
.cf-saas-trial-hero .sth-stage{position:relative;padding:0 0 clamp(24px,4vw,56px)}
.cf-saas-trial-hero .sth-stage::before{
content:'';
position:absolute;
z-index:0;
top:18%;
bottom:0;
left:12%;
right:calc(-1 * max(var(--sth-gutter),(100vw - 1120px) / 2));
background:color-mix(in oklch,var(--accent-fill,var(--accent)) 14%,var(--surface));
border:1px solid oklch(from var(--accent-fill,var(--accent)) l c h / .18);
border-right:0;
border-radius:var(--radius,12px) 0 0 var(--radius,12px);
}
.cf-saas-trial-hero .sth-frame{
position:relative;
z-index:1;
overflow:hidden;
background:var(--card);
border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));
border-radius:var(--card-radius,var(--radius,14px));
box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--sth-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--sth-shadow) l c h / .32)));
}
.cf-saas-trial-hero .sth-frame::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:inset 0 1px 0 oklch(from var(--card) calc(l + .04) c h / .6)}
.cf-saas-trial-hero .sth-chrome{display:flex;align-items:center;gap:12px;height:40px;padding:0 14px;background:color-mix(in oklch,var(--ink) 5%,var(--card));border-bottom:1px solid oklch(from var(--ink) l c h / .1)}
.cf-saas-trial-hero .sth-dots{display:flex;gap:7px;flex:0 0 auto}
.cf-saas-trial-hero .sth-dots i{display:block;width:10px;height:10px;border-radius:50%;background:color-mix(in oklch,var(--ink) 22%,var(--card))}
.cf-saas-trial-hero .sth-frame-title{flex:1 1 auto;min-width:0;padding-right:44px;text-align:center;font-size:.875rem;line-height:1.2;font-weight:700;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cf-saas-trial-hero .sth-frame-title svg{display:inline-block;vertical-align:-0.2em;margin-inline-end:.4em}
.cf-saas-trial-hero .sth-img{display:block;width:100%;height:auto;aspect-ratio:16 / 10;object-fit:cover;object-position:top center;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-saas-trial-hero .sth-cap{position:relative;z-index:1;margin:16px 0 0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:balance}
.cf-saas-trial-hero .sth-logos{margin-top:clamp(48px,6vw,72px);display:flex;flex-direction:column;align-items:center;gap:16px}
.cf-saas-trial-hero .sth-logos-label{margin:0;text-align:center;font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.cf-saas-trial-hero .sth-logos ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:20px 40px}
.cf-saas-trial-hero .sth-logos img{display:block;height:28px;width:auto;max-width:140px;object-fit:contain}
.cf-saas-trial-hero .sth-bar{
position:fixed;
top:0;
left:0;
right:0;
z-index:60;
background:var(--card);
color:var(--ink);
font-family:var(--font-body);
border-bottom:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));
box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--sth-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--sth-shadow) l c h / .2));
animation:cf-sth-drop .3s cubic-bezier(.2,.7,.2,1) both;
}
.cf-saas-trial-hero .sth-bar-inner{max-width:calc(1120px + 2 * var(--sth-gutter));margin:0 auto;padding:10px var(--sth-gutter);min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.cf-saas-trial-hero .sth-bar-title{margin:0;min-width:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.0625rem;line-height:1.2;color:var(--ink);text-wrap:balance}
.cf-saas-trial-hero .sth-btn--bar{flex-direction:row;width:auto;min-height:48px;padding:0 22px;flex:0 0 auto}
.cf-saas-trial-hero .sth-btn--bar .sth-btn-label{font-size:1.0625rem}
.cf-saas-trial-hero .sth-panel[hidden]{display:none}
.cf-saas-trial-hero .sth-panel-inner{max-width:calc(46rem + 2 * var(--sth-gutter));margin:0 auto;padding:4px var(--sth-gutter) 20px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start}
.cf-saas-trial-hero .sth-close{
width:44px;
height:44px;
margin-top:30px;
display:inline-flex;
align-items:center;
justify-content:center;
border:1px solid var(--button-2-border,transparent);
cursor:pointer;
border-radius:var(--button-radius,var(--radius,12px));
background:var(--button-2-bg,var(--secondary));
color:var(--button-2-ink,var(--secondary-ink));
box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--sth-shadow) l c h / .25)));
transition:background .16s ease,transform .16s ease;
}
.cf-saas-trial-hero .sth-close:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
.cf-saas-trial-hero .sth-close:active{transform:translateY(1px)}
.cf-saas-trial-hero .sth-close:focus-visible{outline:3px solid var(--sth-focus);outline-offset:3px}
@media (max-width:559px){
.cf-saas-trial-hero .sth-bar-title{display:none}
.cf-saas-trial-hero .sth-btn--bar{flex:1 1 auto;width:100%}
}
@keyframes cf-sth-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-sth-drop{from{transform:translateY(-100%)}to{transform:none}}
.cf-saas-trial-hero .sth-reveal{animation:cf-sth-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--d,0s)}
@media (prefers-reduced-motion:reduce){
.cf-saas-trial-hero .sth-reveal,.cf-saas-trial-hero .sth-bar{animation:none}
.cf-saas-trial-hero .sth-btn,.cf-saas-trial-hero .sth-close,.cf-saas-trial-hero .sth-field{transition:none}
.cf-saas-trial-hero .sth-btn:hover:not(:disabled),.cf-saas-trial-hero .sth-btn.is-hover:not(:disabled),.cf-saas-trial-hero .sth-btn:active:not(:disabled),.cf-saas-trial-hero .sth-btn.is-active:not(:disabled){transform:none}
}
`;
pieces/hero/saas-trial-hero/specimen.tsx 36 lines
import __studioImaged83cc02d from "../assets/6cd24fb1a2602779.webp";
import * as React from "react";
import { SaasTrialHero, type SaasTrialHeroProps } from "../saas-trial-hero";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled", "error"];
export default function SaasTrialHeroSpecimen({ state = "default" }: { state?: SaasTrialHeroProps["state"] }) {
const sample = defaults.sample;
return (
<SaasTrialHero
state={state}
headline={sample.headline}
highlight="a clear plan"
deck={`Try ${sample.name} free. ${sample.lead}`}
actionTitle="Tell us where to send your login"
emailLabel="Your best email"
emailPlaceholder="you@example.com"
buttonLabel="Send my free trial"
buttonSubLabel={`Try it free · then ${sample.price} once`}
reassurance={sample.reassurance}
steps={[
{ title: "Map every page in one sitting", body: sample.items[0].detail },
{ title: "Write copy that asks for the click", body: sample.items[1].detail },
]}
screenshotImage={slot("screenshot", __studioImaged83cc02d)}
screenshotAlt={`${sample.name} funnel map showing each page of the funnel in order`}
frameLabel={sample.name}
screenshotCaption="Every page of your funnel, in order, on one screen."
sticky
stickyTitle={sample.name}
stickyLabel="Send my free trial"
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalSaasTrialHero |
string |
|
highlight OptionalSaasTrialHero |
string |
|
deck OptionalSaasTrialHero |
string |
|
actionTitle OptionalSaasTrialHero |
string |
|
steps OptionalSaasTrialHero |
SaasTrialHeroStep[] |
|
emailLabel OptionalSaasTrialHero |
string |
|
emailPlaceholder OptionalSaasTrialHero |
string |
|
buttonLabel OptionalSaasTrialHero |
string |
|
buttonSubLabel OptionalSaasTrialHero |
string |
|
reassurance OptionalSaasTrialHero |
string[] |
|
screenshotImage OptionalSaasTrialHero |
string |
|
screenshotAlt OptionalSaasTrialHero |
string |
|
frameLabel OptionalSaasTrialHero |
string |
|
screenshotCaption OptionalSaasTrialHero |
string |
|
logos OptionalSaasTrialHero |
SaasTrialHeroLogo[] |
|
logosLabel OptionalSaasTrialHero |
string |
|
sticky OptionalSaasTrialHero |
boolean |
|
stickyTitle OptionalSaasTrialHero |
string |
|
stickyLabel OptionalSaasTrialHero |
string |
|
copy OptionalSaasTrialHero |
{
required?: string;
invalid?: string;
close?: string;
bar?: string;
} |
|
onSubmit OptionalSaasTrialHero |
(values: { email: string }) => void |
|
onAction OptionalSaasTrialHero |
() => void |
|
state OptionalSaasTrialHero |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalSaasTrialHero |
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-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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
screenshot- An image this piece places.
-
6cd24fb1a2602779.webp
image/webp · 20.4 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB