Free Training Page 1
The open lesson: an editorial spread that teaches the whole method up front, ungated, with a reading bar that
Use it in a prompt
Use content/free-training-page 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/content/free-training-page.tsx. - Import it and pass your copy and images (Props tab):
import { FreeTrainingPage } from "@/components/funneldna/content/free-training-page"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/free-training-page/component.tsx 514 lines
// layout: magazine-spread
// The open lesson: an editorial spread that teaches the whole method up front, ungated, with a reading bar that
// fills as they read. Once the reader has been given real value, it asks for part two with one email field.
import * as React from "react"
import { AlertCircle, Clock, Loader2, Lock } from "lucide-react"
export type LessonPoint = {
title: string
/** Bold lead-in sentence that opens the point. */
lead: string
/** Short one-sentence paragraphs that follow the lead-in. */
lines?: string[]
/** Optional single-word line set large for emphasis, e.g. "Sent." */
punch?: string
}
export type DiagramKey = {
label: string
detail: string
}
export type PartTwoCopy = {
heading: string
/** The next asset, named. */
assetName: string
body?: string
label: string
placeholder: string
buttonLabel: string
loadingLabel: string
privacy?: string
emailRequired: string
emailInvalid: string
submitError: string
}
export type FreeTrainingPageProps = {
headline?: string
/** The phrase inside the headline that gets the marker stroke. */
headlineMark?: string
lead?: string
byline?: string
readTime?: string
/** Quiet chip telling the reader nothing is gated. */
freeNote?: string
/** Slot "scene": the diagram of the idea. */
diagramImage?: string
diagramAlt?: string
diagramCaption?: string
/** Legend under the diagram, numbered to match the points. */
diagramKey?: DiagramKey[]
points?: LessonPoint[]
pullLine?: string
pullCredit?: string
/** Accessible name of the reading-progress bar. */
progressLabel?: string
ask?: Partial<PartTwoCopy>
/** Slot "product": cover of the next asset, transparent background. */
nextAssetImage?: string
nextAssetImageAlt?: string
/** Called with the validated email; return a promise to keep the loader up. */
onSubmit?: (values: { email: string }) => void | Promise<unknown>
state?: "default" | "hover" | "active" | "disabled" | "error"
className?: string
}
export function FreeTrainingPage(props: FreeTrainingPageProps) {
const {
headline = DEFAULT_HEADLINE,
headlineMark = DEFAULT_MARK,
lead = DEFAULT_LEAD,
byline = "By Replyrate",
readTime = "4-minute read",
freeNote = "Free lesson · no email needed",
diagramImage,
diagramAlt = "",
diagramCaption = DEFAULT_CAPTION,
diagramKey = DEFAULT_KEY,
points = DEFAULT_POINTS,
pullLine = DEFAULT_PULL,
pullCredit = "The Replyrate rule",
progressLabel = "Lesson reading progress",
nextAssetImage,
nextAssetImageAlt = "",
onSubmit,
state = "default",
className,
} = props
const ask: PartTwoCopy = { ...DEFAULT_ASK, ...props.ask }
const uid = React.useId()
const headId = `${uid}-head`
const askId = `${uid}-ask`
const emailId = `${uid}-email`
const errorId = `${uid}-error`
const privacyId = `${uid}-privacy`
// Reading progress: fills as the lesson passes the reader's eye line.
const lessonRef = React.useRef<HTMLDivElement>(null)
const [pct, setPct] = React.useState(0)
React.useEffect(() => {
const el = lessonRef.current
if (!el) return
let frame = 0
const measure = () => {
frame = 0
const rect = el.getBoundingClientRect()
const vh = window.innerHeight || document.documentElement.clientHeight || 1
const ratio = (vh * 0.8 - rect.top) / Math.max(rect.height, 1)
const next = Math.round(Math.min(1, Math.max(0, ratio)) * 100)
setPct((prev) => (prev === next ? prev : next))
}
const queue = () => {
if (!frame) frame = window.requestAnimationFrame(measure)
}
measure()
document.addEventListener("scroll", queue, { passive: true, capture: true })
window.addEventListener("resize", queue, { passive: true })
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(queue)
observer?.observe(el)
return () => {
document.removeEventListener("scroll", queue, { capture: true })
window.removeEventListener("resize", queue)
observer?.disconnect()
if (frame) window.cancelAnimationFrame(frame)
}
}, [])
const [email, setEmail] = React.useState("")
const [touched, setTouched] = React.useState(false)
const [attempted, setAttempted] = React.useState(false)
const [submitting, setSubmitting] = React.useState(false)
const [failed, setFailed] = React.useState(false)
const inputRef = React.useRef<HTMLInputElement>(null)
const mounted = React.useRef(true)
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
const value = email.trim()
const valid = EMAIL_PATTERN.test(value)
const typedInvalid = value !== "" && !valid
const forcedError = state === "error"
const shown = touched || attempted || forcedError
const error = failed
? ask.submitError
: value === "" && shown
? ask.emailRequired
: typedInvalid && shown
? ask.emailInvalid
: ""
const disabled = state === "disabled" || typedInvalid || submitting
const force = state === "hover" ? " is-hover" : state === "active" ? " is-active" : ""
const describedBy = [error ? errorId : "", ask.privacy ? privacyId : ""].filter(Boolean).join(" ")
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
setAttempted(true)
if (submitting || state === "disabled") return
if (!valid) {
inputRef.current?.focus()
return
}
setFailed(false)
setSubmitting(true)
try {
await new Promise<void>((resolve) => window.requestAnimationFrame(() => resolve()))
await onSubmit?.({ email: value })
} catch {
if (mounted.current) setFailed(true)
} finally {
if (mounted.current) setSubmitting(false)
}
}
return (
<section
className={`cf-free-training-page${className ? ` ${className}` : ""}`}
aria-labelledby={headId}
data-reading={pct > 0 ? "" : undefined}
style={{ "--ftp-p": pct } as React.CSSProperties}
>
<style>{CSS}</style>
<div
className="ftp-progress"
role="progressbar"
aria-label={progressLabel}
aria-valuemin={0}
aria-valuemax={100}
aria-valuenow={pct}
>
<span className="ftp-progress-fill" />
<span className="ftp-progress-dot" />
</div>
<div className="ftp-wrap">
<div ref={lessonRef} className="ftp-lesson">
<header className="ftp-head ftp-rise">
<h2 id={headId} className="ftp-h2">
{withMark(headline, headlineMark)}
</h2>
{lead && <p className="ftp-lead">{lead}</p>}
{(byline || readTime || freeNote) && (
<p className="ftp-meta">
{byline && <span className="ftp-by">{byline}</span>}
{readTime && (
<span className="ftp-time">
<Clock size={16} strokeWidth={2.5} aria-hidden="true" />
{readTime}
</span>
)}
{freeNote && <span className="ftp-chip">{freeNote}</span>}
</p>
)}
</header>
<div className={`ftp-spread${diagramImage ? "" : " is-solo"}`}>
{diagramImage && (
<figure className="ftp-figure ftp-rise" style={{ "--i": 1 } as React.CSSProperties}>
<div className="ftp-frame">
<img src={diagramImage} alt={diagramAlt} width={1200} height={800} loading="lazy" decoding="async" />
</div>
{(diagramCaption || diagramKey.length > 0) && (
<figcaption className="ftp-caption">
{diagramCaption && <span className="ftp-caption-line">{diagramCaption}</span>}
{diagramKey.length > 0 && (
<ol className="ftp-key" role="list">
{diagramKey.map((key, i) => (
<li key={key.label}>
<span className="ftp-key-num" aria-hidden="true">
{i + 1}
</span>
<span>
<strong>{key.label}</strong> {key.detail}
</span>
</li>
))}
</ol>
)}
</figcaption>
)}
</figure>
)}
<ol className="ftp-points" role="list">
{points.map((point, i) => (
<li key={point.title} className="ftp-point ftp-rise" style={{ "--i": i + 2 } as React.CSSProperties}>
<span className="ftp-num" aria-hidden="true">
{i + 1}
</span>
<div className="ftp-point-body">
<h3 className="ftp-h3">{point.title}</h3>
<p>
<strong className="ftp-leadin">{point.lead}</strong>
{point.lines?.[0] ? ` ${point.lines[0]}` : ""}
</p>
{point.lines?.slice(1).map((line) => (
<p key={line}>{line}</p>
))}
{point.punch && <p className="ftp-punch">{point.punch}</p>}
</div>
</li>
))}
</ol>
</div>
{pullLine && (
<figure className="ftp-pull">
<blockquote>
<p>
<span className="ftp-q" aria-hidden="true">
{"\u201C"}
</span>
{pullLine}
<span className="ftp-q" aria-hidden="true">
{"\u201D"}
</span>
</p>
</blockquote>
{pullCredit && <figcaption>{pullCredit}</figcaption>}
</figure>
)}
</div>
<div className={`ftp-ask${nextAssetImage ? " has-cover" : ""}`} role="region" aria-labelledby={askId}>
{nextAssetImage && (
<img
className="ftp-cover"
src={nextAssetImage}
alt={nextAssetImageAlt}
width={480}
height={480}
loading="lazy"
decoding="async"
/>
)}
<h3 id={askId} className="ftp-ask-h">
{ask.heading}
</h3>
{ask.assetName && <p className="ftp-asset">{ask.assetName}</p>}
{ask.body && <p className="ftp-ask-body">{ask.body}</p>}
<form className="ftp-form" noValidate onSubmit={handleSubmit}>
<label htmlFor={emailId} className="ftp-label">
{ask.label}
</label>
<input
ref={inputRef}
id={emailId}
className="ftp-input"
type="email"
name="email"
inputMode="email"
autoComplete="email"
required
placeholder={ask.placeholder}
value={email}
onChange={(event) => {
setEmail(event.target.value)
if (failed) setFailed(false)
}}
onBlur={() => setTouched(true)}
aria-invalid={error ? true : undefined}
aria-describedby={describedBy || undefined}
/>
{error && (
<p id={errorId} className="ftp-error" role="alert">
<AlertCircle size={16} strokeWidth={2.5} aria-hidden="true" />
{error}
</p>
)}
<button
type="submit"
className={`ftp-btn${force}`}
disabled={disabled}
aria-busy={submitting ? true : undefined}
>
{submitting ? (
<>
<Loader2 className="ftp-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{ask.loadingLabel}</span>
</>
) : (
ask.buttonLabel
)}
</button>
{ask.privacy && (
<p id={privacyId} className="ftp-privacy">
<Lock size={16} strokeWidth={2.5} aria-hidden="true" />
{ask.privacy}
</p>
)}
</form>
</div>
</div>
</section>
)
}
export default FreeTrainingPage
function withMark(text: string, mark?: string): React.ReactNode {
if (!mark) return text
const at = text.indexOf(mark)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className="ftp-mark">{mark}</span>
{text.slice(at + mark.length)}
</>
)
}
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/
const DEFAULT_HEADLINE = "The cold email that gets a reply is three lines long"
const DEFAULT_MARK = "three lines long"
const DEFAULT_LEAD =
"Here is the whole method, free and unlocked. Read it once, then write your first three-line email before your next coffee."
const DEFAULT_CAPTION = "One email, three jobs. Each line does one thing, then gets out of the way."
const DEFAULT_KEY: DiagramKey[] = [
{ label: "The hook.", detail: "About them, not you." },
{ label: "The proof.", detail: "One reason to trust you." },
{ label: "The ask.", detail: "One small yes." },
]
const DEFAULT_POINTS: LessonPoint[] = [
{
title: "Line one is about them.",
lead: "Open with something only they would recognise.",
lines: ["Their new hire, their launch, the post they wrote on Monday.", "If the line could go to anyone, it goes to the bin."],
punch: "Specific.",
},
{
title: "Line two earns the reply.",
lead: "Give one reason you are worth five seconds.",
lines: ["One client like them, one problem you solved, in plain words.", "Not your history. Not your feature list."],
punch: "Proof.",
},
{
title: "Line three asks for a small yes.",
lead: "Ask a question they can answer from their phone.",
lines: ["Not a call. Not a demo. Just yes or no.", "Small asks are easy to answer."],
punch: "Sent.",
},
]
const DEFAULT_PULL = "If it takes longer to read than to answer, it's too long."
const DEFAULT_ASK: PartTwoCopy = {
heading: "Want part two?",
assetName: "Part 2: The Follow-Up That Gets the Second Reply",
body: "What to send when they don't answer, and exactly when to send it. Same three-line rule, one more email.",
label: "Where should we send part two?",
placeholder: "you@company.com",
buttonLabel: "Teach me the follow-up",
loadingLabel: "Sending part two…",
privacy: "",
emailRequired: "Enter your email so we can send part two.",
emailInvalid: "That email looks incomplete. Check it and try again.",
submitError: "We couldn't send that just now. Please try again.",
}
const S = ".cf-free-training-page"
const CSS = `
${S}{position:relative;overflow-x:clip;background:var(--surface);color:var(--ink);font-family:var(--font-body);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;--ftp-hair:oklch(from var(--ink) l c h / .14);--ftp-shadow:var(--shadow, oklch(0.22 0.03 260))}
${S} *,${S} *::before,${S} *::after{box-sizing:border-box}
${S} :where(h2,h3,p,ol,figure,blockquote,figcaption){margin:0}
${S} :where(ol){padding:0;list-style:none}
${S} img{display:block;max-width:100%}
${S} .ftp-progress{position:sticky;top:var(--ftp-progress-top,0px);z-index:3;height:4px;background:oklch(from var(--ink) l c h / .1)}
${S} .ftp-progress-fill{position:absolute;inset:0;background:var(--accent-fill,var(--accent));transform-origin:0 50%;transform:scaleX(calc(var(--ftp-p,0) / 100))}
${S} .ftp-progress-dot{position:absolute;top:50%;left:calc((100% - 12px) * var(--ftp-p,0) / 100);width:12px;height:12px;border-radius:999px;background:var(--accent-fill,var(--accent));outline:3px solid var(--surface);transform:translateY(-50%);opacity:0}
${S}[data-reading] .ftp-progress-dot{opacity:1}
${S} .ftp-wrap{width:100%;max-width:calc(1120px + 2 * clamp(16px,5vw,48px));margin-inline:auto;padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
${S} .ftp-head{display:grid;gap:clamp(16px,2vw,24px);padding-bottom:clamp(24px,3vw,32px);border-bottom:1px solid var(--ftp-hair)}
${S} .ftp-h2{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}
${S} .ftp-mark{background:linear-gradient(transparent 0 50%,color-mix(in oklch,var(--marker,#fae37c) 85%,transparent) 50% 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .08em;border-radius:.1em}
${S} .ftp-lead{max-width:46rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
${S} .ftp-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted)}
${S} .ftp-by{color:var(--ink);font-weight:800}
${S} .ftp-time svg,${S} .ftp-error svg,${S} .ftp-privacy svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
${S} .ftp-chip{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--card));color:var(--ink);font-size:.875rem;font-weight:800;line-height:1.2}
${S} .ftp-spread{display:grid;gap:clamp(32px,5vw,72px);margin-top:clamp(32px,4vw,48px)}
@media (min-width:960px){${S} .ftp-spread{grid-template-columns:minmax(0,5fr) minmax(0,6fr);align-items:start}${S} .ftp-figure{position:sticky;top:32px}}
${S} .ftp-spread.is-solo{grid-template-columns:minmax(0,46rem)}
${S} .ftp-frame{overflow:hidden;border-radius:12px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
${S} .ftp-frame img{width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;object-position:center}
${S} .ftp-caption{display:grid;gap:16px;margin-top:16px}
${S} .ftp-caption-line{font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
${S} .ftp-key{display:grid;gap:8px}
${S} .ftp-key li{display:grid;grid-template-columns:1.25rem minmax(0,1fr);gap:8px;align-items:baseline;font-size:.9375rem;line-height:1.4;color:var(--muted);text-wrap:pretty}
${S} .ftp-key strong{color:var(--ink);font-weight:800}
${S} .ftp-key-num{font-family:var(--font-display);font-weight:800;font-size:.875rem;color:var(--accent);font-variant-numeric:tabular-nums}
${S} .ftp-points{display:grid}
${S} .ftp-point{display:grid;grid-template-columns:clamp(2.75rem,5vw,4.5rem) minmax(0,1fr);gap:clamp(12px,2vw,20px);align-items:start;padding-block:clamp(24px,3vw,32px)}
${S} .ftp-point:first-child{padding-top:0}
${S} .ftp-point:last-child{padding-bottom:0}
${S} .ftp-point + .ftp-point{border-top:1px solid var(--ftp-hair)}
${S} .ftp-num{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--accent);margin-top:-.04em}
${S} .ftp-h3{font-family:var(--font-display);font-weight:800;letter-spacing:-0.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;margin-bottom:12px}
${S} .ftp-point-body p{max-width:64ch;text-wrap:pretty}
${S} .ftp-point-body p + p{margin-top:12px}
${S} .ftp-leadin{font-weight:800;color:var(--ink)}
${S} .ftp-punch{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}
${S} .ftp-pull{display:grid;justify-items:center;width:100%;max-width:46rem;margin:clamp(56px,7vw,96px) auto 0;text-align:center}
${S} .ftp-pull blockquote{width:100%;margin:0;padding:0}
${S} .ftp-pull blockquote p{display:block;max-width:100%;margin-inline:auto;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(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance}
${S} .ftp-q{color:var(--accent)}
${S} .ftp-pull figcaption{margin-top:16px;font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
${S} .ftp-ask{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"head" "asset" "body" "form";gap:12px 24px;margin-top:clamp(56px,7vw,96px);padding:clamp(24px,4vw,48px);border:1px solid oklch(from var(--band-ink) l c h / .1);border-radius:var(--card-radius,var(--radius,14px));background:var(--band);color:var(--band-ink);box-shadow:inset 0 1px 0 oklch(from var(--band) calc(l + .08) c h / .8),var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32))}
${S} .ftp-ask.has-cover{grid-template-columns:88px minmax(0,1fr);grid-template-areas:"head head" "cover asset" "body body" "form form";column-gap:16px}
@media (max-width:1019.98px){${S} .ftp-form{margin-top:12px}}
@media (min-width:640px){${S} .ftp-ask.has-cover{grid-template-columns:136px minmax(0,1fr);grid-template-rows:auto auto 1fr auto;grid-template-areas:"cover head" "cover asset" "cover body" "form form";column-gap:clamp(24px,3vw,32px)}}
@media (min-width:1020px){${S} .ftp-ask{grid-template-columns:minmax(0,1fr) minmax(0,24rem);grid-template-rows:auto auto 1fr;grid-template-areas:"head form" "asset form" "body form";column-gap:clamp(32px,4vw,56px)}${S} .ftp-ask.has-cover{grid-template-columns:152px minmax(0,1fr) minmax(0,24rem);grid-template-rows:auto auto 1fr;grid-template-areas:"cover head form" "cover asset form" "cover body form"}${S} .ftp-ask-body{margin-top:4px}}
${S} .ftp-cover{grid-area:cover;width:100%;height:auto;align-self:start;filter:drop-shadow(0 2px 3px oklch(from var(--ftp-shadow) l c h / .45)) drop-shadow(0 12px 16px oklch(from var(--ftp-shadow) l c h / .35))}
${S} .ftp-ask-h{grid-area:head;align-self:start;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(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance}
${S} .ftp-asset{grid-area:asset;align-self:start;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;text-wrap:balance}
${S} .ftp-ask-body{grid-area:body;max-width:40rem;text-wrap:pretty}
${S} .ftp-form{grid-area:form;display:grid;gap:12px;align-content:start}
${S} .ftp-label{font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.3;color:var(--band-ink)}
${S} .ftp-input{width:100%;min-height:56px;padding:0 16px;border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));background:var(--field);color:var(--field-ink);font-family:var(--font-body);font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:500;line-height:1.2;transition:border-color .16s ease,box-shadow .16s ease}
${S} .ftp-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
${S} .ftp-input:focus{outline:none}
${S} .ftp-input:focus-visible{border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35),0 0 0 5px oklch(from var(--band-ink) l c h / .55)}
${S} .ftp-input[aria-invalid="true"]{border-color:var(--danger);box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .35)}
${S} .ftp-input[aria-invalid="true"]:focus-visible{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .35),0 0 0 5px oklch(from var(--band-ink) l c h / .55)}
${S} .ftp-error{padding:8px 12px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty}
${S} .ftp-privacy{font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--band-ink);text-wrap:pretty}
${S} .ftp-btn{--ftp-b:var(--button-bg,var(--cta));--ftp-b2:var(--button-bg-2,var(--cta-2));display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:64px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--ftp-b) calc(l + .04) c h),oklch(from var(--ftp-b2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--ftp-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--ftp-b) calc(l - .16) c h),0 1px 2px oklch(from var(--ftp-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--ftp-shadow) l c h / .45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
${S} .ftp-btn:not(:disabled):hover,${S} .ftp-btn.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--ftp-b) calc(l - .01) c h),oklch(from var(--ftp-b2) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--ftp-b) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--ftp-b) calc(l - .2) c h),0 1px 2px oklch(from var(--ftp-shadow) l c h / .35),0 10px 20px -6px oklch(from var(--ftp-shadow) l c h / .55);transform:translateY(-1px)}
${S} .ftp-btn:not(:disabled):active,${S} .ftp-btn.is-active:not(:disabled){background:linear-gradient(oklch(from var(--ftp-b) calc(l - .05) c h),oklch(from var(--ftp-b2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--ftp-b) calc(l - .24) c h / .55),inset 0 -2px 0 oklch(from var(--ftp-b) calc(l - .16) c h),0 1px 2px oklch(from var(--ftp-shadow) l c h / .3);transform:translateY(1px)}
${S} .ftp-btn:focus{outline:none}
${S} .ftp-btn:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
${S} .ftp-btn:disabled:not([aria-busy="true"]){cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm))}
${S} .ftp-btn[aria-busy="true"]{cursor:progress}
@keyframes ftp-rise{from{opacity:.82;transform:translateY(8px)}}
@keyframes ftp-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:no-preference){
${S} .ftp-rise{animation:ftp-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
${S} .ftp-progress-fill{transition:transform .12s linear}
${S} .ftp-progress-dot{transition:opacity .16s ease,left .12s linear}
${S} .ftp-spin{animation:ftp-spin .8s linear infinite}
}
@media (prefers-reduced-motion:reduce){${S} .ftp-btn,${S} .ftp-input{transition:none}${S} .ftp-btn:not(:disabled):hover,${S} .ftp-btn.is-hover:not(:disabled),${S} .ftp-btn:not(:disabled):active,${S} .ftp-btn.is-active:not(:disabled){transform:none}}
`
pieces/content/free-training-page/specimen.tsx 26 lines
import __studioImage8230e741 from "../assets/bd377231eedead7c.webp";
import __studioImage6196c3dd from "../assets/70279cf337d1820e.webp";
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { FreeTrainingPage, type FreeTrainingPageProps } from "../free-training-page"
export const states = ["default", "hover", "active", "disabled", "error"]
export default function FreeTrainingPageSpecimen({ state }: { state?: FreeTrainingPageProps["state"] }) {
return (
<FreeTrainingPage
state={state}
diagramImage={slot(
"scene",
__studioImage8230e741
)}
diagramAlt="Diagram of a short email split into three lines, a hook, a proof line and a small ask, with a reply bubble beside it"
nextAssetImage={slot(
"product",
__studioImage6196c3dd
)}
nextAssetImageAlt="Cover of Part 2: The Follow-Up That Gets the Second Reply"
ask={{ privacy: defaults.sample.registration.privacy }}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalFreeTrainingPage |
string |
|
headlineMark OptionalFreeTrainingPage |
string |
|
lead OptionalFreeTrainingPage |
string |
|
byline OptionalFreeTrainingPage |
string |
|
readTime OptionalFreeTrainingPage |
string |
|
freeNote OptionalFreeTrainingPage |
string |
|
diagramImage OptionalFreeTrainingPage |
string |
|
diagramAlt OptionalFreeTrainingPage |
string |
|
diagramCaption OptionalFreeTrainingPage |
string |
|
diagramKey OptionalFreeTrainingPage |
DiagramKey[] |
|
points OptionalFreeTrainingPage |
LessonPoint[] |
|
pullLine OptionalFreeTrainingPage |
string |
|
pullCredit OptionalFreeTrainingPage |
string |
|
progressLabel OptionalFreeTrainingPage |
string |
|
ask OptionalFreeTrainingPage |
Partial<PartTwoCopy> |
|
nextAssetImage OptionalFreeTrainingPage |
string |
|
nextAssetImageAlt OptionalFreeTrainingPage |
string |
|
onSubmit OptionalFreeTrainingPage |
(values: { email: string }) => void | Promise<unknown> |
|
state OptionalFreeTrainingPage |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalFreeTrainingPage |
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-shadow- Secondary button.
--card-radius- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--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.
product- The main product shot or cover (ebook, kit, bottle).
scene- A wide atmosphere photo behind or beside the copy.
-
70279cf337d1820e.webp
image/webp · 24.8 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
bd377231eedead7c.webp
image/webp · 12 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB