Challenge Hero 9
Registers visitors for a free challenge staged as an event: the day count on a dark stage, a cinematic headline, and a clipboard sign-up sheet beside the join form.
Use it in a prompt
Use hero/challenge-hero-9 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/challenge-hero-9.tsx. - Import it and pass your copy and images (Props tab):
import { ChallengeHero9 } from "@/components/funneldna/hero/challenge-hero-9"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/challenge-hero-9/component.tsx 463 lines
// Registers visitors for a free challenge staged as an event: the day count on a dark stage, a cinematic headline, and a clipboard sign-up sheet beside the join form.
// layout: clipboard-checklist
import * as React from 'react'
import { AlertCircle, Loader2, Lock, MonitorPlay } from 'lucide-react'
import { Mark } from '../marks/marks'
/** 'success' is accepted for older callers and renders as default. */
export type ChallengeHero9State = 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
export type ChallengeHero9Day = {
title: string
detail?: string
/** Overrides the generated "Day N" ribbon text */
label?: string
}
export type ChallengeHero9Field = {
name: string
label: string
type?: string
autoComplete?: string
placeholder?: string
}
export type ChallengeHero9Props = {
/** Challenge name, printed at the top of the sign-up sheet */
name?: string
/** Format line beside the name on the sheet */
format?: string
/** Word set beside the big day count, e.g. "Day" */
countUnit?: string
/** Line under countUnit, e.g. "Free challenge" */
countCaption?: string
/** Screen-reader text for the day count; {count} is replaced with the number of days as text. */
countLabel?: string
headline?: string
/** One continuous phrase inside the headline, set in the warm metal colour */
highlight?: string
lead?: string
/** Heading over the ticked day list */
planTitle?: string
/** One entry per challenge day; the big count comes from this list. */
days?: ChallengeHero9Day[]
/** {day} is replaced with the one-based day number as text. */
dayLabel?: string
cardTitle?: string
fields?: ChallengeHero9Field[]
label?: string
loadingLabel?: string
sublabel?: string
privacy?: string
/** @deprecated No longer rendered: the builder wires what happens after registration. */
successTitle?: string
/** @deprecated No longer rendered. */
success?: string
/** @deprecated No longer rendered. */
nextLabel?: string
error?: string
emailError?: string
/** {label} is replaced with the lower-case field label as text. */
requiredError?: string
/** Stage backdrop photo (scene slot), shown under a solid band scrim */
sceneImage?: string
/** Metal clipboard clip on a transparent background */
clipImage?: string
disabled?: boolean
state?: ChallengeHero9State
/** Receives validated values. A returned promise shows the loading label; a rejection shows `error`. */
onSubmit?: (values: Record<string, string>) => void | Promise<void>
className?: string
style?: React.CSSProperties
}
export function ChallengeHero9({
name = 'Funnel Starter Challenge',
format = 'Online · On demand',
countUnit = 'Day',
countCaption = 'Free challenge',
countLabel = 'Free {count}-day challenge',
headline = 'Map out your first funnel',
highlight = 'first funnel',
lead = 'Join the free Funnel Starter Challenge and walk through your offer, page copy, and next steps, one day at a time.',
planTitle = 'Walk away with a clear plan',
days = DEFAULT_DAYS,
dayLabel = 'Day {day}',
cardTitle = 'Save your free seat',
fields = DEFAULT_FIELDS,
label = 'Yes! Save My Seat',
loadingLabel = 'Saving your seat…',
sublabel = 'Free challenge · Watch online',
privacy = 'We respect your inbox. Unsubscribe anytime.',
error = 'We couldn’t complete your registration. Please try again.',
emailError = 'Please enter a valid email address.',
requiredError = 'Please enter your {label}.',
sceneImage,
clipImage,
disabled = false,
state = 'default',
onSubmit,
className,
style,
}: ChallengeHero9Props) {
const uid = React.useId().replace(/:/g, '')
const n = days.length
const isDisabled = disabled || state === 'disabled'
const [status, setStatus] = React.useState<Status>(() => statusFor(state))
const [errors, setErrors] = React.useState<Record<string, string>>({})
const mounted = React.useRef(true)
React.useEffect(() => {
setStatus(statusFor(state))
setErrors({})
}, [state])
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
const loading = status === 'loading'
const dayName = (d: ChallengeHero9Day, i: number) => d.label ?? dayLabel.split('{day}').join(String(i + 1))
const clearError = (key: string) =>
setErrors((prev) => {
if (!prev[key]) return prev
const next = { ...prev }
delete next[key]
return next
})
const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault()
if (isDisabled || loading) return
const form = event.currentTarget
const data = new FormData(form)
const values: Record<string, string> = {}
const next: Record<string, string> = {}
for (const field of fields) {
const value = String(data.get(field.name) ?? '').trim()
values[field.name] = value
const isEmail = field.type === 'email'
if (!value || (isEmail && !EMAIL.test(value))) {
next[field.name] = isEmail ? emailError : requiredError.split('{label}').join(field.label.toLowerCase())
}
}
setErrors(next)
const first = fields.find((f) => next[f.name])
if (first) {
setStatus('idle')
const input = form.elements.namedItem(first.name)
if (input instanceof HTMLInputElement) input.focus()
return
}
setStatus('idle')
try {
const result = onSubmit?.(values)
if (!result) return
setStatus('loading')
await result
if (mounted.current) setStatus('idle')
} catch {
if (mounted.current) setStatus('error')
}
}
const btnClass = [
'c9-btn',
state === 'hover' && !loading && !isDisabled ? 'is-hover' : '',
state === 'active' && !loading && !isDisabled ? 'is-active' : '',
isDisabled ? 'is-disabled' : '',
loading ? 'is-loading' : '',
]
.filter(Boolean)
.join(' ')
return (
<section className={['cf-challenge-hero-9', className].filter(Boolean).join(' ')} style={style} aria-labelledby={`${uid}-h1`}>
<style>{CSS}</style>
{sceneImage ? (
<div className='c9-scene' aria-hidden='true'>
<img src={sceneImage} alt='' width={1600} height={900} decoding='async' />
</div>
) : null}
<div className='c9-scrim' aria-hidden='true' />
<div className='c9-stage'>
<header className='c9-head'>
{n > 0 ? (
<p className='c9-count'>
<span className='c9-sr'>{countLabel.split('{count}').join(String(n))}</span>
<span className='c9-num' aria-hidden='true'>{n}</span>
<span className='c9-unit' aria-hidden='true'>
<b>{countUnit}</b>
<span>{countCaption}</span>
</span>
</p>
) : null}
<h1 id={`${uid}-h1`} className='c9-h1'>
<HeadlineText text={headline} highlight={highlight} />
</h1>
{lead ? <p className='c9-lead'>{lead}</p> : null}
</header>
<div className={`c9-board${clipImage ? ' has-clip' : ''}`}>
{clipImage ? (
<span className='c9-clip' aria-hidden='true'>
<img src={clipImage} alt='' width={512} height={512} />
</span>
) : null}
<div className='c9-sheet'>
<div className='c9-sheet-head'>
<p className='c9-name'>{name}</p>
{format ? (
<p className='c9-format'>
<MonitorPlay aria-hidden='true' />
<span>{format}</span>
</p>
) : null}
</div>
<div className='c9-cols'>
<div className='c9-plan'>
<h2 className='c9-h2'>{planTitle}</h2>
<ol className='c9-days'>
{days.map((d, i) => (
<li key={`${i}-${d.title}`} className='c9-day' style={{ '--i': i } as React.CSSProperties}>
<span className='c9-tick' aria-hidden='true'>
<span className='c9-mk'>
<Mark name='check' width={44} height={44} />
</span>
</span>
<div className='c9-day-copy'>
<span className='c9-ribbon'>{dayName(d, i)}</span>
<h3 className='c9-h3'>{d.title}</h3>
{d.detail ? <p>{d.detail}</p> : null}
</div>
</li>
))}
</ol>
</div>
<div className='c9-join' aria-live='polite'>
<form noValidate onSubmit={handleSubmit} aria-labelledby={`${uid}-join`} aria-busy={loading || undefined}>
<h2 id={`${uid}-join`} className='c9-h2'>
{cardTitle}
</h2>
{status === 'error' ? (
<p className='c9-alert' role='alert'>
<AlertCircle aria-hidden='true' />
<span>{error}</span>
</p>
) : null}
<fieldset className='c9-fields' disabled={isDisabled || loading}>
{fields.map((f) => {
const id = `${uid}-${f.name}`
const err = errors[f.name]
return (
<div className={`c9-field${err ? ' is-invalid' : ''}`} key={f.name}>
<label htmlFor={id}>{f.label}</label>
<input
id={id}
name={f.name}
type={f.type ?? 'text'}
autoComplete={f.autoComplete}
placeholder={f.placeholder ?? fieldHint(f.name, f.type)}
className='c9-input'
aria-invalid={err ? true : undefined}
aria-describedby={err ? `${id}-err` : undefined}
onInput={() => clearError(f.name)}
/>
{err ? (
<p id={`${id}-err`} className='c9-err'>
<AlertCircle aria-hidden='true' />
<span>{err}</span>
</p>
) : null}
</div>
)
})}
<button type='submit' className={btnClass}>
{loading ? (
<>
<Loader2 className='c9-spin' aria-hidden='true' />
<span>{loadingLabel}</span>
</>
) : (
<span>{label}</span>
)}
</button>
</fieldset>
{sublabel ? <p className='c9-sub'>{sublabel}</p> : null}
{privacy ? (
<p className='c9-privacy'>
<Lock aria-hidden='true' />
<span>{privacy}</span>
</p>
) : null}
</form>
</div>
</div>
</div>
</div>
</div>
</section>
)
}
export default ChallengeHero9
type Status = 'idle' | 'loading' | 'error'
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
const DEFAULT_DAYS: ChallengeHero9Day[] = [
{ title: 'Plan your funnel', detail: 'Map your offer and the pages your funnel needs.' },
{ title: 'Write your page copy', detail: 'Draft your headline, offer, and call to action.' },
{ title: 'Check it before launch', detail: 'Review the links, forms, and next steps before launch.' },
]
const DEFAULT_FIELDS: ChallengeHero9Field[] = [
{ name: 'name', label: 'Full name', autoComplete: 'name', placeholder: 'Jane Smith' },
{ name: 'email', label: 'Email address', type: 'email', autoComplete: 'email', placeholder: 'you@example.com' },
]
function statusFor(state: ChallengeHero9State): Status {
return state === 'error' ? 'error' : 'idle'
}
function fieldHint(name = '', type = 'text') {
if (type === 'email' || /email/i.test(name)) return 'you@example.com'
if (type === 'tel' || /phone|tel/i.test(name)) return '(555) 123-4567'
if (/first/i.test(name)) return 'Jane'
if (/last/i.test(name)) return 'Smith'
if (/name/i.test(name)) return 'Jane Smith'
return ''
}
function HeadlineText({ text, highlight }: { text: string; highlight?: string }) {
const at = highlight ? text.indexOf(highlight) : -1
if (!highlight || at < 0) return <>{text}</>
return (
<>
{text.slice(0, at)}
<span className='c9-hl'>{highlight}</span>
{text.slice(at + highlight.length)}
</>
)
}
// Warm metal (--c9-gold) is the theme's warning hue blended toward the band text, so it reads on any dark band.
const STYLES = `
& {
--c9-gold: oklch(from color-mix(in oklch, var(--warning) 40%, var(--band-ink)) l calc(c + .05) h);
--c9-gold-hi: oklch(from color-mix(in oklch, var(--warning) 16%, var(--band-ink)) l calc(c + .03) h);
--c9-gold-lo: oklch(from color-mix(in oklch, var(--warning) 60%, var(--band-ink)) l calc(c + .05) h);
--c9-clip: clamp(9rem, 15vw, 12rem);
position: relative; isolation: isolate; overflow: hidden;
background: var(--band); color: var(--band-ink); font-family: var(--font-body);
padding: clamp(3.5rem, 7vw, 6rem) clamp(1rem, 4vw, 2.5rem) clamp(3.5rem, 7vw, 6rem);
}
& *, & *::before, & *::after { box-sizing: border-box; }
& .c9-scene { position: absolute; inset: 0; z-index: -2; }
& .c9-scene img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
& .c9-scrim { position: absolute; inset: 0; z-index: -1; background: oklch(from var(--band) l c h / .84); }
& .c9-stage { position: relative; max-width: 72rem; margin: 0 auto; }
& .c9-head { max-width: 62rem; margin: 0 auto; text-align: center; }
& .c9-count { display: inline-flex; align-items: center; justify-content: center; gap: .9rem; margin: 0 0 clamp(1.1rem, 2.2vw, 1.6rem); }
& .c9-num { font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(4.25rem, 9vw, 7rem); line-height: .8; letter-spacing: -.05em; padding-bottom: .04em; color: var(--c9-gold); font-variant-numeric: lining-nums tabular-nums; }
@supports (color: oklch(from red l c h)) and ((background-clip: text) or (-webkit-background-clip: text)) {
& .c9-num { background: linear-gradient(175deg, var(--c9-gold-hi) 8%, var(--c9-gold) 48%, var(--c9-gold-lo) 92%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
& .c9-unit { display: grid; gap: .45rem; text-align: left; }
& .c9-unit b { font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: .9; letter-spacing: .01em; text-transform: uppercase; color: var(--band-ink); }
& .c9-unit span { font-size: clamp(.95rem, 1.5vw, 1.1rem); font-weight: 700; line-height: 1.1; letter-spacing: .14em; text-transform: uppercase; color: var(--c9-gold); }
& .c9-h1 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 800); text-transform: var(--display-case, none); letter-spacing: var(--display-tracking, -.035em); font-size: clamp(2.75rem, 6.8vw, 5.75rem); line-height: .98; text-wrap: balance; color: var(--band-ink); }
& .c9-hl { color: var(--c9-gold); }
& .c9-lead { margin: clamp(1.1rem, 2vw, 1.6rem) auto 0; max-width: 44rem; font-size: clamp(1.125rem, 1.8vw, 1.375rem); font-weight: 500; line-height: 1.5; text-wrap: pretty; color: color-mix(in oklch, var(--band-ink) 88%, var(--band)); }
& .c9-board { position: relative; max-width: 70rem; margin: clamp(3rem, 5.5vw, 4.25rem) auto 0; padding: clamp(.6rem, 1.3vw, .95rem); border-radius: calc(var(--radius, .75rem) * 1.5); background: linear-gradient(180deg, color-mix(in oklch, var(--band-ink) 19%, var(--band)), color-mix(in oklch, var(--band-ink) 9%, var(--band))); box-shadow: inset 0 1px 0 oklch(from var(--band-ink) l c h / .3), inset 0 0 0 1px oklch(from var(--band-ink) l c h / .12), var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 256 / .22), 0 12px 24px -8px oklch(0.22 0.03 256 / .32)); }
& .c9-board.has-clip { margin-top: calc(var(--c9-clip) * .25 + clamp(3rem, 5.5vw, 4.25rem)); padding-top: calc(var(--c9-clip) * .3); }
& .c9-clip { position: absolute; left: 50%; top: 0; z-index: 2; width: var(--c9-clip); aspect-ratio: 1; transform: translate(-50%, -46%); pointer-events: none; }
& .c9-clip img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px oklch(from var(--shadow) l c h / .5)) drop-shadow(0 8px 8px oklch(from var(--shadow) l c h / .32)); }
& .c9-sheet { position: relative; border-radius: calc(var(--radius, .75rem) * .75); background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px oklch(from var(--ink) l c h / .08), var(--shadow-md, 0 1px 2px oklch(0.22 0.03 256 / .22), 0 4px 10px -2px oklch(0.22 0.03 256 / .2)); padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1.1rem, 3.2vw, 2.75rem); }
& .c9-sheet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-bottom: clamp(.9rem, 1.6vw, 1.15rem); border-bottom: 1px solid oklch(from var(--ink) l c h / .12); }
& .c9-name { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.2; color: var(--ink); }
& .c9-format { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--muted); }
& .c9-format svg { width: 1.15rem; height: 1.15rem; flex: none; color: var(--accent); }
& .c9-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(1.75rem, 4vw, 3.5rem); align-items: start; margin-top: clamp(1.5rem, 3vw, 2.25rem); }
& .c9-h2 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 800); text-transform: var(--display-case, none); font-size: clamp(1.55rem, 2.5vw, 2rem); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; color: var(--ink); }
& .c9-days { list-style: none; margin: clamp(1.25rem, 2.2vw, 1.6rem) 0 0; padding: 0; display: grid; gap: clamp(1.15rem, 2vw, 1.5rem); }
& .c9-day { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 1rem; align-items: start; }
& .c9-tick { position: relative; display: block; width: 2.75rem; height: 2.75rem; border-radius: calc(var(--radius, .75rem) * .6); background: var(--field); border: 2px solid oklch(from var(--ink) l c h / .24); box-shadow: inset 0 1px 2px oklch(from var(--shadow) l c h / .1); }
& .c9-mk { position: absolute; left: .15rem; top: -.75rem; display: block; width: 3rem; height: 3rem; color: var(--success); }
& .c9-mk > * { display: block; width: 100%; height: 100%; }
& .c9-day-copy { min-width: 0; }
& .c9-ribbon { display: inline-flex; align-items: center; min-height: 1.75rem; padding: .25rem .8rem; border-radius: 999px; background: var(--band); color: var(--band-ink); font-size: .875rem; font-weight: 800; line-height: 1; letter-spacing: .08em; text-transform: uppercase; }
& .c9-h3 { margin: .75rem 0 0; font-family: var(--font-display); font-weight: var(--display-weight, 800); font-size: clamp(1.2rem, 1.8vw, 1.35rem); line-height: 1.2; text-wrap: balance; color: var(--ink); }
& .c9-day p { margin: .35rem 0 0; font-size: 1rem; line-height: 1.5; text-wrap: pretty; color: var(--muted); }
& .c9-join { border-radius: var(--radius, .75rem); background: color-mix(in oklch, var(--ink) 4%, var(--card)); box-shadow: inset 0 0 0 1px oklch(from var(--ink) l c h / .07); padding: clamp(1.25rem, 2.6vw, 1.9rem); }
& .c9-join form { margin: 0; }
& .c9-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
& .c9-field { display: grid; gap: .45rem; margin-top: 1.1rem; }
& .c9-field label { font-size: 1.05rem; font-weight: 700; line-height: 1.3; color: var(--label-ink, var(--ink)); }
& .c9-input { width: 100%; min-height: 3.4rem; padding: .75rem 1rem; font-family: var(--font-body); font-size: 1.0625rem; font-weight: 500; line-height: 1.3; color: var(--field-ink); background: var(--field); border: 1.5px solid var(--field-border, color-mix(in oklch, var(--ink) 22%, transparent)); border-radius: var(--field-radius, var(--radius, .75rem)); box-shadow: inset 0 1px 2px oklch(from var(--shadow) l c h / .08); transition: border-color .15s ease, box-shadow .15s ease; }
& .c9-input::placeholder { color: color-mix(in oklch, var(--field-ink) 65%, var(--field)); opacity: 1; }
& .c9-input:hover { border-color: color-mix(in oklch, var(--ink) 38%, transparent); }
& .c9-input:focus-visible { 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 / .3); }
& .c9-input:disabled { cursor: not-allowed; }
& .is-invalid .c9-input { border-color: var(--danger); }
& .is-invalid .c9-input:focus-visible { box-shadow: 0 0 0 3px oklch(from var(--danger) l c h / .25); }
& .c9-err { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .9375rem; font-weight: 600; line-height: 1.35; color: var(--danger); }
& .c9-err svg { width: 1rem; height: 1rem; flex: none; }
& .c9-alert { display: flex; align-items: flex-start; gap: .6rem; margin: 1rem 0 0; padding: .8rem 1rem; border-radius: calc(var(--radius, .75rem) * .75); background: var(--danger-soft); color: var(--danger); font-size: 1rem; font-weight: 600; line-height: 1.4; text-wrap: pretty; }
& .c9-alert svg { width: 1.2rem; height: 1.2rem; flex: none; margin-top: .1rem; }
& .c9-btn { --c9-b1: oklch(from var(--button-bg, var(--cta)) calc(l + .04) c h); --c9-b2: var(--button-bg-2, var(--cta-2)); position: relative; display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; min-height: 4rem; margin-top: 1.5rem; padding: .9rem 1.25rem; border: 0; border-radius: var(--button-radius, var(--radius, .75rem)); background: linear-gradient(180deg, var(--c9-b1), var(--c9-b2)); 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.25rem, 2vw, 1.5rem); line-height: 1.15; letter-spacing: -.01em; text-align: center; text-wrap: balance; text-shadow: var(--button-text-shadow, none); cursor: pointer; box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - .16) c h), 0 1px 2px oklch(from var(--shadow) l c h / .35), 0 6px 12px -4px oklch(from var(--shadow) l c h / .42)); transition: transform .15s ease, box-shadow .15s ease; }
& .c9-btn:hover, & .c9-btn.is-hover { --c9-b1: var(--button-bg, var(--cta)); --c9-b2: oklch(from var(--button-bg-2, var(--cta-2)) calc(l - .04) c h); transform: translateY(-1px); }
& .c9-btn:active, & .c9-btn.is-active { --c9-b1: var(--button-bg-2, var(--cta-2)); --c9-b2: oklch(from var(--button-bg-2, var(--cta-2)) calc(l - .05) c h); transform: translateY(1px); box-shadow: var(--button-shadow, inset 0 2px 3px oklch(from var(--button-bg, var(--cta)) calc(l - .2) c h / .45), inset 0 -1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - .16) c h), 0 1px 1px oklch(from var(--shadow) l c h / .3)); }
& .c9-btn:focus-visible { outline: 3px solid var(--field-focus, var(--accent)); outline-offset: 3px; }
& .c9-btn:disabled:not(.is-loading), & .c9-btn.is-disabled { --c9-b1: var(--button-2-bg, var(--secondary)); --c9-b2: var(--button-2-bg, var(--secondary)); color: var(--button-2-ink, var(--secondary-ink)); text-shadow: none; cursor: not-allowed; transform: none; box-shadow: var(--button-2-shadow, var(--shadow-sm)); }
& .c9-btn.is-loading { cursor: progress; transform: none; }
& .c9-spin { width: 1.35rem; height: 1.35rem; flex: none; animation: cfc9-spin .8s linear infinite; }
& .c9-sub { margin: .85rem 0 0; text-align: center; font-size: 1rem; font-weight: 700; line-height: 1.4; text-wrap: pretty; color: var(--ink); }
& .c9-privacy { display: block; margin: .4rem 0 0; text-align: center; font-size: .875rem; line-height: 1.4; color: var(--muted); }
& .c9-privacy svg { width: .95rem; height: .95rem; display: inline-block; vertical-align: -0.15em; margin-inline-end: .4em; }
& .c9-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes cfc9-in { from { opacity: .82; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cfc9-tick { from { opacity: 0; transform: scale(.5) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes cfc9-drop { from { transform: translate(-50%, -58%); } to { transform: translate(-50%, -46%); } }
@keyframes cfc9-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
& .c9-board { animation: cfc9-in .55s cubic-bezier(.22, 1, .36, 1) both; }
& .c9-clip { animation: cfc9-drop .55s cubic-bezier(.22, 1, .36, 1) .1s both; }
& .c9-day { animation: cfc9-in .45s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * .07s + .15s); }
& .c9-mk { transform-origin: 30% 70%; animation: cfc9-tick .45s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(var(--i, 0) * .18s + .45s); }
}
@media (prefers-reduced-motion: reduce) {
& .c9-btn, & .c9-input { transition: none; }
& .c9-btn:hover, & .c9-btn.is-hover, & .c9-btn:active, & .c9-btn.is-active { transform: none; }
& .c9-spin { animation-duration: 2s; }
}
@media (max-width: 52rem) {
& .c9-cols { grid-template-columns: 1fr; }
}
@media (max-width: 30rem) {
& { padding-inline: .85rem; }
& .c9-count { gap: .7rem; }
& .c9-sheet-head { justify-content: flex-start; }
& .c9-day { grid-template-columns: 2.4rem minmax(0, 1fr); gap: .85rem; }
& .c9-tick { width: 2.4rem; height: 2.4rem; }
& .c9-mk { width: 2.6rem; height: 2.6rem; top: -.65rem; }
}
`
const CSS = STYLES.split('&').join('.cf-challenge-hero-9')
pieces/hero/challenge-hero-9/specimen.tsx 47 lines
import __studioImagef6d5b45a from "../assets/16cf9847d7e31984.webp";
import __studioImage34096c82 from "../assets/0a80f552e9821166.webp";
// Specimen: free challenge registration hero, a dark event stage with a clipboard sign-up sheet.
import * as React from 'react'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { ChallengeHero9, type ChallengeHero9State } from '../challenge-hero-9'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
const sample = defaults.sample
const reg = sample.registration
const fields: React.ComponentProps<typeof ChallengeHero9>['fields'] = sample.fields.map((f) => ({
...f,
placeholder: f.name === 'email' ? 'you@example.com' : 'Jane Smith',
}))
export default function ChallengeHero9Specimen({ state = 'default' }: { state?: ChallengeHero9State }) {
return (
<ChallengeHero9
state={state}
name='Funnel Starter Challenge'
format='Online · On demand'
countUnit='Day'
countCaption='Free challenge'
headline={reg.headline}
highlight='first funnel'
lead='Join the free Funnel Starter Challenge and walk through your offer, page copy, and next steps, one day at a time.'
planTitle='Walk away with a clear plan'
days={[
{ title: 'Plan your funnel', detail: sample.items[0].detail },
{ title: 'Write your page copy', detail: sample.items[1].detail },
{ title: 'Check it before launch', detail: sample.items[2].detail },
]}
cardTitle='Save your free seat'
fields={fields}
label={reg.label}
sublabel='Free challenge · Watch online'
privacy={reg.privacy}
error={reg.error}
sceneImage={slot('scene', __studioImagef6d5b45a)}
clipImage={__studioImage34096c82}
/>
)
}
| Name | Type | Details |
|---|---|---|
name OptionalChallengeHero9 |
string |
Default 'Funnel Starter Challenge'
|
format OptionalChallengeHero9 |
string |
Default 'Online · On demand'
|
countUnit OptionalChallengeHero9 |
string |
Default 'Day'
|
countCaption OptionalChallengeHero9 |
string |
Default 'Free challenge'
|
countLabel OptionalChallengeHero9 |
string |
Default 'Free {count}-day challenge'
|
headline OptionalChallengeHero9 |
string |
Default 'Map out your first funnel'
|
highlight OptionalChallengeHero9 |
string |
Default 'first funnel'
|
lead OptionalChallengeHero9 |
string |
Default 'Join the free Funnel Starter Challenge and walk through your offer, page copy, and next steps, one day at a time.'
|
planTitle OptionalChallengeHero9 |
string |
Default 'Walk away with a clear plan'
|
days OptionalChallengeHero9 |
ChallengeHero9Day[] |
Default DEFAULT_DAYS
|
dayLabel OptionalChallengeHero9 |
string |
Default 'Day {day}'
|
cardTitle OptionalChallengeHero9 |
string |
Default 'Save your free seat'
|
fields OptionalChallengeHero9 |
ChallengeHero9Field[] |
Default DEFAULT_FIELDS
|
label OptionalChallengeHero9 |
string |
Default 'Yes! Save My Seat'
|
loadingLabel OptionalChallengeHero9 |
string |
Default 'Saving your seat…'
|
sublabel OptionalChallengeHero9 |
string |
Default 'Free challenge · Watch online'
|
privacy OptionalChallengeHero9 |
string |
Default 'We respect your inbox. Unsubscribe anytime.'
|
successTitle OptionalChallengeHero9 |
string |
|
success OptionalChallengeHero9 |
string |
|
nextLabel OptionalChallengeHero9 |
string |
|
error OptionalChallengeHero9 |
string |
Default 'We couldn’t complete your registration. Please try again.'
|
emailError OptionalChallengeHero9 |
string |
Default 'Please enter a valid email address.'
|
requiredError OptionalChallengeHero9 |
string |
Default 'Please enter your {label}.'
|
sceneImage OptionalChallengeHero9 |
string |
|
clipImage OptionalChallengeHero9 |
string |
|
disabled OptionalChallengeHero9 |
boolean |
Default false
|
state OptionalChallengeHero9 |
ChallengeHero9State |
Default 'default'
|
onSubmit OptionalChallengeHero9 |
(values: Record<string, string>) => void | Promise<void> |
|
className OptionalChallengeHero9 |
string |
|
style OptionalChallengeHero9 |
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.
--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.
scene- A wide atmosphere photo behind or beside the copy.
-
0a80f552e9821166.webp
image/webp · 153 KB
-
16cf9847d7e31984.webp
image/webp · 18.7 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB