Free Book Hero 3
Free + shipping book hero: the hardcover in the spotlight between a giant FREE (against its regular price) and the just-cover-shipping promise, then a dear-friend letter that greets the reader by name as they fill in step one of the shipping form.
Use it in a prompt
Use hero/free-book-hero-3 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/free-book-hero-3.tsx. - Import it and pass your copy and images (Props tab):
import { FreeBookHero3 } from "@/components/funneldna/hero/free-book-hero-3"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/free-book-hero-3/component.tsx 767 lines
// layout: spotlight-row
// Free + shipping book hero: the hardcover in the spotlight between a giant FREE (against its regular price) and the just-cover-shipping promise, then a dear-friend letter that greets the reader by name as they fill in step one of the shipping form.
'use client'
import * as React from 'react'
import { AlertCircle, Loader2, Lock, Package, Truck } from 'lucide-react'
export type FreeBookHero3Field = {
name: string
label: string
type?: string
autoComplete?: string
/** Realistic example answer; a sensible default is used when omitted. */
placeholder?: string
}
export type FreeBookHero3State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type FreeBookHero3Copy = {
freeLabel: string
/** Words before and after the struck regular price. */
anchorBefore: string
anchorAfter: string
/** Line under FREE when no regular price is supplied. */
freeOnly: string
coverShipping: string
/** Used with a supplied amount; {amount} is replaced. */
coverShippingAmount: string
/** Shown under the shipping line when no amount is supplied. */
shippingNoteDefault: string
/** Letter salutation; {name} is replaced with the first name typed, or `friend`. */
salutation: string
friend: string
/** {name} is replaced with the full name typed, or `shipsToFallback`. */
shipsTo: string
shipsToFallback: string
step: string
/** {label} is replaced with the field label in lower case. */
required: string
emailRequired: string
emailInvalid: string
errorSummary: string
loading: string
disabledNote: string
}
export type FreeBookHero3Props = {
/** Labels, validation and status copy; named placeholders are documented on FreeBookHero3Copy. */
copy?: Partial<FreeBookHero3Copy>
headline?: string
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string
lead?: string
/** Book shot on a transparent background (slot: product). */
productImage?: string
productImageAlt?: string
/** Caption under the book. */
bookName?: string
/** Struck regular price; only a real, supplied price. Omitted, FREE stands alone. */
retailPrice?: string
/** Supplied shipping amount; omitted, the line reads without a figure. */
shippingPrice?: string
shippingNote?: string
shipPromise?: string
/** Button beside the book that moves the visitor into the form. */
jumpLabel?: string
jumpNote?: string
/** Letter paragraphs between the salutation and the sign-off. */
letter?: React.ReactNode[]
signoff?: string
signature?: string
cardTitle?: string
fields?: FreeBookHero3Field[]
ctaLabel?: string
/** Benefit line inside the submit button, under the label. */
ctaNote?: string
privacy?: string
state?: FreeBookHero3State
/** Receives validated values. A returned promise shows the loading label until it settles. */
onSubmit?: (values: Record<string, string>) => void | Promise<void>
className?: string
style?: React.CSSProperties
}
export function FreeBookHero3({
copy,
headline = 'Build your first funnel with a clear plan',
highlight = 'a clear plan',
lead = 'Plan your funnel, write your page copy, and check every step before you launch.',
productImage,
productImageAlt = 'Funnel Planning Guide hardcover book',
bookName = 'Funnel Planning Guide',
retailPrice,
shippingPrice,
shippingNote,
shipPromise = 'Mailed to your door',
jumpLabel = 'Claim My FREE Copy',
jumpNote = 'Two quick steps',
letter = DEFAULT_LETTER,
signoff = 'To your first launch,',
signature = 'The Funnel Starter Kit team',
cardTitle = 'Claim your FREE copy',
fields = DEFAULT_FIELDS,
ctaLabel = 'Send Me My FREE Book',
ctaNote = 'Next: where to ship it',
privacy = 'We respect your inbox. Unsubscribe anytime.',
state = 'default',
onSubmit,
className,
style,
}: FreeBookHero3Props) {
const text = { ...DEFAULT_COPY, ...copy }
const uid = React.useId()
const mounted = React.useRef(true)
const [values, setValues] = React.useState<Record<string, string>>({})
const [errors, setErrors] = React.useState<Record<string, string>>(() => (state === 'error' ? requiredErrors(fields, text) : {}))
const [loading, setLoading] = React.useState(false)
React.useEffect(() => {
setValues({})
setErrors(state === 'error' ? requiredErrors(fields, text) : {})
setLoading(false)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state])
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
const disabled = state === 'disabled'
const hasErrors = Object.keys(errors).length > 0
const forced = state === 'hover' ? ' is-hover' : state === 'active' ? ' is-active' : ''
const nameField = fields.find(isNameField)
const fullName = nameField ? (values[nameField.name] ?? '').trim() : ''
const firstName = fullName.split(' ').filter(Boolean)[0] ?? ''
const note = shippingNote ?? (shippingPrice ? undefined : text.shippingNoteDefault)
function jump() {
const first = fields[0]
if (!first || disabled) return
const el = document.getElementById(`${uid}-${first.name}`)
if (!el) return
const still = typeof window !== 'undefined' && window.matchMedia?.('(prefers-reduced-motion: reduce)').matches
el.scrollIntoView({ behavior: still ? 'auto' : 'smooth', block: 'center' })
el.focus({ preventScroll: true })
}
function change(field: FreeBookHero3Field, value: string) {
setValues((prev) => ({ ...prev, [field.name]: value }))
if (errors[field.name]) {
const message = validate(field, value, text)
setErrors((prev) => {
const next = { ...prev }
if (message) next[field.name] = message
else delete next[field.name]
return next
})
}
}
async function submit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
if (disabled || loading) return
const next: Record<string, string> = {}
for (const field of fields) {
const message = validate(field, values[field.name] ?? '', text)
if (message) next[field.name] = message
}
setErrors(next)
const firstBad = fields.find((field) => next[field.name])
if (firstBad) {
document.getElementById(`${uid}-${firstBad.name}`)?.focus()
return
}
const result = onSubmit?.(values)
if (!result) return
setLoading(true)
try {
await result
} finally {
if (mounted.current) setLoading(false)
}
}
return (
<section className={['cf-free-book-hero-3', className].filter(Boolean).join(' ')} style={style} aria-labelledby={`${uid}-h`}>
<style>{CSS}</style>
<div className='fb3-stage'>
<header className='fb3-head'>
<h1 id={`${uid}-h`} className='fb3-h1'>{renderHeadline(headline, highlight)}</h1>
{lead ? <p className='fb3-lead'>{lead}</p> : null}
</header>
<div className='fb3-spot'>
<div className='fb3-price'>
<p className='fb3-free'>{text.freeLabel}</p>
{retailPrice ? (
<p className='fb3-anchor'>
{text.anchorBefore} <s>{retailPrice}</s> {text.anchorAfter}
</p>
) : (
<p className='fb3-anchor'>{text.freeOnly}</p>
)}
</div>
{productImage ? (
<figure className='fb3-book'>
<img src={productImage} alt={productImageAlt} width={760} height={760} decoding='async' />
{bookName ? <figcaption className='fb3-cap'>{bookName}</figcaption> : null}
</figure>
) : null}
<div className='fb3-ship'>
<p className='fb3-cover'>
{shippingPrice ? renderTemplate(text.coverShippingAmount, 'amount', <b key='amount'>{shippingPrice}</b>) : text.coverShipping}
</p>
{shipPromise ? (
<p className='fb3-promise'>
<Truck className='fb3-ico fb3-ico--accent' aria-hidden='true' strokeWidth={2.5} />
{shipPromise}
</p>
) : null}
{note ? <p className='fb3-note'>{note}</p> : null}
</div>
<button type='button' className={`fb3-btn fb3-jump${forced}`} onClick={jump} disabled={disabled}>
<span className='fb3-btn__main'>{jumpLabel}</span>
{jumpNote ? <span className='fb3-btn__sub'>{jumpNote}</span> : null}
</button>
</div>
</div>
<div className='fb3-band'>
<div className='fb3-row'>
<div className='fb3-letter'>
<p className='fb3-dear'>
{renderTemplate(
text.salutation,
'name',
<span key={firstName || '__friend'} className='fb3-dear-name'>{firstName || text.friend}</span>,
)}
</p>
{letter.map((paragraph, i) => (
<p key={i} className='fb3-para'>{paragraph}</p>
))}
{signoff ? <p className='fb3-signoff'>{signoff}</p> : null}
{signature ? <p className='fb3-sig'>{signature}</p> : null}
</div>
<div className='fb3-card' role='group' aria-labelledby={`${uid}-card`}>
<h2 id={`${uid}-card`} className='fb3-card-title'>{cardTitle}</h2>
<div className='fb3-step'>
<span>{text.step}</span>
<span className='fb3-bar' aria-hidden='true'><i /><i /></span>
</div>
{nameField ? (
<p className='fb3-well'>
<Package className='fb3-ico fb3-ico--accent' aria-hidden='true' strokeWidth={2.5} />
{renderTemplate(text.shipsTo, 'name', <strong key='ship-name'>{fullName || text.shipsToFallback}</strong>)}
</p>
) : null}
<form className='fb3-form' noValidate onSubmit={submit} aria-busy={loading || undefined}>
{hasErrors ? (
<p className='fb3-summary' role='alert'>
<AlertCircle className='fb3-ico' aria-hidden='true' strokeWidth={2.5} />
{text.errorSummary}
</p>
) : null}
{fields.map((field) => {
const id = `${uid}-${field.name}`
const error = errors[field.name]
return (
<div className='fb3-field' key={field.name}>
<label className='fb3-label' htmlFor={id}>{field.label}</label>
<input
id={id}
name={field.name}
className='fb3-input'
type={field.type ?? 'text'}
autoComplete={field.autoComplete}
inputMode={isEmailField(field) ? 'email' : undefined}
placeholder={placeholderFor(field)}
value={values[field.name] ?? ''}
onChange={(event) => change(field, event.target.value)}
disabled={disabled}
aria-invalid={error ? true : undefined}
aria-describedby={error ? `${id}-err` : undefined}
/>
{error ? (
<p className='fb3-err' id={`${id}-err`}>
<AlertCircle className='fb3-ico fb3-ico--sm' aria-hidden='true' strokeWidth={2.5} />
{error}
</p>
) : null}
</div>
)
})}
<button
type='submit'
className={`fb3-btn fb3-submit${forced}${loading ? ' is-loading' : ''}`}
disabled={disabled}
aria-disabled={loading || undefined}
>
{loading ? (
<span className='fb3-btn__main fb3-btn__main--load'>
<Loader2 className='fb3-spin' aria-hidden='true' strokeWidth={2.5} />
{text.loading}
</span>
) : (
<>
<span className='fb3-btn__main'>{ctaLabel}</span>
{ctaNote ? <span className='fb3-btn__sub'>{ctaNote}</span> : null}
</>
)}
</button>
{disabled ? <p className='fb3-paused'>{text.disabledNote}</p> : null}
</form>
{privacy ? (
<p className='fb3-privacy'>
<Lock className='fb3-ico fb3-ico--sm' aria-hidden='true' strokeWidth={2.5} />
{privacy}
</p>
) : null}
</div>
</div>
</div>
</section>
)
}
export default FreeBookHero3
const DEFAULT_COPY: FreeBookHero3Copy = {
freeLabel: 'FREE',
anchorBefore: 'vs.',
anchorAfter: 'regular price',
freeOnly: 'The book is yours free today',
coverShipping: 'Just cover shipping',
coverShippingAmount: 'Just cover {amount} shipping',
shippingNoteDefault: 'Shipping is shown before you pay.',
salutation: 'Dear {name},',
friend: 'friend',
shipsTo: 'Your copy ships to {name}',
shipsToFallback: 'you',
step: 'Step 1 of 2: your details',
required: 'Please enter your {label}.',
emailRequired: 'Please enter your email address.',
emailInvalid: 'Please enter a valid email, like you@example.com.',
errorSummary: 'Please fix the highlighted fields to claim your free book.',
loading: 'Saving your details…',
disabledNote: 'Requests are paused right now.',
}
const DEFAULT_FIELDS: FreeBookHero3Field[] = [
{ name: 'name', label: 'Full name', autoComplete: 'name' },
{ name: 'email', label: 'Email address', type: 'email', autoComplete: 'email' },
]
const DEFAULT_LETTER: React.ReactNode[] = [
'If you’ve put off your first funnel because you’re not sure which pages it needs, this book is for you.',
<><strong>Inside, you’ll map your offer and the pages your funnel needs</strong>, one clear step at a time.</>,
'The book is free. You just cover shipping, and it’s mailed straight to your door.',
'Tell us who it’s for. Your shipping address comes next.',
]
function isEmailField(field: FreeBookHero3Field) {
return field.type === 'email' || field.name === 'email'
}
function isNameField(field: FreeBookHero3Field) {
return field.autoComplete === 'name' || field.autoComplete === 'given-name' || field.name === 'name' || field.name === 'firstName'
}
function placeholderFor(field: FreeBookHero3Field) {
if (field.placeholder) return field.placeholder
if (isEmailField(field)) return 'you@example.com'
if (field.type === 'tel') return '(555) 123-4567'
if (isNameField(field)) return 'Jane Smith'
return 'Type your answer here'
}
function fill(template: string, values: Record<string, string>) {
return Object.keys(values).reduce((out, key) => out.split(`{${key}}`).join(values[key]), template)
}
function renderTemplate(template: string, key: string, node: React.ReactNode): React.ReactNode {
const token = `{${key}}`
const at = template.indexOf(token)
if (at < 0) return template
return (
<>
{template.slice(0, at)}
{node}
{template.slice(at + token.length)}
</>
)
}
function looksLikeEmail(value: string) {
const at = value.indexOf('@')
if (at < 1 || value.includes(' ')) return false
const domain = value.slice(at + 1)
const dot = domain.lastIndexOf('.')
return dot > 0 && dot < domain.length - 2
}
function validate(field: FreeBookHero3Field, raw: string, text: FreeBookHero3Copy) {
const value = raw.trim()
if (!value) return isEmailField(field) ? text.emailRequired : fill(text.required, { label: field.label.toLowerCase() })
if (isEmailField(field) && !looksLikeEmail(value)) return text.emailInvalid
return ''
}
function requiredErrors(fields: FreeBookHero3Field[], text: FreeBookHero3Copy) {
const out: Record<string, string> = {}
for (const field of fields) out[field.name] = validate(field, '', text)
return out
}
function renderHeadline(text: string, highlight?: string) {
const at = highlight ? text.toLowerCase().indexOf(highlight.toLowerCase()) : -1
if (!highlight || at < 0) return text
return (
<>
{text.slice(0, at)}
<span className='fb3-mark'>{text.slice(at, at + highlight.length)}</span>
{text.slice(at + highlight.length)}
</>
)
}
const CSS = `
.cf-free-book-hero-3{
--fb3-gutter:clamp(16px,5vw,48px);
--fb3-shadow:var(--shadow,oklch(0.22 0.03 256));
--fb3-marker:color-mix(in oklab,var(--marker,#fae37c) 50%,var(--surface,#fff));
--signature-font:var(--signature-face,var(--font-display));
position:relative;
background:var(--surface);
color:var(--ink);
font-family:var(--font-body);
overflow-x:clip;
}
.cf-free-book-hero-3 *,.cf-free-book-hero-3 *::before,.cf-free-book-hero-3 *::after{box-sizing:border-box}
/* Stage: headline + spotlight */
.cf-free-book-hero-3 .fb3-stage{padding:clamp(56px,8vw,112px) var(--fb3-gutter) clamp(48px,6vw,80px)}
.cf-free-book-hero-3 .fb3-head{max-width:60rem;margin:0 auto;text-align:center}
.cf-free-book-hero-3 .fb3-h1{
margin:0;
color:var(--ink);
font-family:var(--font-display);
font-size:clamp(2.5rem,5.4vw,4.875rem);
line-height:1.04;
font-weight:var(--display-weight,800);
letter-spacing:var(--display-tracking,-0.025em);
text-transform:var(--display-case,none);
text-wrap:balance;
}
.cf-free-book-hero-3 .fb3-mark{
background:linear-gradient(transparent 50%,var(--fb3-marker) 50%,var(--fb3-marker) 92%,transparent 92%);
padding:0 .1em;
margin:0 -.04em;
border-radius:.2em;
-webkit-box-decoration-break:clone;
box-decoration-break:clone;
}
.cf-free-book-hero-3 .fb3-lead{
max-width:40rem;
margin:clamp(14px,1.6vw,22px) auto 0;
color:var(--muted);
font-size:clamp(1.125rem,1.5vw,1.375rem);
line-height:1.4;
font-weight:500;
text-wrap:pretty;
}
.cf-free-book-hero-3 .fb3-spot{
max-width:1120px;
margin:clamp(32px,4vw,56px) auto 0;
display:grid;
grid-template-columns:minmax(0,1fr) clamp(240px,30vw,380px) minmax(0,1fr);
grid-template-areas:"price book ship" "price book jump";
column-gap:clamp(24px,4vw,56px);
row-gap:20px;
align-items:center;
}
.cf-free-book-hero-3 .fb3-price{grid-area:price;justify-self:end;text-align:right}
.cf-free-book-hero-3 .fb3-free{
margin:0;
color:var(--ink);
font-family:var(--font-display);
font-size:clamp(3.5rem,7.2vw,6.25rem);
line-height:1;
font-weight:var(--display-weight,800);
letter-spacing:-0.035em;
text-transform:none;
}
.cf-free-book-hero-3 .fb3-anchor{
margin:clamp(20px,2.2vw,28px) 0 0;
color:var(--muted);
font-size:clamp(1.0625rem,1.25vw,1.125rem);
line-height:1.4;
font-weight:600;
text-wrap:pretty;
}
.cf-free-book-hero-3 .fb3-anchor s{
color:var(--ink);
font-family:var(--font-display);
font-size:clamp(1.125rem,1.5vw,1.375rem);
font-weight:800;
font-variant-numeric:tabular-nums;
text-decoration-line:line-through;
text-decoration-color:oklch(from var(--danger) l c h / 0.9);
text-decoration-thickness:2px;
}
.cf-free-book-hero-3 .fb3-book{grid-area:book;margin:0;text-align:center}
.cf-free-book-hero-3 .fb3-book img{
display:block;
width:100%;
height:auto;
aspect-ratio:1/1;
object-fit:contain;
object-position:center bottom;
filter:drop-shadow(0 2px 3px oklch(from var(--fb3-shadow) l c h / 0.35)) drop-shadow(0 18px 18px oklch(from var(--fb3-shadow) l c h / 0.26));
}
.cf-free-book-hero-3 .fb3-cap{margin-top:12px;color:var(--muted);font-size:.9375rem;line-height:1.4;font-weight:700}
.cf-free-book-hero-3 .fb3-ship{grid-area:ship;align-self:end;justify-self:start;max-width:22rem}
.cf-free-book-hero-3 .fb3-cover{
margin:0;
color:var(--ink);
font-family:var(--font-display);
font-size:clamp(1.3125rem,1.8vw,1.625rem);
line-height:1.15;
font-weight:800;
letter-spacing:-0.01em;
text-wrap:balance;
}
.cf-free-book-hero-3 .fb3-cover b{font-weight:800;font-variant-numeric:tabular-nums}
.cf-free-book-hero-3 .fb3-promise{margin:12px 0 0;color:var(--ink);font-size:1.0625rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-free-book-hero-3 .fb3-note{margin:4px 0 0;color:var(--muted);font-size:.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-free-book-hero-3 .fb3-jump{grid-area:jump;align-self:start;justify-self:start;width:min(100%,22rem)}
.cf-free-book-hero-3 .fb3-ico{display:inline-block;width:18px;height:18px;vertical-align:-0.2em;margin-inline-end:.4em;color:currentColor;flex:none}
.cf-free-book-hero-3 .fb3-ico--sm{width:16px;height:16px;vertical-align:-0.15em}
.cf-free-book-hero-3 .fb3-ico--accent{color:var(--accent)}
/* Buttons: two-line Belcher */
.cf-free-book-hero-3 .fb3-btn{
--fb3-b:var(--button-bg,var(--cta));
--fb3-b2:var(--button-bg-2,var(--cta-2));
display:inline-flex;
flex-direction:column;
align-items:center;
justify-content:center;
gap:3px;
width:100%;
min-height:72px;
padding:10px 24px;
border:0;
border-radius:var(--button-radius,var(--radius,12px));
background:linear-gradient(oklch(from var(--fb3-b) calc(l + 0.04) c h),oklch(from var(--fb3-b2) calc(l - 0.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);
text-align:center;
text-shadow:var(--button-text-shadow,none);
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--fb3-b) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--fb3-b) calc(l - 0.16) c h),0 1px 2px oklch(from var(--fb3-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--fb3-shadow) l c h / 0.42));
cursor:pointer;
-webkit-tap-highlight-color:transparent;
transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.cf-free-book-hero-3 .fb3-btn__main{display:block;font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-wrap:balance}
.cf-free-book-hero-3 .fb3-btn__main--load{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.cf-free-book-hero-3 .fb3-btn__sub{display:block;font-family:var(--font-body);font-size:.9375rem;line-height:1.3;font-weight:600;letter-spacing:0;text-transform:none;text-wrap:pretty}
.cf-free-book-hero-3 .fb3-btn:hover:not(:disabled),.cf-free-book-hero-3 .fb3-btn.is-hover:not(:disabled){
background:linear-gradient(oklch(from var(--fb3-b) calc(l - 0.01) c h),oklch(from var(--fb3-b2) calc(l - 0.07) c h));
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--fb3-b) calc(l + 0.12) c h / 0.7),inset 0 -3px 0 oklch(from var(--fb3-b) calc(l - 0.2) c h),0 2px 3px oklch(from var(--fb3-shadow) l c h / 0.32),0 12px 20px -6px oklch(from var(--fb3-shadow) l c h / 0.48));
transform:translateY(-1px);
}
.cf-free-book-hero-3 .fb3-btn:active:not(:disabled),.cf-free-book-hero-3 .fb3-btn.is-active:not(:disabled){
background:linear-gradient(oklch(from var(--fb3-b) calc(l - 0.04) c h),oklch(from var(--fb3-b2) calc(l - 0.09) c h));
box-shadow:inset 0 1px 0 oklch(from var(--fb3-b) calc(l + 0.08) c h / 0.5),inset 0 -2px 0 oklch(from var(--fb3-b) calc(l - 0.2) c h),inset 0 2px 5px oklch(from var(--fb3-b) calc(l - 0.24) c h / 0.45),0 1px 2px oklch(from var(--fb3-shadow) l c h / 0.3);
transform:translateY(1px);
}
.cf-free-book-hero-3 .fb3-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / 0.6);outline-offset:3px}
.cf-free-book-hero-3 .fb3-btn:disabled{
background:var(--button-2-bg,var(--secondary));
color:var(--button-2-ink,var(--secondary-ink));
box-shadow:var(--button-2-shadow,var(--shadow-sm));
text-shadow:none;
cursor:not-allowed;
transform:none;
}
.cf-free-book-hero-3 .fb3-btn.is-loading{cursor:progress}
.cf-free-book-hero-3 .fb3-spin{width:20px;height:20px;flex:none;animation:fb3-spin .8s linear infinite}
/* Letter + form band */
.cf-free-book-hero-3 .fb3-band{background:var(--band);color:var(--band-ink);padding:clamp(56px,7vw,96px) var(--fb3-gutter) clamp(64px,8.5vw,120px)}
.cf-free-book-hero-3 .fb3-row{
max-width:1120px;
margin:0 auto;
display:grid;
grid-template-columns:minmax(0,1fr) minmax(0,460px);
gap:clamp(32px,5vw,72px);
align-items:start;
}
.cf-free-book-hero-3 .fb3-letter{max-width:38rem;padding-top:8px}
.cf-free-book-hero-3 .fb3-dear{
margin:0 0 20px;
color:var(--band-ink);
font-family:var(--font-display);
font-size:clamp(2rem,3.6vw,3.25rem);
line-height:1.06;
font-weight:var(--display-weight,800);
letter-spacing:var(--display-tracking,-0.025em);
overflow-wrap:anywhere;
}
.cf-free-book-hero-3 .fb3-dear-name{display:inline-block}
.cf-free-book-hero-3 .fb3-para{
margin:0 0 16px;
color:var(--band-ink);
font-size:clamp(1.125rem,1.5vw,1.375rem);
line-height:1.5;
font-weight:400;
text-wrap:pretty;
}
.cf-free-book-hero-3 .fb3-para strong{font-weight:800}
.cf-free-book-hero-3 .fb3-signoff{margin:24px 0 4px;color:var(--band-ink);font-size:1.0625rem;line-height:1.4;font-weight:600}
.cf-free-book-hero-3 .fb3-sig{margin:0;color:var(--band-ink);font-family:var(--signature-font);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:800}
.cf-free-book-hero-3 .fb3-card{
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(--fb3-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--fb3-shadow) l c h / 0.32)));
padding:clamp(20px,3vw,32px);
}
.cf-free-book-hero-3 .fb3-card-title{
margin:0;
color:var(--ink);
font-family:var(--font-display);
font-size:clamp(1.3125rem,1.8vw,1.625rem);
line-height:1.15;
font-weight:800;
letter-spacing:-0.01em;
text-wrap:balance;
}
.cf-free-book-hero-3 .fb3-step{display:flex;align-items:center;gap:12px;margin:12px 0 0;color:var(--muted);font-size:.875rem;line-height:1.2;font-weight:800}
.cf-free-book-hero-3 .fb3-bar{display:grid;grid-template-columns:1fr 1fr;gap:4px;flex:0 0 96px}
.cf-free-book-hero-3 .fb3-bar i{display:block;height:6px;border-radius:999px;background:color-mix(in oklch,var(--ink) 12%,var(--card))}
.cf-free-book-hero-3 .fb3-bar i:first-child{background:var(--accent-fill,var(--accent))}
.cf-free-book-hero-3 .fb3-well{
margin:20px 0 0;
padding:12px 16px;
border-radius:10px;
background:color-mix(in oklch,var(--ink) 4%,var(--card));
color:var(--ink);
font-size:.9375rem;
line-height:1.4;
font-weight:500;
overflow-wrap:anywhere;
}
.cf-free-book-hero-3 .fb3-well strong{font-weight:800}
.cf-free-book-hero-3 .fb3-form{display:grid;gap:16px;margin-top:20px}
.cf-free-book-hero-3 .fb3-field{display:grid;gap:8px}
.cf-free-book-hero-3 .fb3-label{color:var(--label-ink,var(--ink));font-size:1rem;line-height:1.3;font-weight:700}
.cf-free-book-hero-3 .fb3-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:inherit;
font-size:1.0625rem;
box-shadow:inset 0 1px 2px oklch(from var(--fb3-shadow) l c h / 0.08);
transition:border-color .16s ease,box-shadow .16s ease;
}
.cf-free-book-hero-3 .fb3-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-free-book-hero-3 .fb3-input:hover:not(:disabled){border-color:color-mix(in oklch,var(--ink) 38%,transparent)}
.cf-free-book-hero-3 .fb3-input:focus{outline:none;border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / 0.35)}
.cf-free-book-hero-3 .fb3-input[aria-invalid='true']{border-color:var(--danger)}
.cf-free-book-hero-3 .fb3-input[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / 0.3)}
.cf-free-book-hero-3 .fb3-input:disabled{background:color-mix(in oklch,var(--field-ink) 5%,var(--field));cursor:not-allowed}
.cf-free-book-hero-3 .fb3-err{margin:0;color:var(--danger);font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty}
.cf-free-book-hero-3 .fb3-summary{margin:0;padding:12px 16px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;line-height:1.4;font-weight:700;text-wrap:pretty}
.cf-free-book-hero-3 .fb3-submit{margin-top:4px}
.cf-free-book-hero-3 .fb3-paused{margin:0;text-align:center;color:var(--muted);font-size:.9375rem;line-height:1.4;font-weight:600}
.cf-free-book-hero-3 .fb3-privacy{margin:12px 0 0;text-align:center;color:var(--muted);font-size:.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty}
/* Phone and narrow tablet: book first, price and shipping side by side, full-width action */
@media (max-width:920px){
.cf-free-book-hero-3 .fb3-spot{
grid-template-columns:minmax(0,1fr) minmax(0,1fr);
grid-template-areas:"book book" "price ship" "jump jump";
column-gap:16px;
row-gap:24px;
align-items:start;
}
.cf-free-book-hero-3 .fb3-book{justify-self:center;width:min(100%,320px)}
.cf-free-book-hero-3 .fb3-price,.cf-free-book-hero-3 .fb3-ship{justify-self:stretch;align-self:start;max-width:none;text-align:center}
.cf-free-book-hero-3 .fb3-free{font-size:clamp(3rem,13vw,4rem)}
.cf-free-book-hero-3 .fb3-anchor{margin-top:18px;font-size:.9375rem}
.cf-free-book-hero-3 .fb3-anchor s{font-size:1.125rem}
.cf-free-book-hero-3 .fb3-cover{font-size:1.3125rem}
.cf-free-book-hero-3 .fb3-promise{font-size:1rem}
.cf-free-book-hero-3 .fb3-jump{justify-self:center;width:min(100%,26rem)}
.cf-free-book-hero-3 .fb3-row{grid-template-columns:minmax(0,1fr)}
.cf-free-book-hero-3 .fb3-letter{max-width:none;padding-top:0}
}
/* Phone: one clear column, so the price and the shipping promise read on single lines */
@media (max-width:560px){
.cf-free-book-hero-3 .fb3-spot{
grid-template-columns:minmax(0,1fr);
grid-template-areas:"book" "price" "ship" "jump";
row-gap:20px;
margin-top:28px;
}
.cf-free-book-hero-3 .fb3-book{width:min(100%,280px)}
.cf-free-book-hero-3 .fb3-free{font-size:clamp(3.5rem,16vw,4.5rem)}
.cf-free-book-hero-3 .fb3-anchor{margin-top:18px;font-size:1.0625rem}
.cf-free-book-hero-3 .fb3-ship{padding-top:4px}
.cf-free-book-hero-3 .fb3-promise{margin-top:8px}
.cf-free-book-hero-3 .fb3-jump{width:100%;margin-top:4px}
.cf-free-book-hero-3 .fb3-dear{margin-bottom:16px}
.cf-free-book-hero-3 .fb3-para{font-size:1.0625rem}
}
/* Motion: one reveal vocabulary; still under reduced motion */
@keyframes fb3-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes fb3-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:no-preference){
.cf-free-book-hero-3 .fb3-head,
.cf-free-book-hero-3 .fb3-price,
.cf-free-book-hero-3 .fb3-book,
.cf-free-book-hero-3 .fb3-ship,
.cf-free-book-hero-3 .fb3-jump{animation:fb3-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-free-book-hero-3 .fb3-book{animation-delay:.07s}
.cf-free-book-hero-3 .fb3-price{animation-delay:.14s}
.cf-free-book-hero-3 .fb3-ship{animation-delay:.21s}
.cf-free-book-hero-3 .fb3-jump{animation-delay:.28s}
.cf-free-book-hero-3 .fb3-dear-name{animation:fb3-rise .3s cubic-bezier(.2,.7,.2,1) both}
}
@media (prefers-reduced-motion:reduce){
.cf-free-book-hero-3 *,.cf-free-book-hero-3 *::before,.cf-free-book-hero-3 *::after{animation:none;transition:none}
.cf-free-book-hero-3 .fb3-btn:hover:not(:disabled),
.cf-free-book-hero-3 .fb3-btn.is-hover:not(:disabled),
.cf-free-book-hero-3 .fb3-btn:active:not(:disabled),
.cf-free-book-hero-3 .fb3-btn.is-active:not(:disabled){transform:none}
}
@media (forced-colors:active){
.cf-free-book-hero-3 .fb3-btn,.cf-free-book-hero-3 .fb3-card{border:2px solid ButtonText}
}
`
pieces/hero/free-book-hero-3/specimen.tsx 27 lines
import __studioImage45de613e from "../assets/0e2ca45acd5a4fca.webp";
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { FreeBookHero3 } from '../free-book-hero-3'
import type { FreeBookHero3State } from '../free-book-hero-3'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function FreeBookHero3Specimen({ state }: { state?: FreeBookHero3State }) {
const sample = defaults.sample
const book = sample.items[0]
return (
<FreeBookHero3
state={state}
headline={sample.headline}
highlight='a clear plan'
lead={sample.lead}
productImage={slot('product', __studioImage45de613e)}
productImageAlt='Funnel Planning Guide hardcover book'
bookName={book.name}
retailPrice={book.value}
fields={sample.fields}
signature={`${sample.name} team`}
privacy={sample.registration.privacy}
/>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalFreeBookHero3 |
Partial<FreeBookHero3Copy> |
|
headline OptionalFreeBookHero3 |
string |
Default 'Build your first funnel with a clear plan'
|
highlight OptionalFreeBookHero3 |
string |
Default 'a clear plan'
|
lead OptionalFreeBookHero3 |
string |
Default 'Plan your funnel, write your page copy, and check every step before you launch.'
|
productImage OptionalFreeBookHero3 |
string |
|
productImageAlt OptionalFreeBookHero3 |
string |
Default 'Funnel Planning Guide hardcover book'
|
bookName OptionalFreeBookHero3 |
string |
Default 'Funnel Planning Guide'
|
retailPrice OptionalFreeBookHero3 |
string |
|
shippingPrice OptionalFreeBookHero3 |
string |
|
shippingNote OptionalFreeBookHero3 |
string |
|
shipPromise OptionalFreeBookHero3 |
string |
Default 'Mailed to your door'
|
jumpLabel OptionalFreeBookHero3 |
string |
Default 'Claim My FREE Copy'
|
jumpNote OptionalFreeBookHero3 |
string |
Default 'Two quick steps'
|
letter OptionalFreeBookHero3 |
React.ReactNode[] |
Default DEFAULT_LETTER
|
signoff OptionalFreeBookHero3 |
string |
Default 'To your first launch,'
|
signature OptionalFreeBookHero3 |
string |
Default 'The Funnel Starter Kit team'
|
cardTitle OptionalFreeBookHero3 |
string |
Default 'Claim your FREE copy'
|
fields OptionalFreeBookHero3 |
FreeBookHero3Field[] |
Default DEFAULT_FIELDS
|
ctaLabel OptionalFreeBookHero3 |
string |
Default 'Send Me My FREE Book'
|
ctaNote OptionalFreeBookHero3 |
string |
Default 'Next: where to ship it'
|
privacy OptionalFreeBookHero3 |
string |
Default 'We respect your inbox. Unsubscribe anytime.'
|
state OptionalFreeBookHero3 |
FreeBookHero3State |
Default 'default'
|
onSubmit OptionalFreeBookHero3 |
(values: Record<string, string>) => void | Promise<void> |
|
className OptionalFreeBookHero3 |
string |
|
style OptionalFreeBookHero3 |
React.CSSProperties |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
0e2ca45acd5a4fca.webp
image/webp · 213 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB