Instant Demo 1
On-demand demo hero: one big promise, an email gate that opens the demo at the chapter the visitor picks,
Use it in a prompt
Use hero/instant-demo 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/instant-demo.tsx. - Import it and pass your copy and images (Props tab):
import { InstantDemo } from "@/components/funneldna/hero/instant-demo"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/instant-demo/component.tsx 386 lines
// layout: classic-centred-stack
// On-demand demo hero: one big promise, an email gate that opens the demo at the chapter the visitor picks,
// and a quieter "book a live demo" path for buyers who want a person first.
import React, { useId, useState } from "react";
import { AlertCircle, Lock } from "lucide-react";
export type InstantDemoChapter = {
/** Timestamp shown in the rail, e.g. "01:40". */
time?: string;
title: string;
detail?: string;
};
export type InstantDemoValues = {
email: string;
/** Index of the chapter the visitor chose to start from (0 when none was picked). */
chapterIndex: number;
/** Timestamp of that chapter, when it has one. */
startAt?: string;
};
export type InstantDemoProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string;
lead?: React.ReactNode;
emailLabel?: string;
emailPlaceholder?: string;
buttonLabel?: string;
/** One short line under the gate (privacy or access note). */
reassurance?: string;
requiredMessage?: string;
invalidMessage?: string;
chaptersHeading?: string;
chaptersHint?: string;
/** Shown once a chapter is picked. Placeholders: {time}, {title}. */
chapterStartLine?: string;
chapterResetLabel?: string;
/** Used for {time} when a chapter has no timestamp. Placeholder: {number}. */
chapterFallback?: string;
chapters?: InstantDemoChapter[];
/** Chapter selected on first render; null starts from the beginning. */
defaultChapter?: number | null;
secondaryPrompt?: string;
secondaryLabel?: string;
/** Destination of the "book a live demo" button. */
secondaryHref?: string;
onSecondaryAction?: () => void;
/** P.S. line under the actions. */
ps?: React.ReactNode;
/** The page's real video embed. When set, the email gate is skipped and the video shows at once. */
video?: React.ReactNode;
/** Called with the validated email and chosen start chapter. The piece never sends data itself. */
onSubmit?: (values: InstantDemoValues) => void;
/** Called when a chapter is picked (use it to seek a supplied video). */
onChapter?: (index: number, chapter: InstantDemoChapter) => void;
state?: "default" | "hover" | "active" | "disabled" | "error";
className?: string;
};
const DEFAULT_CHAPTERS: InstantDemoChapter[] = [
{ time: "00:00", title: "See the finished result", detail: "What you will have when you are done." },
{ time: "01:30", title: "How it works", detail: "The method, one step at a time." },
{ time: "03:15", title: "Set it up", detail: "Every setting, shown on screen." },
{ time: "05:00", title: "Your first week", detail: "What to do once it is live." },
];
export function InstantDemo(props: InstantDemoProps) {
const {
headline = "Watch the demo now and see exactly how it works",
highlight = "see exactly how it works",
lead = "Pick the part you care about, enter your email and the demo starts right there.",
emailLabel = "Email address",
emailPlaceholder = "you@example.com",
buttonLabel = "Watch The Demo Now",
reassurance = "We respect your inbox. Unsubscribe anytime.",
requiredMessage = "Enter your email so we can open your demo.",
invalidMessage = "That email looks incomplete. Try something like you@example.com.",
chaptersHeading = "Skip straight to the part you need",
chaptersHint = "Tap a chapter and the demo starts right there.",
chapterStartLine = "You'll start at {time}: {title}.",
chapterResetLabel = "Start from the beginning",
chapterFallback = "chapter {number}",
chapters = DEFAULT_CHAPTERS,
defaultChapter = null,
secondaryPrompt = "Want to ask questions as you watch?",
secondaryLabel = "Book a Live Demo",
secondaryHref,
onSecondaryAction,
ps = (
<>
<strong>P.S.</strong> The demo is on demand. Watch it tonight, then book a live demo if you would like a person to walk you through it.
</>
),
video,
onSubmit,
onChapter,
state = "default",
className,
} = props;
const uid = useId();
const emailId = `${uid}-email`;
const errId = `${uid}-error`;
const noteId = `${uid}-note`;
const railId = `${uid}-rail`;
const [email, setEmail] = useState("");
const [error, setError] = useState<string | null>(null);
const [start, setStart] = useState<number | null>(
defaultChapter !== null && defaultChapter >= 0 && defaultChapter < chapters.length ? defaultChapter : null
);
const disabled = state === "disabled";
const shownError = state === "error" ? invalidMessage : error;
const startIdx = start ?? 0;
const picked = start !== null ? chapters[start] : undefined;
function submit(e: React.FormEvent<HTMLFormElement>) {
e.preventDefault();
if (disabled) return;
const value = email.trim();
if (!value) {
setError(requiredMessage);
return;
}
if (!EMAIL_RE.test(value)) {
setError(invalidMessage);
return;
}
setError(null);
onSubmit?.({ email: value, chapterIndex: startIdx, startAt: chapters[startIdx]?.time });
}
function pick(i: number) {
if (disabled) return;
setStart((prev) => (prev === i ? null : i));
onChapter?.(i, chapters[i]);
}
const ctaClass =
"cf-instant-demo__cta" + (state === "hover" ? " is-hover" : "") + (state === "active" ? " is-active" : "");
const secondary = secondaryLabel ? (
secondaryHref ? (
<a className="cf-instant-demo__btn2" href={secondaryHref} onClick={onSecondaryAction}>
{secondaryLabel}
</a>
) : (
<button type="button" className="cf-instant-demo__btn2" onClick={onSecondaryAction} disabled={disabled}>
{secondaryLabel}
</button>
)
) : null;
return (
<div className={"cf-instant-demo" + (className ? " " + className : "")}>
<style>{CSS}</style>
<div className="cf-instant-demo__head">
<h1 className="cf-instant-demo__h cf-instant-demo__reveal">{renderHeadline(headline, highlight)}</h1>
{lead ? (
<p className="cf-instant-demo__lead cf-instant-demo__reveal" style={{ animationDelay: ".07s" }}>
{lead}
</p>
) : null}
</div>
{video ? (
<div className="cf-instant-demo__frame cf-instant-demo__reveal" style={{ animationDelay: ".14s" }}>
{video}
</div>
) : (
<form
className="cf-instant-demo__gate cf-instant-demo__reveal"
style={{ animationDelay: ".14s" }}
onSubmit={submit}
noValidate
>
<label className="cf-instant-demo__label" htmlFor={emailId}>
{emailLabel}
</label>
<div className="cf-instant-demo__row">
<input
id={emailId}
className="cf-instant-demo__field"
type="email"
name="email"
inputMode="email"
autoComplete="email"
placeholder={emailPlaceholder}
value={email}
onChange={(e) => {
setEmail(e.target.value);
if (error) setError(null);
}}
aria-invalid={shownError ? true : undefined}
aria-describedby={shownError ? errId : reassurance ? noteId : undefined}
disabled={disabled}
required
/>
<button type="submit" className={ctaClass} disabled={disabled}>
{buttonLabel}
</button>
</div>
{shownError ? (
<p className="cf-instant-demo__error" id={errId} role="alert">
<AlertCircle className="cf-instant-demo__inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{shownError}
</p>
) : null}
{reassurance ? (
<p className="cf-instant-demo__note" id={noteId}>
<Lock className="cf-instant-demo__inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{reassurance}
</p>
) : null}
</form>
)}
{chapters.length > 0 ? (
<section className="cf-instant-demo__chapters cf-instant-demo__reveal" style={{ animationDelay: ".21s" }}>
<h2 className="cf-instant-demo__h2" id={railId}>
{chaptersHeading}
</h2>
<p className="cf-instant-demo__hint" aria-live="polite">
{picked ? (
<>
{fill(chapterStartLine, {
time: picked.time || fill(chapterFallback, { number: String((start ?? 0) + 1) }),
title: picked.title,
})}{" "}
<button
type="button"
className="cf-instant-demo__reset"
onClick={() => setStart(null)}
disabled={disabled}
>
{chapterResetLabel}
</button>
</>
) : (
chaptersHint
)}
</p>
<ol
className="cf-instant-demo__rail"
aria-labelledby={railId}
style={{ ["--idm-n" as string]: String(chapters.length) } as React.CSSProperties}
>
{chapters.map((ch, i) => (
<li key={i} className="cf-instant-demo__ch" data-on={i >= startIdx ? "true" : "false"}>
<button
type="button"
className="cf-instant-demo__chbtn"
aria-pressed={start === i}
onClick={() => pick(i)}
disabled={disabled}
>
<span className="cf-instant-demo__dot" aria-hidden="true" />
{ch.time ? <span className="cf-instant-demo__time">{ch.time}</span> : null}
<span className="cf-instant-demo__chtitle">{ch.title}</span>
{ch.detail ? <span className="cf-instant-demo__chdetail">{ch.detail}</span> : null}
</button>
</li>
))}
</ol>
</section>
) : null}
{secondary ? (
<div className="cf-instant-demo__alt">
{secondaryPrompt ? <p className="cf-instant-demo__alt-text">{secondaryPrompt}</p> : null}
{secondary}
</div>
) : null}
{ps ? <p className="cf-instant-demo__ps">{ps}</p> : null}
</div>
);
}
export default InstantDemo;
const EMAIL_RE = /^[^@ ]+@[^@ ]+[.][^@ .]+$/;
function fill(template: string, vars: Record<string, string>) {
return template.replace(/{(\w+)}/g, (m, key: string) => (key in vars ? vars[key] : m));
}
function renderHeadline(text: string, highlight?: string) {
if (!highlight) return text;
const at = text.indexOf(highlight);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="cf-instant-demo__mark">{highlight}</span>
{text.slice(at + highlight.length)}
</>
);
}
// Marker default #fae37c is the documented house highlighter fallback.
const CSS = `
.cf-instant-demo{--idm-marker:color-mix(in oklab, var(--marker, #fae37c) 85%, transparent);--idm-track:oklch(from var(--ink) l c h / .16);--idm-on:var(--accent-fill, var(--accent));--idm-gap:16px;box-sizing:border-box;width:100%;max-width:1120px;margin-inline:auto;font-family:var(--font-body);color:var(--ink);text-align:center}
.cf-instant-demo *,.cf-instant-demo *::before,.cf-instant-demo *::after{box-sizing:border-box}
.cf-instant-demo__head{max-width:56rem;margin:0 auto}
.cf-instant-demo__h{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;color:var(--ink);text-wrap:balance}
.cf-instant-demo__mark{background-image:linear-gradient(transparent 52%, var(--idm-marker) 52%, var(--idm-marker) 94%, transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .06em;margin:0 -.02em;border-radius:.1em .3em .16em .28em}
.cf-instant-demo__lead{margin:22px auto 0;max-width:44rem;font-size:clamp(1.125rem, 1.5vw, 1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-instant-demo__gate{max-width:44rem;margin:32px auto 0;text-align:left}
.cf-instant-demo__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-instant-demo__row{display:flex;gap:12px;align-items:stretch}
.cf-instant-demo__field{flex:1 1 auto;min-width:0;height:64px;padding:0 20px;font:inherit;font-size:1.0625rem;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));outline:none;transition:border-color .16s ease, box-shadow .16s ease}
.cf-instant-demo__field::placeholder{color:color-mix(in oklch, var(--field-ink) 65%, var(--field));opacity:1}
.cf-instant-demo__field:hover:not(:disabled){border-color:color-mix(in oklch, var(--ink) 38%, transparent)}
.cf-instant-demo__field:focus{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-instant-demo__field[aria-invalid="true"]{border-color:var(--danger)}
.cf-instant-demo__field[aria-invalid="true"]:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-instant-demo__field:disabled{background:color-mix(in oklch, var(--field-ink) 6%, var(--field));cursor:not-allowed}
.cf-instant-demo__cta{--b:var(--button-bg, var(--cta));--b2:var(--button-bg-2, var(--cta-2));--sh:var(--shadow, oklch(.22 .03 260));flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:64px;padding:0 28px;border:0;border-radius:var(--button-radius, var(--radius, 12px));background:linear-gradient(oklch(from var(--b) calc(l + .04) c h), oklch(from var(--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;white-space:nowrap;text-shadow:var(--button-text-shadow, none);cursor:pointer;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--b) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--b) calc(l - .16) c h), 0 1px 2px oklch(from var(--sh) l c h / .3), 0 8px 16px -6px oklch(from var(--sh) l c h / .45));transition:transform .16s ease, box-shadow .16s ease, background .16s ease}
.cf-instant-demo__cta:hover:not(:disabled),.cf-instant-demo__cta.is-hover{background:linear-gradient(oklch(from var(--b) calc(l - .01) c h), oklch(from var(--b2) calc(l - .07) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--b) calc(l + .1) c h / .6), inset 0 -3px 0 oklch(from var(--b) calc(l - .2) c h), 0 1px 2px oklch(from var(--sh) l c h / .32), 0 10px 18px -6px oklch(from var(--sh) l c h / .52)}
.cf-instant-demo__cta:active:not(:disabled),.cf-instant-demo__cta.is-active{background:linear-gradient(oklch(from var(--b) calc(l - .05) c h), oklch(from var(--b2) calc(l - .08) c h));transform:translateY(1px);box-shadow:inset 0 2px 3px oklch(from var(--b) calc(l - .22) c h / .55), inset 0 -2px 0 oklch(from var(--b) calc(l - .16) c h), 0 1px 1px oklch(from var(--sh) l c h / .3)}
.cf-instant-demo__cta:focus-visible{outline:3px solid var(--field-focus, var(--accent));outline-offset:3px}
.cf-instant-demo__cta:disabled{background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--shadow-sm, 0 1px 2px oklch(.22 .03 260 / .2));cursor:not-allowed;transform:none}
.cf-instant-demo__inline-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;flex:none}
.cf-instant-demo__error{margin:8px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
.cf-instant-demo__note{margin:12px 0 0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-instant-demo__frame{max-width:52rem;margin:32px auto 0;aspect-ratio:16 / 9;border-radius:12px;overflow:hidden;background:var(--band);box-shadow:var(--shadow-lg, 0 2px 4px oklch(.22 .03 260 / .22), 0 12px 24px -8px oklch(.22 .03 260 / .32))}
.cf-instant-demo__frame > *{display:block;width:100%;height:100%;border:0}
.cf-instant-demo__chapters{margin:64px auto 0}
.cf-instant-demo__h2{margin:0;font-family:var(--font-display);font-weight:var(--display-weight, 800);text-transform:var(--display-case, none);letter-spacing:-0.01em;font-size:clamp(1.3125rem, 1.8vw, 1.625rem);line-height:1.15;color:var(--ink);text-wrap:balance}
.cf-instant-demo__hint{margin:8px auto 0;max-width:44rem;min-height:1.4em;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-instant-demo__reset{padding:0;border:0;background:none;font:inherit;font-weight:700;color:var(--link, var(--accent));text-decoration:underline;text-decoration-color:oklch(from var(--link, var(--accent)) l c h / .45);text-underline-offset:.18em;cursor:pointer}
.cf-instant-demo__reset:hover{color:oklch(from var(--link, var(--accent)) calc(l - .08) c h);text-decoration-color:currentColor}
.cf-instant-demo__reset:focus-visible{outline:3px solid var(--field-focus, var(--accent));outline-offset:2px;border-radius:4px}
.cf-instant-demo__rail{list-style:none;margin:24px 0 0;padding:0;display:grid;grid-template-columns:repeat(var(--idm-n, 4), minmax(0, 1fr));gap:var(--idm-gap)}
.cf-instant-demo__ch{position:relative;display:flex;min-width:0}
.cf-instant-demo__ch:not(:last-child)::after{content:"";position:absolute;z-index:1;top:17px;left:calc(50% + 11px);width:calc(100% + var(--idm-gap) - 22px);height:3px;border-radius:3px;background:var(--idm-track);pointer-events:none;transition:background-color .3s ease}
.cf-instant-demo__ch[data-on="true"]:not(:last-child)::after{background:var(--idm-on)}
.cf-instant-demo__chbtn{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;min-width:0;padding:44px 16px 16px;border:0;border-radius:12px;background:transparent;color:var(--ink);font:inherit;text-align:center;cursor:pointer;transition:background-color .16s ease, box-shadow .16s ease}
.cf-instant-demo__chbtn:hover:not(:disabled){background:color-mix(in oklch, var(--ink) 4%, var(--surface))}
.cf-instant-demo__chbtn[aria-pressed="true"]{background:color-mix(in oklch, var(--accent) 8%, var(--surface));box-shadow:inset 0 0 0 1px oklch(from var(--accent) l c h / .32)}
.cf-instant-demo__chbtn:focus-visible{outline:3px solid var(--field-focus, var(--accent));outline-offset:2px}
.cf-instant-demo__chbtn:disabled{cursor:not-allowed}
.cf-instant-demo__dot{position:absolute;z-index:2;top:9px;left:50%;width:18px;height:18px;margin-left:-9px;border-radius:999px;background:var(--surface);box-shadow:inset 0 0 0 3px var(--idm-track);transition:background-color .3s ease, box-shadow .3s ease, transform .16s ease}
.cf-instant-demo__ch[data-on="true"] .cf-instant-demo__dot{background:var(--idm-on);box-shadow:0 0 0 4px color-mix(in oklch, var(--accent-fill, var(--accent)) 18%, var(--surface))}
.cf-instant-demo__chbtn[aria-pressed="true"] .cf-instant-demo__dot{transform:scale(1.15)}
.cf-instant-demo__time{font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem, 1.8vw, 1.625rem);line-height:1.15;letter-spacing:-0.01em;font-variant-numeric:tabular-nums lining-nums;font-feature-settings:"lnum" 1, "tnum" 1;color:var(--accent)}
.cf-instant-demo__chtitle{font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.3;font-weight:800;color:var(--ink);text-wrap:balance}
.cf-instant-demo__chdetail{font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-instant-demo__alt{width:fit-content;max-width:100%;margin:48px auto 0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px 16px;text-align:center}
.cf-instant-demo__alt-text{flex:0 1 auto;margin:0;font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.4;font-weight:600;color:var(--ink);text-align:center;text-wrap:balance}
.cf-instant-demo__btn2{display:inline-flex;align-items:center;justify-content:center;min-height:56px;padding:0 24px;border:1px solid var(--button-2-border, transparent);border-radius:var(--button-radius, var(--radius, 12px));background:var(--button-2-bg, var(--secondary));color:var(--button-2-ink, var(--secondary-ink));font-family:var(--button-font, var(--font-display));font-weight:var(--button-weight, 800);text-transform:var(--button-case, none);font-size:1.125rem;line-height:1.15;text-decoration:none;white-space:nowrap;cursor:pointer;box-shadow:var(--button-2-shadow, var(--shadow-sm));transition:transform .16s ease, background-color .16s ease, box-shadow .16s ease}
.cf-instant-demo__btn2:hover{background:oklch(from var(--button-2-bg, var(--secondary)) calc(l - .04) c h);transform:translateY(-1px)}
.cf-instant-demo__btn2:active{transform:translateY(1px);box-shadow:none}
.cf-instant-demo__btn2:focus-visible{outline:3px solid var(--field-focus, var(--accent));outline-offset:3px}
.cf-instant-demo__btn2:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:1;color:color-mix(in oklch, var(--button-2-ink, var(--secondary-ink)) 70%, var(--button-2-bg, var(--secondary)))}
.cf-instant-demo__chbtn:disabled .cf-instant-demo__chtitle,.cf-instant-demo__chbtn:disabled .cf-instant-demo__time{color:var(--muted)}
.cf-instant-demo__ps{margin:24px auto 0;max-width:40rem;font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.5;font-weight:400;color:var(--ink);text-wrap:pretty}
.cf-instant-demo__ps strong{font-weight:800}
@keyframes cf-instant-demo-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-instant-demo__reveal{animation:cf-instant-demo-rise .45s cubic-bezier(.2,.7,.2,1) both}
@media (max-width:760px){
.cf-instant-demo{--idm-gap:4px}
.cf-instant-demo__chapters{margin-top:48px;max-width:44rem;text-align:left}
.cf-instant-demo__hint{margin-left:0}
.cf-instant-demo__rail{grid-template-columns:1fr;text-align:left;margin-top:16px}
.cf-instant-demo__chbtn{align-items:flex-start;text-align:left;padding:12px 14px 14px 48px}
.cf-instant-demo__dot{top:15px;left:14px;margin-left:0}
.cf-instant-demo__ch:not(:last-child)::after{top:33px;left:21.5px;width:3px;height:calc(100% + var(--idm-gap) - 18px)}
.cf-instant-demo__alt{margin-top:40px}
}
@media (max-width:640px){
.cf-instant-demo__row{flex-direction:column}
.cf-instant-demo__cta{width:100%;white-space:normal;text-align:center}
.cf-instant-demo__alt{flex-direction:column;width:100%}
.cf-instant-demo__btn2{width:100%;white-space:normal;text-align:center}
}
@media (prefers-reduced-motion:reduce){
.cf-instant-demo .cf-instant-demo__reveal{animation:none}
.cf-instant-demo .cf-instant-demo__cta,.cf-instant-demo .cf-instant-demo__btn2,.cf-instant-demo .cf-instant-demo__chbtn,.cf-instant-demo .cf-instant-demo__dot,.cf-instant-demo .cf-instant-demo__field,.cf-instant-demo .cf-instant-demo__ch::after{transition:none}
.cf-instant-demo .cf-instant-demo__cta:hover,.cf-instant-demo .cf-instant-demo__cta.is-hover,.cf-instant-demo .cf-instant-demo__cta:active,.cf-instant-demo .cf-instant-demo__cta.is-active,.cf-instant-demo .cf-instant-demo__btn2:hover,.cf-instant-demo .cf-instant-demo__btn2:active{transform:none}
}
`;
pieces/hero/instant-demo/specimen.tsx 42 lines
import React from "react";
import { InstantDemo } from "../instant-demo";
import defaults from "../../studio-defaults.json";
export const states = ["default", "hover", "active", "disabled", "error"];
type SpecimenState = "default" | "hover" | "active" | "disabled" | "error";
export default function InstantDemoSpecimen({ state = "default" }: { state?: SpecimenState }) {
const s = defaults.sample;
const [guide, workbook, checklist] = s.items;
return (
<InstantDemo
state={state}
headline="Watch the demo now and see your first funnel take shape"
highlight="your first funnel"
lead={`See ${s.name} in action: plan your funnel, write your page copy and check every step before you launch.`}
emailLabel="Where should we send your demo?"
emailPlaceholder="you@example.com"
buttonLabel="Watch The Demo Now"
reassurance={s.registration.privacy}
chaptersHeading="Skip straight to the part you need"
chaptersHint="Tap a chapter and your demo starts right there."
chapterStartLine="You'll start at {time}: {title}."
chapterResetLabel="Start from the beginning"
chapters={[
{ time: "00:00", title: "Map your offer", detail: `The ${guide.name}, page by page.` },
{ time: "01:45", title: "Write your page copy", detail: `Headline, offer and call to action in the ${workbook.name}.` },
{ time: "03:30", title: "Check every step", detail: `Links, forms and next steps with the ${checklist.name}.` },
{ time: "05:10", title: "Plan your launch day", detail: "What to do the day your funnel goes live." },
]}
secondaryPrompt="Want to ask questions as you watch?"
secondaryLabel="Book a Live Demo"
secondaryHref="#book-live-demo"
ps={
<>
<strong>P.S.</strong> Like what you see? Get {s.name} for <strong>just {s.price}</strong>: one payment, yours to keep, and backed by our {s.guarantee}.
</>
}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalInstantDemo |
string |
|
highlight OptionalInstantDemo |
string |
|
lead OptionalInstantDemo |
React.ReactNode |
|
emailLabel OptionalInstantDemo |
string |
|
emailPlaceholder OptionalInstantDemo |
string |
|
buttonLabel OptionalInstantDemo |
string |
|
reassurance OptionalInstantDemo |
string |
|
requiredMessage OptionalInstantDemo |
string |
|
invalidMessage OptionalInstantDemo |
string |
|
chaptersHeading OptionalInstantDemo |
string |
|
chaptersHint OptionalInstantDemo |
string |
|
chapterStartLine OptionalInstantDemo |
string |
|
chapterResetLabel OptionalInstantDemo |
string |
|
chapterFallback OptionalInstantDemo |
string |
|
chapters OptionalInstantDemo |
InstantDemoChapter[] |
|
defaultChapter OptionalInstantDemo |
number | null |
|
secondaryPrompt OptionalInstantDemo |
string |
|
secondaryLabel OptionalInstantDemo |
string |
|
secondaryHref OptionalInstantDemo |
string |
|
onSecondaryAction OptionalInstantDemo |
() => void |
|
ps OptionalInstantDemo |
React.ReactNode |
|
video OptionalInstantDemo |
React.ReactNode |
|
onSubmit OptionalInstantDemo |
(values: InstantDemoValues) => void |
|
onChapter OptionalInstantDemo |
(index: number, chapter: InstantDemoChapter) => void |
|
state OptionalInstantDemo |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalInstantDemo |
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.
--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.
This piece reads no image slots.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB