Summit Hero 5
Fills a free summit with Russell's two choices: the free pass and the sign-up form on a light half, the optional All-Access pass on a dark half, and one pass toggle that sets what the button claims.
Use it in a prompt
Use hero/summit-hero-5 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/summit-hero-5.tsx. - Import it and pass your copy and images (Props tab):
import { SummitHero5 } from "@/components/funneldna/hero/summit-hero-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/summit-hero-5/component.tsx 712 lines
// layout: split-contrast
// Fills a free summit with Russell's two choices: the free pass and the sign-up form on a light half, the optional All-Access pass on a dark half, and one pass toggle that sets what the button claims.
'use client'
import * as React from 'react'
import { CalendarDays, Check, CircleAlert, History, Loader2, Lock } from 'lucide-react'
import { Spot } from '../fx/fx'
import calendar from '../fx/spots/calendar'
import play from '../fx/spots/play'
export type SummitHero5State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
/** Which pass the button claims. */
export type SummitHero5Pass = 'free' | 'upgrade'
export type SummitHero5Reason = {
/** Bold lead-in that opens the reason, e.g. 'Keep every session.' */
lead: string
text: string
}
export type SummitHero5Field = {
name: string
label: string
type?: string
autoComplete?: string
placeholder?: string
}
export type SummitHero5FreePass = {
name?: string
/** One line under the pass name. */
line?: string
/** What the free pass includes. */
includes?: string[]
/** Supplied replay terms only. Nothing renders when empty. */
replayWindow?: string
/** Button second line while the free pass is selected. */
sublabel?: string
}
export type SummitHero5Upgrade = {
name: string
/** The supplied price, e.g. '$67'. */
price: string
/** Line under the name. Defaults to copy.upgradeTag with {price} replaced. */
tag?: string
/** Heading over the numbered reasons. */
reasonsTitle?: string
reasons?: SummitHero5Reason[]
/** Short line saying the upgrade is optional. */
note?: string
/** Button second line while this pass is selected. Defaults to copy.upgradeSublabel. */
sublabel?: string
}
export type SummitHero5Props = {
summitName?: string
/** Short line under the summit name, e.g. the event format. */
format?: string
headline?: string
/** One continuous phrase inside the headline that gets the marker stroke. */
highlight?: string
lead?: string
freePass?: SummitHero5FreePass
/** The optional paid pass. Omit it for the no-upgrade variant: the dark half drops and the free pass centres. */
upgrade?: SummitHero5Upgrade
/** Upgrade product shot on the dark half (slot: product), transparent background. */
productImage?: string
productAlt?: string
/** Pass selected on load. */
defaultPass?: SummitHero5Pass
fields?: SummitHero5Field[]
/** First-person button label. */
label?: string
loadingLabel?: string
privacy?: string
/** Shown when onSubmit returns a promise that rejects. */
errorMessage?: string
state?: SummitHero5State
/** Receives trimmed, validated values plus pass ('free' or 'upgrade'). Return a promise to show the loading label. */
onSubmit?: (values: Record<string, string>) => void | Promise<unknown>
/** Called when the visitor switches pass. */
onPassChange?: (pass: SummitHero5Pass) => void
copy?: {
namePlaceholder?: string
emailPlaceholder?: string
phonePlaceholder?: string
/** Replaces {label} with the lower-case field label. */
fieldPlaceholder?: string
/** Replaces {label} with the lower-case field label. */
requiredError?: string
emailError?: string
/** Replaces {price} and {name} with the upgrade's values. */
upgradeTag?: string
/** Replaces {name} and {price} with the upgrade's values. */
upgradeSublabel?: string
/** Accessible name for the form. */
formLabel?: string
/** Prefilled values for the forced error state. */
demoName?: string
demoEmail?: string
}
className?: string
}
export function SummitHero5({
summitName = 'Funnel Starter Workshop',
format = 'Free on-demand workshop',
headline = 'Map out your first funnel',
highlight = 'first funnel',
lead = 'Join the Funnel Starter Workshop and walk through your offer, page copy, and next steps.',
freePass,
upgrade,
productImage,
productAlt = 'Everything the upgrade adds, shown together',
defaultPass = 'free',
fields = DEFAULT_FIELDS,
label = 'Yes! Save My Seat',
loadingLabel = 'Saving your seat…',
privacy = 'We respect your inbox. Unsubscribe anytime.',
errorMessage = 'We couldn’t complete your registration. Please try again.',
state = 'default',
onSubmit,
onPassChange,
copy = {},
className,
}: SummitHero5Props) {
const {
namePlaceholder = 'Jane Smith',
emailPlaceholder = 'you@example.com',
phonePlaceholder = '(555) 123-4567',
fieldPlaceholder = 'Your {label}',
requiredError = 'Please enter your {label}.',
emailError = 'Enter an email like name@example.com.',
upgradeTag = 'Optional upgrade · {price}',
upgradeSublabel = '{name} · {price}',
formLabel = 'Registration',
demoName = 'Alex Morgan',
demoEmail = 'alex@email',
} = copy
const messages: Messages = { requiredError, emailError }
const uid = React.useId()
const formRef = React.useRef<HTMLFormElement>(null)
const alive = React.useRef(true)
const hasUpgrade = Boolean(upgrade)
const [pass, setPass] = React.useState<SummitHero5Pass>(defaultPass)
const passRef = React.useRef<SummitHero5Pass>(pass)
passRef.current = pass
const [values, setValues] = React.useState<Record<string, string>>(() =>
state === 'error' ? demoValues(fields, demoName, demoEmail) : {},
)
const [errors, setErrors] = React.useState<Record<string, string>>(() =>
state === 'error' ? validate(fields, demoValues(fields, demoName, demoEmail), messages) : {},
)
const [busy, setBusy] = React.useState(false)
const [failed, setFailed] = React.useState(false)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
React.useEffect(() => {
const next = state === 'error' ? demoValues(fields, demoName, demoEmail) : {}
setValues(next)
setErrors(state === 'error' ? validate(fields, next, messages) : {})
setBusy(false)
setFailed(false)
passRef.current = defaultPass
setPass(defaultPass)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state])
const free = { ...DEFAULT_FREE, ...freePass }
const includes = free.includes ?? []
const current: SummitHero5Pass = hasUpgrade ? pass : 'free'
const disabled = state === 'disabled'
const force = state === 'hover' || state === 'active' ? state : undefined
const blocked = disabled || Object.keys(errors).length > 0
const [before, marked, after] = splitHighlight(headline, highlight)
const freeId = `${uid}-free`
const upId = `${uid}-upgrade`
const groupName = `${uid}-pass`
const upTag = upgrade ? upgrade.tag ?? fill(upgradeTag, { price: upgrade.price, name: upgrade.name }) : ''
const sub =
current === 'upgrade' && upgrade
? upgrade.sublabel ?? fill(upgradeSublabel, { name: upgrade.name, price: upgrade.price })
: free.sublabel
const reasons = upgrade?.reasons ?? []
const choose = (next: SummitHero5Pass) => {
if (disabled || !hasUpgrade || passRef.current === next) return
passRef.current = next
setPass(next)
onPassChange?.(next)
}
const placeholderFor = (field: SummitHero5Field) => {
if (field.placeholder) return field.placeholder
if (isEmailField(field)) return emailPlaceholder
if (field.type === 'tel') return phonePlaceholder
if (isNameField(field)) return namePlaceholder
return fieldPlaceholder.replace('{label}', field.label.toLowerCase())
}
const recheck = (field: SummitHero5Field, value: string) => {
const message = fieldError(field, value.trim(), messages)
setErrors((prev) => {
const next = { ...prev }
if (message) next[field.name] = message
else delete next[field.name]
return next
})
}
const onChange = (field: SummitHero5Field) => (event: React.ChangeEvent<HTMLInputElement>) => {
const value = event.target.value
setValues((prev) => ({ ...prev, [field.name]: value }))
if (failed) setFailed(false)
if (errors[field.name]) recheck(field, value)
}
const onBlur = (field: SummitHero5Field) => () => {
const value = (values[field.name] ?? '').trim()
if (!value) return
recheck(field, value)
}
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
if (blocked || busy) return
const clean = trimValues(fields, values)
const next = validate(fields, clean, messages)
setErrors(next)
const first = fields.find((f) => next[f.name])
if (first) {
const input = formRef.current?.elements.namedItem(first.name)
if (input instanceof HTMLInputElement) input.focus()
return
}
setFailed(false)
try {
const result = onSubmit?.({ ...clean, pass: current })
if (!result || typeof (result as Promise<unknown>).then !== 'function') return
setBusy(true)
await result
} catch {
if (alive.current) setFailed(true)
} finally {
if (alive.current) setBusy(false)
}
}
return (
<section
className={`cf-summit-hero-5${className ? ` ${className}` : ''}`}
data-upgrade={hasUpgrade ? 'true' : 'false'}
data-pass={current}
data-force={force}
data-disabled={disabled ? 'true' : undefined}
aria-labelledby={`${uid}-h`}
>
<style>{CSS}</style>
<div className='sh5-grid'>
<header className='sh5-cell sh5-cell-head'>
<p className='sh5-lockup sh5-rise'>
<span className='sh5-disc' aria-hidden='true'>
<CalendarDays strokeWidth={2.5} />
</span>
<span className='sh5-lockup-text'>
<strong>{summitName}</strong>
{format ? <span>{format}</span> : null}
</span>
</p>
<h1 id={`${uid}-h`} className='sh5-h1 sh5-rise' style={{ '--i': 1 } as React.CSSProperties}>
{before}
{marked ? <span className='sh5-mark'>{marked}</span> : null}
{after}
</h1>
{lead ? (
<p className='sh5-lead sh5-rise' style={{ '--i': 2 } as React.CSSProperties}>
{keepWords(lead)}
</p>
) : null}
</header>
<div className='sh5-cell sh5-cell-free'>
<div
className='sh5-pass'
data-choice={hasUpgrade ? 'true' : 'false'}
data-selected={hasUpgrade && current === 'free' ? 'true' : 'false'}
onClick={hasUpgrade ? () => choose('free') : undefined}
>
{hasUpgrade ? (
<input
type='radio'
className='sh5-radio'
id={freeId}
name={groupName}
value='free'
checked={current === 'free'}
onChange={() => choose('free')}
disabled={disabled}
aria-describedby={free.line ? `${freeId}-d` : undefined}
/>
) : null}
<div className='sh5-top'>
{hasUpgrade ? (
<span className='sh5-dot' aria-hidden='true'>
<Check strokeWidth={3} />
</span>
) : null}
<div className='sh5-top-text'>
{hasUpgrade ? (
<label htmlFor={freeId} className='sh5-name'>
{keepWords(free.name ?? '')}
</label>
) : (
<h2 className='sh5-name'>{keepWords(free.name ?? '')}</h2>
)}
{free.line ? (
<p id={`${freeId}-d`} className='sh5-line'>
{keepWords(free.line)}
</p>
) : null}
</div>
<span className='sh5-spot'>
<Spot src={calendar} size={56} />
</span>
</div>
{includes.length ? (
<ul className='sh5-incl'>
{includes.map((item) => (
<li key={item}>
<Check aria-hidden='true' strokeWidth={2.5} />
<span>{keepWords(item)}</span>
</li>
))}
</ul>
) : null}
{free.replayWindow ? (
<p className='sh5-replay'>
<History className='sh5-ico' aria-hidden='true' strokeWidth={2.5} />
{free.replayWindow}
</p>
) : null}
</div>
</div>
{upgrade ? (
<div className='sh5-cell sh5-dark'>
<div className='sh5-dark-in'>
{productImage ? (
<img className='sh5-product' src={productImage} alt={productAlt} width={512} height={512} decoding='async' />
) : null}
<div className='sh5-up' data-selected={current === 'upgrade' ? 'true' : 'false'} onClick={() => choose('upgrade')}>
<input
type='radio'
className='sh5-radio'
id={upId}
name={groupName}
value='upgrade'
checked={current === 'upgrade'}
onChange={() => choose('upgrade')}
disabled={disabled}
aria-describedby={upTag ? `${upId}-d` : undefined}
/>
<div className='sh5-top'>
<span className='sh5-dot' aria-hidden='true'>
<Check strokeWidth={3} />
</span>
<div className='sh5-top-text'>
<label htmlFor={upId} className='sh5-name'>
{keepWords(upgrade.name)}
</label>
{upTag ? (
<p id={`${upId}-d`} className='sh5-line'>
{keepWords(upTag)}
</p>
) : null}
</div>
{productImage ? null : (
<span className='sh5-spot'>
<Spot src={play} size={56} />
</span>
)}
</div>
{reasons.length ? (
<div className='sh5-why'>
{upgrade.reasonsTitle ? <h2 className='sh5-why-title'>{keepWords(upgrade.reasonsTitle)}</h2> : null}
<ol className='sh5-reasons'>
{reasons.map((reason, i) => (
<li key={`${reason.lead}-${i}`}>
<span className='sh5-n' aria-hidden='true'>
{i + 1}
</span>
<p>
<strong>{keepWords(reason.lead)}</strong> {keepWords(reason.text)}
</p>
</li>
))}
</ol>
</div>
) : null}
{upgrade.note ? <p className='sh5-note'>{keepWords(upgrade.note)}</p> : null}
</div>
</div>
</div>
) : null}
<div className='sh5-cell sh5-cell-form'>
<form ref={formRef} className='sh5-form' noValidate onSubmit={handleSubmit} aria-label={formLabel}>
<div className='sh5-fields'>
{fields.map((field) => {
const id = `${uid}-${field.name}`
const error = errors[field.name]
return (
<div className='sh5-field' key={field.name}>
<label htmlFor={id}>{field.label}</label>
<input
id={id}
name={field.name}
type={field.type ?? 'text'}
autoComplete={field.autoComplete}
placeholder={placeholderFor(field)}
className='sh5-input'
value={values[field.name] ?? ''}
onChange={onChange(field)}
onBlur={onBlur(field)}
disabled={disabled}
aria-invalid={error ? true : undefined}
aria-describedby={error ? `${id}-e` : undefined}
/>
{error ? (
<p id={`${id}-e`} className='sh5-err'>
<CircleAlert className='sh5-ico' aria-hidden='true' strokeWidth={2.5} />
{error}
</p>
) : null}
</div>
)
})}
</div>
<button type='submit' className='sh5-btn' disabled={blocked} aria-busy={busy || undefined}>
<span className='sh5-btn-label'>
{busy ? <Loader2 className='sh5-spin' aria-hidden='true' strokeWidth={2.5} /> : null}
{busy ? loadingLabel : label}
</span>
{sub ? (
<span key={current} className='sh5-btn-sub'>
{sub}
</span>
) : null}
</button>
{failed ? (
<p className='sh5-fail' role='alert'>
<CircleAlert className='sh5-ico' aria-hidden='true' strokeWidth={2.5} />
{errorMessage}
</p>
) : null}
{privacy ? (
<p className='sh5-privacy'>
<Lock className='sh5-ico' aria-hidden='true' strokeWidth={2.5} />
{privacy}
</p>
) : null}
</form>
</div>
</div>
</section>
)
}
export default SummitHero5
type Messages = { requiredError: string; emailError: string }
const DEFAULT_FIELDS: SummitHero5Field[] = [
{ name: 'name', label: 'Full name', autoComplete: 'name' },
{ name: 'email', label: 'Email address', type: 'email', autoComplete: 'email' },
]
const DEFAULT_FREE: SummitHero5FreePass = {
name: 'Free pass',
line: 'Watch the whole workshop online',
includes: ['Walk through your offer and page copy', 'Map your next steps before you launch'],
sublabel: 'Free workshop · Watch online',
}
const EMAIL_RE = /^[^ @]+@[^ @]+[.][^ @.]{2,}$/
function splitHighlight(text: string, phrase?: string): [string, string, string] {
if (!phrase) return [text, '', '']
const i = text.toLowerCase().indexOf(phrase.toLowerCase())
if (i < 0) return [text, '', '']
return [text.slice(0, i), text.slice(i, i + phrase.length), text.slice(i + phrase.length)]
}
/** Keeps hyphenated words (All-Access, wind-down, one-time) whole, so phones never break a line at the hyphen. */
function keepWords(text: string): React.ReactNode {
if (!text || !text.includes('-')) return text
return text.split(/(\S*\w-\w\S*)/).map((part, i) =>
i % 2 ? (
<span key={i} className='sh5-nobr'>
{part}
</span>
) : (
part
),
)
}
function fill(template: string, vars: Record<string, string>) {
return Object.keys(vars).reduce((out, key) => out.split('{' + key + '}').join(vars[key]), template)
}
function isEmailField(field: SummitHero5Field) {
return field.type === 'email' || field.name.toLowerCase().includes('email')
}
function isNameField(field: SummitHero5Field) {
return field.name.toLowerCase().includes('name') || (field.autoComplete ?? '').includes('name')
}
function fieldError(field: SummitHero5Field, value: string, messages: Messages) {
if (!value) return messages.requiredError.replace('{label}', field.label.toLowerCase())
if (isEmailField(field) && !EMAIL_RE.test(value)) return messages.emailError
return ''
}
function validate(fields: SummitHero5Field[], values: Record<string, string>, messages: Messages) {
const errors: Record<string, string> = {}
for (const field of fields) {
const message = fieldError(field, (values[field.name] ?? '').trim(), messages)
if (message) errors[field.name] = message
}
return errors
}
function trimValues(fields: SummitHero5Field[], values: Record<string, string>) {
const out: Record<string, string> = {}
for (const field of fields) out[field.name] = (values[field.name] ?? '').trim()
return out
}
function demoValues(fields: SummitHero5Field[], demoName: string, demoEmail: string) {
const out: Record<string, string> = {}
for (const field of fields) {
if (isEmailField(field)) out[field.name] = demoEmail
else if (isNameField(field)) out[field.name] = demoName
}
return out
}
const CSS = `
.cf-summit-hero-5 {
--sh5-gut: clamp(16px, 5vw, 48px);
--sh5-shadow: var(--shadow, oklch(0.22 0.03 260));
--sh5-marker: var(--marker, #fae37c);
--sh5-ease: cubic-bezier(.2, .7, .2, 1);
--sh5-card-radius: var(--card-radius, var(--radius, 14px));
container-type: inline-size;
position: relative;
overflow-x: clip;
background: var(--surface);
color: var(--ink);
font-family: var(--font-body);
}
.cf-summit-hero-5 *, .cf-summit-hero-5 *::before, .cf-summit-hero-5 *::after { box-sizing: border-box; }
.cf-summit-hero-5 .sh5-grid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'free' 'dark' 'form'; }
.cf-summit-hero-5[data-upgrade='false'] .sh5-grid { grid-template-areas: 'head' 'free' 'form'; }
.cf-summit-hero-5 .sh5-cell { padding-inline: max(var(--sh5-gut), calc((100cqw - 46rem) / 2)); }
.cf-summit-hero-5[data-upgrade='false'] .sh5-cell { padding-inline: max(var(--sh5-gut), calc((100cqw - 40rem) / 2)); }
.cf-summit-hero-5 .sh5-cell-head { grid-area: head; padding-top: clamp(56px, 8vw, 112px); padding-bottom: 32px; }
.cf-summit-hero-5 .sh5-cell-free { grid-area: free; padding-bottom: 40px; }
.cf-summit-hero-5 .sh5-cell-form { grid-area: form; align-self: start; padding-top: 32px; padding-bottom: clamp(64px, 8.5vw, 120px); }
.cf-summit-hero-5[data-upgrade='false'] .sh5-cell-free { padding-bottom: 24px; }
.cf-summit-hero-5[data-upgrade='false'] .sh5-cell-form { padding-top: 0; }
.cf-summit-hero-5[data-upgrade='false'] .sh5-cell-head { text-align: center; }
.cf-summit-hero-5[data-upgrade='false'] .sh5-lockup { justify-content: center; }
.cf-summit-hero-5[data-upgrade='false'] .sh5-lead { margin-inline: auto; }
.cf-summit-hero-5 .sh5-dark { grid-area: dark; padding-block: 40px 48px; background: var(--band); color: var(--band-ink); }
.cf-summit-hero-5 .sh5-lockup { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; }
.cf-summit-hero-5 .sh5-disc { flex: none; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: color-mix(in oklch, var(--ink) 6%, var(--surface)); color: var(--accent); }
.cf-summit-hero-5 .sh5-disc svg { width: 20px; height: 20px; }
.cf-summit-hero-5 .sh5-lockup-text { display: grid; gap: 2px; text-align: left; }
.cf-summit-hero-5 .sh5-lockup-text strong { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 800; line-height: 1.2; color: var(--ink); }
.cf-summit-hero-5 .sh5-lockup-text span { font-size: .9375rem; font-weight: 500; line-height: 1.4; color: var(--muted); }
.cf-summit-hero-5 .sh5-h1 { 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, 4.2vw, 3.75rem); line-height: 1.04; color: var(--ink); text-wrap: balance; }
.cf-summit-hero-5 .sh5-mark { background-image: linear-gradient(color-mix(in oklch, var(--sh5-marker) 82%, transparent), color-mix(in oklch, var(--sh5-marker) 82%, transparent)); background-repeat: no-repeat; background-size: 100% .56em; background-position: 0 90%; padding-inline: .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cf-summit-hero-5 .sh5-nobr { white-space: nowrap; }
.cf-summit-hero-5 .sh5-lead { margin: 18px 0 0; max-width: 60ch; font-size: clamp(1.125rem, 1.5vw, 1.375rem); font-weight: 500; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.cf-summit-hero-5 .sh5-pass { position: relative; padding: clamp(20px, 3vw, 32px); background: var(--card); color: var(--ink); border: 1px solid var(--card-border, oklch(from var(--ink) l c h / .12)); border-radius: var(--sh5-card-radius); box-shadow: var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / .22), 0 4px 10px -2px oklch(0.22 0.03 260 / .2))); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.cf-summit-hero-5 .sh5-pass[data-choice='true'] { cursor: pointer; }
.cf-summit-hero-5:not([data-disabled='true']) .sh5-pass[data-choice='true'][data-selected='false']:hover { border-color: oklch(from var(--ink) l c h / .32); box-shadow: var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 260 / .22), 0 12px 24px -8px oklch(0.22 0.03 260 / .32)); }
.cf-summit-hero-5 .sh5-pass[data-selected='true'] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 260 / .22), 0 12px 24px -8px oklch(0.22 0.03 260 / .32)); }
.cf-summit-hero-5 .sh5-pass:has(.sh5-radio:focus-visible) { outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / .55); outline-offset: 4px; }
.cf-summit-hero-5 .sh5-radio { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.cf-summit-hero-5 .sh5-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.cf-summit-hero-5 .sh5-pass[data-choice='false'] .sh5-top { grid-template-columns: minmax(0, 1fr) auto; }
.cf-summit-hero-5 .sh5-top-text { display: grid; gap: 4px; min-width: 0; text-align: left; }
.cf-summit-hero-5 .sh5-name { display: block; margin: 0; font-family: var(--font-display); font-size: clamp(1.3125rem, 1.8vw, 1.625rem); font-weight: var(--display-weight, 800); line-height: 1.15; letter-spacing: -0.01em; color: inherit; text-wrap: balance; }
.cf-summit-hero-5 [data-choice='true'] .sh5-name, .cf-summit-hero-5 .sh5-up .sh5-name { cursor: pointer; }
.cf-summit-hero-5[data-disabled='true'] .sh5-pass, .cf-summit-hero-5[data-disabled='true'] .sh5-up, .cf-summit-hero-5[data-disabled='true'] .sh5-name { cursor: not-allowed; }
.cf-summit-hero-5 .sh5-line { margin: 0; font-size: .9375rem; font-weight: 600; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.cf-summit-hero-5 .sh5-dot { flex: none; width: 28px; height: 28px; margin-top: 1px; border-radius: 999px; display: grid; place-items: center; background: var(--card); border: 2px solid color-mix(in oklch, var(--ink) 38%, var(--card)); color: transparent; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.cf-summit-hero-5 .sh5-dot svg { width: 16px; height: 16px; }
.cf-summit-hero-5:not([data-disabled='true']) .sh5-pass:hover .sh5-dot { border-color: var(--accent); }
.cf-summit-hero-5 .sh5-pass[data-selected='true'] .sh5-dot { background: var(--accent-fill, var(--accent)); border-color: var(--accent); color: var(--accent-fill-ink, var(--card)); }
.cf-summit-hero-5 .sh5-spot { display: block; line-height: 0; }
.cf-summit-hero-5 .sh5-incl { list-style: none; margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid oklch(from var(--ink) l c h / .12); display: grid; gap: 12px; text-align: left; }
.cf-summit-hero-5 .sh5-incl li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.cf-summit-hero-5 .sh5-incl svg { width: 18px; height: 18px; margin-top: .22em; color: var(--success); }
.cf-summit-hero-5 .sh5-replay { margin: 16px 0 0; padding: 12px 16px; border-radius: 10px; background: color-mix(in oklch, var(--ink) 4%, var(--card)); font-size: .9375rem; font-weight: 600; line-height: 1.4; color: var(--ink); text-align: left; text-wrap: pretty; }
.cf-summit-hero-5 .sh5-replay .sh5-ico { color: var(--accent); }
.cf-summit-hero-5 .sh5-ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em; margin-inline-end: .4em; }
.cf-summit-hero-5 .sh5-dark-in { display: grid; gap: 16px; justify-items: center; }
.cf-summit-hero-5 .sh5-product { display: block; width: min(100%, 220px); height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 2px 3px oklch(from var(--sh5-shadow) calc(l - .08) c h / .55)) drop-shadow(0 14px 18px oklch(from var(--sh5-shadow) calc(l - .08) c h / .5)); }
.cf-summit-hero-5 .sh5-up { position: relative; width: 100%; padding: clamp(20px, 3vw, 32px); border-radius: var(--sh5-card-radius); background: color-mix(in oklab, var(--band-ink) 7%, var(--band)); border: 1px solid color-mix(in oklab, var(--band-ink) 20%, var(--band)); color: var(--band-ink); cursor: pointer; transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.cf-summit-hero-5:not([data-disabled='true']) .sh5-up[data-selected='false']:hover { background: color-mix(in oklab, var(--band-ink) 10%, var(--band)); border-color: color-mix(in oklab, var(--band-ink) 42%, var(--band)); }
.cf-summit-hero-5 .sh5-up[data-selected='true'] { background: color-mix(in oklab, var(--band-ink) 11%, var(--band)); border-color: var(--band-ink); box-shadow: 0 0 0 1px var(--band-ink), 0 2px 4px oklch(from var(--sh5-shadow) calc(l - .1) c h / .5), 0 14px 26px -10px oklch(from var(--sh5-shadow) calc(l - .1) c h / .6); }
.cf-summit-hero-5 .sh5-up:has(.sh5-radio:focus-visible) { outline: 3px solid var(--band-ink); outline-offset: 4px; }
.cf-summit-hero-5 .sh5-up .sh5-line { color: color-mix(in oklab, var(--band-ink) 84%, var(--band)); }
.cf-summit-hero-5 .sh5-up .sh5-dot { background: var(--band); border-color: color-mix(in oklab, var(--band-ink) 60%, var(--band)); }
.cf-summit-hero-5:not([data-disabled='true']) .sh5-up:hover .sh5-dot { border-color: var(--band-ink); }
.cf-summit-hero-5 .sh5-up[data-selected='true'] .sh5-dot { background: var(--band-ink); border-color: var(--band-ink); color: var(--band); }
.cf-summit-hero-5 .sh5-why { margin-top: 20px; padding-top: 20px; border-top: 1px solid color-mix(in oklab, var(--band-ink) 18%, var(--band)); }
.cf-summit-hero-5 .sh5-why-title { margin: 0 0 16px; font-family: var(--font-display); font-size: clamp(1.3125rem, 1.8vw, 1.625rem); font-weight: var(--display-weight, 800); letter-spacing: -0.01em; line-height: 1.15; color: var(--band-ink); text-wrap: balance; }
.cf-summit-hero-5 .sh5-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.cf-summit-hero-5 .sh5-reasons li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 12px; align-items: baseline; }
.cf-summit-hero-5 .sh5-n { font-family: var(--font-display); font-size: clamp(1.3125rem, 1.8vw, 1.625rem); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--band-ink); }
.cf-summit-hero-5 .sh5-reasons p { margin: 0; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.5; color: color-mix(in oklab, var(--band-ink) 86%, var(--band)); text-wrap: pretty; }
.cf-summit-hero-5 .sh5-reasons strong { font-weight: 700; color: var(--band-ink); }
.cf-summit-hero-5 .sh5-note { margin: 20px 0 0; font-size: .9375rem; font-weight: 600; line-height: 1.4; color: color-mix(in oklab, var(--band-ink) 84%, var(--band)); text-wrap: pretty; }
.cf-summit-hero-5 .sh5-form { display: grid; gap: 16px; }
.cf-summit-hero-5 .sh5-fields { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.cf-summit-hero-5 .sh5-field { display: grid; gap: 8px; align-content: start; min-width: 0; text-align: left; }
.cf-summit-hero-5 .sh5-field label { font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--label-ink, var(--ink)); }
.cf-summit-hero-5 .sh5-input { width: 100%; height: 56px; padding: 0 16px; font-family: var(--font-body); 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-summit-hero-5 .sh5-input::placeholder { color: color-mix(in oklch, var(--field-ink) 65%, var(--field)); opacity: 1; }
.cf-summit-hero-5 .sh5-input: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-summit-hero-5 .sh5-input[aria-invalid='true'] { border-color: var(--danger); }
.cf-summit-hero-5 .sh5-input[aria-invalid='true']:focus { box-shadow: 0 0 0 3px oklch(from var(--danger) l c h / .3); }
.cf-summit-hero-5 .sh5-input:disabled { cursor: not-allowed; background: color-mix(in oklch, var(--ink) 4%, var(--field)); }
.cf-summit-hero-5 .sh5-err { margin: 0; font-size: .9375rem; font-weight: 600; line-height: 1.4; color: var(--danger); text-wrap: pretty; }
.cf-summit-hero-5 .sh5-fail { margin: 0; padding: 12px 16px; border-radius: 10px; background: var(--danger-soft, color-mix(in oklch, var(--danger) 14%, var(--card))); color: var(--danger); font-size: .9375rem; font-weight: 600; line-height: 1.4; text-wrap: pretty; }
.cf-summit-hero-5 .sh5-privacy { margin: 0; text-align: center; font-size: .9375rem; font-weight: 500; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.cf-summit-hero-5 .sh5-btn {
--sh5-b: var(--button-bg, var(--cta));
--sh5-b2: var(--button-bg-2, var(--cta-2));
position: relative; width: 100%; min-height: 72px; margin: 4px 0 0; padding: 12px clamp(16px, 4vw, 28px);
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
border: 0; border-radius: var(--button-radius, var(--radius, 12px));
font-family: var(--button-font, var(--font-display)); font-weight: var(--button-weight, 800); text-transform: var(--button-case, none);
color: var(--button-ink, var(--cta-ink)); text-shadow: var(--button-text-shadow, none);
background: linear-gradient(oklch(from var(--sh5-b) calc(l + .04) c h), oklch(from var(--sh5-b2) calc(l - .02) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--sh5-b) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--sh5-b) calc(l - .16) c h), 0 1px 2px oklch(from var(--sh5-shadow) l c h / .3), 0 8px 16px -6px oklch(from var(--sh5-shadow) l c h / .45));
cursor: pointer; -webkit-tap-highlight-color: transparent;
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.cf-summit-hero-5 .sh5-btn:not(:disabled):hover, .cf-summit-hero-5[data-force='hover'] .sh5-btn:not(:disabled) { background: linear-gradient(oklch(from var(--sh5-b) calc(l - .01) c h), oklch(from var(--sh5-b2) calc(l - .07) c h)); box-shadow: inset 0 1px 0 oklch(from var(--sh5-b) calc(l + .1) c h / .6), inset 0 -3px 0 oklch(from var(--sh5-b) calc(l - .2) c h), 0 1px 2px oklch(from var(--sh5-shadow) l c h / .32), 0 12px 20px -6px oklch(from var(--sh5-shadow) l c h / .5); }
.cf-summit-hero-5 .sh5-btn:not(:disabled):active, .cf-summit-hero-5[data-force='active'] .sh5-btn:not(:disabled) { background: linear-gradient(oklch(from var(--sh5-b) calc(l - .04) c h), oklch(from var(--sh5-b2) calc(l - .08) c h)); box-shadow: inset 0 2px 4px oklch(from var(--sh5-b) calc(l - .22) c h / .55), inset 0 -2px 0 oklch(from var(--sh5-b) calc(l - .16) c h), 0 1px 2px oklch(from var(--sh5-shadow) l c h / .3); }
.cf-summit-hero-5 .sh5-btn:focus-visible { outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / .6); outline-offset: 3px; }
.cf-summit-hero-5 .sh5-btn:disabled { background: var(--secondary, oklch(0.93 0.015 263)); color: var(--secondary-ink, var(--ink)); box-shadow: var(--button-2-shadow, var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / .18), 0 1px 3px oklch(0.22 0.03 260 / .14))); text-shadow: none; cursor: not-allowed; }
.cf-summit-hero-5 .sh5-btn[aria-busy='true'] { cursor: progress; }
.cf-summit-hero-5 .sh5-btn-label { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: clamp(1.125rem, 1.55vw, 1.375rem); line-height: 1.15; text-wrap: balance; }
.cf-summit-hero-5 .sh5-btn-sub { display: block; font-family: var(--font-body); font-size: .9375rem; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; color: color-mix(in oklab, var(--button-ink, var(--cta-ink)) 90%, var(--sh5-b)); text-wrap: pretty; }
.cf-summit-hero-5 .sh5-btn:disabled .sh5-btn-sub { color: var(--secondary-ink, var(--ink)); }
.cf-summit-hero-5 .sh5-spin { width: 20px; height: 20px; flex: none; }
@container (min-width: 960px) {
.cf-summit-hero-5[data-upgrade='true'] .sh5-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: 'head dark' 'free dark' 'form dark'; grid-template-rows: auto auto 1fr; }
.cf-summit-hero-5[data-upgrade='true'] .sh5-cell { padding-left: max(var(--sh5-gut), calc((100cqw - 1120px) / 2)); padding-right: clamp(32px, 4vw, 64px); }
.cf-summit-hero-5[data-upgrade='true'] .sh5-cell-free { padding-bottom: 32px; }
.cf-summit-hero-5[data-upgrade='true'] .sh5-cell-form { padding-top: 0; }
.cf-summit-hero-5[data-upgrade='true'] .sh5-dark { padding: clamp(56px, 8vw, 112px) max(var(--sh5-gut), calc((100cqw - 1120px) / 2)) clamp(64px, 8.5vw, 120px) clamp(32px, 4.5vw, 72px); }
.cf-summit-hero-5 .sh5-dark-in { max-width: 500px; }
.cf-summit-hero-5 .sh5-product { width: min(100%, 290px); }
}
@container (max-width: 559px) {
.cf-summit-hero-5 .sh5-dark { padding-block: 32px 40px; }
.cf-summit-hero-5 .sh5-product { width: min(100%, 188px); }
.cf-summit-hero-5 .sh5-top { gap: 12px; }
.cf-summit-hero-5 .sh5-reasons { gap: 12px; }
.cf-summit-hero-5 .sh5-why { margin-top: 16px; padding-top: 16px; }
.cf-summit-hero-5 .sh5-note { margin-top: 16px; }
.cf-summit-hero-5[data-upgrade='true'] .sh5-cell-form { padding-top: 40px; }
}
@media (prefers-reduced-motion: no-preference) {
.cf-summit-hero-5 .sh5-rise { animation: sh5-rise .45s var(--sh5-ease) both; animation-delay: calc(var(--i, 0) * .07s); }
.cf-summit-hero-5 .sh5-pass[data-selected='true'], .cf-summit-hero-5 .sh5-up[data-selected='true'] { animation: sh5-pop .3s var(--sh5-ease); }
.cf-summit-hero-5 .sh5-btn-sub { animation: sh5-rise .3s var(--sh5-ease) both; }
.cf-summit-hero-5 .sh5-spin { animation: sh5-spin .8s linear infinite; }
.cf-summit-hero-5:not([data-disabled='true']) .sh5-pass[data-choice='true'][data-selected='false']:hover { transform: translateY(-2px); }
.cf-summit-hero-5:not([data-disabled='true']) .sh5-up[data-selected='false']:hover { transform: translateY(-2px); }
.cf-summit-hero-5 .sh5-btn:not(:disabled):hover, .cf-summit-hero-5[data-force='hover'] .sh5-btn:not(:disabled) { transform: translateY(-1px); }
.cf-summit-hero-5 .sh5-btn:not(:disabled):active, .cf-summit-hero-5[data-force='active'] .sh5-btn:not(:disabled) { transform: translateY(1px); }
}
@keyframes sh5-rise { from { opacity: .82; transform: translateY(8px); } }
@keyframes sh5-pop { from { transform: scale(.98); } }
@keyframes sh5-spin { to { transform: rotate(360deg); } }
`
pieces/hero/summit-hero-5/specimen.tsx 55 lines
import __studioImagee87a6ee4 from "../assets/7ea44486b848dd3c.webp";
// Specimen: the Sleep Reset Summit, a free online wellness summit (fictional facts), with its optional All-Access pass.
import * as React from 'react'
import { SummitHero5, type SummitHero5State } from '../summit-hero-5'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function SummitHero5Specimen({ state = 'default' }: { state?: SummitHero5State }) {
const registration = defaults.sample.registration
return (
<SummitHero5
state={state}
summitName='Sleep Reset Summit'
format='Free online summit · 5 live evenings'
headline='Five evenings to finally reset your sleep'
highlight='reset your sleep'
lead='Join sleep coaches live from home and leave with a simple wind-down routine you can start the same night.'
freePass={{
name: 'Free pass',
line: 'Watch all 5 sessions live, free',
includes: [
'5 live evening sessions with sleep coaches',
'Ask your questions in the live chat',
'The Night-One wind-down checklist',
],
replayWindow: 'Missed one? Each session replays free for 24 hours.',
sublabel: 'Free pass · 5 live evening sessions',
}}
upgrade={{
name: 'All-Access pass',
price: '$67',
tag: 'Optional upgrade · $67 one-time',
reasonsTitle: 'Three reasons All-Access is $67',
reasons: [
{ lead: 'Keep every session.', text: 'Lifetime replays of all 5 talks, so a late night never costs you one.' },
{ lead: 'Do it, not just watch it.', text: 'The Sleep Reset Workbook turns each talk into your own wind-down plan.' },
{ lead: 'Hear the extras.', text: 'Bonus Q&A recordings with every speaker, ready when you are.' },
],
note: 'Totally optional. Your free pass is yours either way.',
sublabel: 'All-Access pass · $67 one-time',
}}
productImage={slot(
'product',
__studioImagee87a6ee4,
)}
productAlt='The All-Access pass: every session replay on a tablet beside the Sleep Reset Workbook'
label='Yes! Save my Sleep Reset pass'
loadingLabel='Saving your pass…'
privacy={registration.privacy}
errorMessage={registration.error}
/>
)
}
| Name | Type | Details |
|---|---|---|
summitName OptionalSummitHero5 |
string |
Default 'Funnel Starter Workshop'
|
format OptionalSummitHero5 |
string |
Default 'Free on-demand workshop'
|
headline OptionalSummitHero5 |
string |
Default 'Map out your first funnel'
|
highlight OptionalSummitHero5 |
string |
Default 'first funnel'
|
lead OptionalSummitHero5 |
string |
Default 'Join the Funnel Starter Workshop and walk through your offer, page copy, and next steps.'
|
freePass OptionalSummitHero5 |
SummitHero5FreePass |
|
upgrade OptionalSummitHero5 |
SummitHero5Upgrade |
|
productImage OptionalSummitHero5 |
string |
|
productAlt OptionalSummitHero5 |
string |
Default 'Everything the upgrade adds, shown together'
|
defaultPass OptionalSummitHero5 |
SummitHero5Pass |
Default 'free'
|
fields OptionalSummitHero5 |
SummitHero5Field[] |
Default DEFAULT_FIELDS
|
label OptionalSummitHero5 |
string |
Default 'Yes! Save My Seat'
|
loadingLabel OptionalSummitHero5 |
string |
Default 'Saving your seat…'
|
privacy OptionalSummitHero5 |
string |
Default 'We respect your inbox. Unsubscribe anytime.'
|
errorMessage OptionalSummitHero5 |
string |
Default 'We couldn’t complete your registration. Please try again.'
|
state OptionalSummitHero5 |
SummitHero5State |
Default 'default'
|
onSubmit OptionalSummitHero5 |
(values: Record<string, string>) => void | Promise<unknown> |
|
onPassChange OptionalSummitHero5 |
(pass: SummitHero5Pass) => void |
|
copy OptionalSummitHero5 |
{
namePlaceholder?: string
emailPlaceholder?: string
phonePlaceholder?: string
/** Replaces {label} with the lower-case field label. */
fieldPlaceholder?: string
/** Replaces {label} with the lower-case field label. */
requiredError?: string
emailError?: string
/** Replaces {price} and {name} with the upgrade's values. */
upgradeTag?: string
/** Replaces {name} and {price} with the upgrade's values. */
upgradeSublabel?: string
/** Accessible name for the form. */
formLabel?: string
/** Prefilled values for the forced error state. */
demoName?: string
demoEmail?: string
} |
Default {}
|
className OptionalSummitHero5 |
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-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).
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
7ea44486b848dd3c.webp
image/webp · 153 KB
-
839cc020060f63a3.webp
image/webp · 9.49 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB