Summit Hero 1
Registers workshop attendees for a free seat with a short, validated form beside the event promise.
Use it in a prompt
Use hero/summit-hero 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.tsx. - Import it and pass your copy and images (Props tab):
import { SummitHero } from "@/components/funneldna/hero/summit-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/summit-hero/component.tsx 437 lines
// Registers workshop attendees for a free seat with a short, validated form beside the event promise.
'use client'
import * as React from 'react'
import { CircleAlert, CircleCheck, Loader2, Lock, Presentation } from 'lucide-react'
/** 'success' is accepted for older callers and renders as default. */
export type SummitHeroState = 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
export type SummitHeroFact = {
/** Short display value, e.g. 'Online', or a supplied count such as '24'. */
value: string
/** What the value means, e.g. 'Where' or 'Sessions'. */
label: string
}
export type SummitHeroField = {
name: string
label: string
type?: string
autoComplete?: string
placeholder?: string
}
export type SummitHeroProps = {
summitName?: string
format?: string
headline?: string
/** One continuous phrase inside the headline that gets the marker stroke. */
highlight?: string
lead?: string
/** Supplied facts only. Counts (sessions, speakers) go here when they are real. */
facts?: SummitHeroFact[]
passTitle?: string
passSubtitle?: string
badgeLabel?: string
badgeValue?: string
fields?: SummitHeroField[]
label?: string
loadingLabel?: string
sublabel?: string
privacy?: string
/** @deprecated No longer rendered: the builder wires what happens after registration. */
successMessage?: string
errorMessage?: string
emailHint?: string
/** @deprecated No longer rendered. */
editLabel?: string
/** Optional stage or event photo, used faintly behind the band and on the card behind the pass. */
sceneImage?: string
/** Legacy alias for sceneImage. */
backgroundImage?: string
state?: SummitHeroState
/** Receives validated values. A returned promise shows the loading label; a rejection shows errorMessage. */
onSubmit?: (values: Record<string, string>) => void | Promise<void>
/** Legacy alias for onSubmit. */
onRegister?: (values: Record<string, string>) => void | Promise<void>
copy?: {
emailPlaceholder?: string
namePlaceholder?: string
/** Replaces {label} with the lower-case field label. */
requiredError?: string
/** @deprecated No longer rendered. */
registeredLabel?: string
}
className?: string
}
export function SummitHero({
summitName = 'Funnel Starter Workshop',
format = 'Free on-demand workshop',
headline = 'Map out your first funnel',
highlight,
lead,
facts = [],
passTitle = 'Claim your free seat',
passSubtitle = 'Enter your details to save your seat.',
badgeLabel = 'Ticket',
badgeValue = 'Free',
fields = DEFAULT_FIELDS,
label = 'Yes! Save My Seat',
loadingLabel = 'Saving your seat…',
sublabel,
privacy = 'We respect your inbox. Unsubscribe anytime.',
errorMessage = 'We couldn’t complete your registration. Please try again.',
emailHint = 'Enter an email like name@example.com.',
backgroundImage,
sceneImage = backgroundImage,
state = 'default',
onRegister,
onSubmit = onRegister,
copy = {},
className,
}: SummitHeroProps) {
const {
emailPlaceholder = 'you@example.com',
namePlaceholder = 'Your full name',
requiredError = 'Please enter your {label}.',
} = copy
const uid = React.useId()
const emailField = fields.find((f) => f.type === 'email') ?? fields[fields.length - 1]
const forcedInvalid = (s?: SummitHeroState): Record<string, boolean> =>
s === 'error' && emailField ? { [emailField.name]: true } : {}
const [status, setStatus] = React.useState<Status>(() => initialStatus(state))
const [values, setValues] = React.useState<Record<string, string>>({})
const [invalid, setInvalid] = React.useState<Record<string, boolean>>(() => forcedInvalid(state))
const mounted = React.useRef(true)
React.useEffect(() => {
setStatus(initialStatus(state))
setInvalid(forcedInvalid(state))
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state])
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
const disabled = state === 'disabled'
const force = state === 'hover' || state === 'active' ? state : undefined
const loading = status === 'loading'
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
if (disabled || loading) return
const next: Record<string, boolean> = {}
for (const field of fields) {
const value = (values[field.name] ?? '').trim()
if (!value || (field.type === 'email' && !looksLikeEmail(value))) next[field.name] = true
}
setInvalid(next)
const firstBad = fields.find((f) => next[f.name])
if (firstBad) {
setStatus('error')
const el = event.currentTarget.elements.namedItem(firstBad.name)
if (el instanceof HTMLInputElement) el.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 [before, marked, after] = splitHighlight(headline, highlight)
const columns = Math.min(Math.max(facts.length, 1), 4)
return (
<section className={`cf-summit-hero shx ${className ?? ''}`.trim()} aria-labelledby={`${uid}-h`}>
<style>{CSS}</style>
{sceneImage ? (
<div className="shx-bg" aria-hidden="true">
<img src={sceneImage} alt="" decoding="async" />
</div>
) : null}
<div className="shx-inner">
<div className="shx-copy">
<div className="shx-lock shx-rise" style={{ '--d': '0ms' } as React.CSSProperties}>
<span className="shx-lock-icon" aria-hidden="true">
<Presentation size={24} strokeWidth={2.25} />
</span>
<span className="shx-lock-text">
<span className="shx-lock-name">{summitName}</span>
{format ? <span className="shx-lock-format">{format}</span> : null}
</span>
</div>
<h1 id={`${uid}-h`} className="shx-h1 shx-rise" style={{ '--d': '70ms' } as React.CSSProperties}>
{before}
{marked ? <span className="shx-mark">{marked}</span> : null}
{after}
</h1>
{lead ? (
<p className="shx-lead shx-rise" style={{ '--d': '140ms' } as React.CSSProperties}>
{lead}
</p>
) : null}
{facts.length ? (
<ul
className="shx-facts shx-rise"
style={{ '--d': '210ms', '--n': columns } as React.CSSProperties}
>
{facts.map((fact) => (
<li className="shx-fact" key={`${fact.label}-${fact.value}`}>
<span className="shx-fact-value">{fact.value}</span>
<span className="shx-fact-label">{fact.label}</span>
</li>
))}
</ul>
) : null}
</div>
<div className="shx-pass-wrap">
<div className="shx-pass-back" aria-hidden="true">
{sceneImage ? <img src={sceneImage} alt="" decoding="async" /> : null}
</div>
<div className="shx-pass">
<div className="shx-pass-head">
<div>
<h2 className="shx-pass-title">{passTitle}</h2>
{passSubtitle ? <p className="shx-pass-sub">{passSubtitle}</p> : null}
</div>
{badgeValue ? (
<div className="shx-badge">
{badgeLabel ? <span>{badgeLabel}</span> : null}
<strong>{badgeValue}</strong>
</div>
) : null}
</div>
<div aria-live="polite">
<form className="shx-form" onSubmit={handleSubmit} noValidate>
{status === 'error' ? (
<div className="shx-alert" role="alert">
<CircleAlert size={20} aria-hidden="true" />
<span>{errorMessage}</span>
</div>
) : null}
{fields.map((field) => {
const id = `${uid}-${field.name}`
const bad = !!invalid[field.name]
return (
<div className="shx-field" key={field.name}>
<label className="shx-label" htmlFor={id}>
{field.label}
</label>
<input
id={id}
name={field.name}
className="shx-input"
type={field.type ?? 'text'}
autoComplete={field.autoComplete}
placeholder={placeholderFor(field, emailPlaceholder, namePlaceholder)}
value={values[field.name] ?? ''}
disabled={disabled || loading}
aria-invalid={bad || undefined}
aria-describedby={bad ? `${id}-err` : undefined}
onChange={(e) => {
const v = e.target.value
setValues((prev) => ({ ...prev, [field.name]: v }))
if (bad) setInvalid((prev) => ({ ...prev, [field.name]: false }))
}}
/>
{bad ? (
<p className="shx-field-err" id={`${id}-err`}>
<CircleAlert size={16} aria-hidden="true" />
{field.type === 'email' ? emailHint : requiredError.replaceAll('{label}', () => field.label.toLowerCase())}
</p>
) : null}
</div>
)
})}
<button
type="submit"
className="shx-btn"
data-force={force}
disabled={disabled}
aria-busy={loading || undefined}
>
{loading ? (
<>
<Loader2 className="shx-spin" size={24} strokeWidth={2.5} aria-hidden="true" />
<span className="shx-btn-label">{loadingLabel}</span>
</>
) : (
<span className="shx-btn-label">{label}</span>
)}
</button>
{sublabel ? (
<p className="shx-note">
<CircleCheck size={18} strokeWidth={2.5} aria-hidden="true" />
{sublabel}
</p>
) : null}
{privacy ? (
<p className="shx-privacy">
<Lock size={15} strokeWidth={2.25} aria-hidden="true" />
{privacy}
</p>
) : null}
</form>
</div>
</div>
</div>
</div>
</section>
)
}
export default SummitHero
type Status = 'idle' | 'loading' | 'error'
const DEFAULT_FIELDS: SummitHeroField[] = [
{ name: 'name', label: 'Full name', autoComplete: 'name' },
{ name: 'email', label: 'Email address', type: 'email', autoComplete: 'email' },
]
function placeholderFor(field: SummitHeroField, emailPlaceholder: string, namePlaceholder: string) {
if (field.placeholder) return field.placeholder
if (field.type === 'email') return emailPlaceholder
if (field.name === 'name' || field.autoComplete === 'name') return namePlaceholder
return field.label
}
function looksLikeEmail(value: string) {
const v = value.trim()
if (!v || v.includes(' ')) return false
const at = v.indexOf('@')
if (at < 1) return false
const domain = v.slice(at + 1)
const dot = domain.lastIndexOf('.')
return dot > 0 && dot < domain.length - 1
}
function splitHighlight(headline: string, highlight?: string): [string, string, string] {
if (!highlight) return [headline, '', '']
const i = headline.toLowerCase().indexOf(highlight.toLowerCase())
if (i < 0) return [headline, '', '']
return [headline.slice(0, i), headline.slice(i, i + highlight.length), headline.slice(i + highlight.length)]
}
function initialStatus(state?: SummitHeroState): Status {
if (state === 'error') return 'error'
return 'idle'
}
// Photographic artwork uses replaceable slots; close shadows derive from the surface token.
const CSS = `
.cf-summit-hero{position:relative;isolation:isolate;overflow:hidden;background:var(--band,#0f2747);color:var(--band-ink,#fff);font-family:var(--font-body,Arial,sans-serif);
--shx-marker:color-mix(in oklch,var(--marker,#fae37c) 20%,var(--card));--shx-marker-ink:var(--ink);
--shx-soft:var(--band-ink,#fff);
--shx-line:oklch(from var(--band-ink,#fff) l c h / 0.16);
--shx-err:var(--danger);--bx:16px;--by:-16px;--br:2.5deg}
.cf-summit-hero *,.cf-summit-hero *::before,.cf-summit-hero *::after{box-sizing:border-box}
:where(.cf-summit-hero) .shx-bg{position:absolute;inset:0;z-index:-1;pointer-events:none}
:where(.cf-summit-hero) .shx-bg img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 40%;opacity:.2;filter:saturate(.75)}
:where(.cf-summit-hero) .shx-inner{position:relative;max-width:1200px;margin:0 auto;padding:clamp(52px,7vw,104px) clamp(20px,4vw,48px) clamp(60px,7.5vw,112px);display:grid;grid-template-columns:minmax(0,1fr);gap:56px}
@media (min-width:1024px){
:where(.cf-summit-hero) .shx-inner{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:clamp(48px,5vw,88px);align-items:start}
:where(.cf-summit-hero) .shx-copy{padding-top:14px}
:where(.cf-summit-hero) .shx-pass-wrap{justify-self:end}
}
:where(.cf-summit-hero) .shx-copy{min-width:0}
:where(.cf-summit-hero) .shx-lock{display:flex;align-items:center;gap:14px;margin:0 0 28px}
:where(.cf-summit-hero) .shx-lock-icon{flex:0 0 auto;width:50px;height:50px;border-radius:14px;display:grid;place-items:center;background:var(--shx-marker);color:var(--shx-marker-ink);box-shadow:0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.17)}
:where(.cf-summit-hero) .shx-lock-text{display:flex;flex-direction:column;gap:3px;min-width:0}
:where(.cf-summit-hero) .shx-lock-name{font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,800);font-size:18px;line-height:1.2;color:var(--band-ink,#fff);text-wrap:balance;letter-spacing:var(--display-tracking,normal);text-transform:var(--display-case,none)}
:where(.cf-summit-hero) .shx-lock-format{font-size:15px;font-weight:600;line-height:1.35;color:var(--shx-soft);text-wrap:pretty}
:where(.cf-summit-hero) .shx-h1{margin:0;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(2.625rem,1.3rem + 4.3vw,5rem);line-height:1.02;letter-spacing:var(--display-tracking,-.03em);color:var(--band-ink,#fff);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-summit-hero) .shx-mark{color:var(--shx-marker-ink);background:var(--shx-marker);padding:0 .1em;margin:0 -.02em;border-radius:.12em .3em .16em .34em;-webkit-box-decoration-break:clone;box-decoration-break:clone;box-shadow:0 .06em 0 oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.14)}
:where(.cf-summit-hero) .shx-lead{margin:24px 0 0;font-size:clamp(1.125rem,1rem + .55vw,1.375rem);line-height:1.5;font-weight:500;color:var(--shx-soft);max-width:44ch;text-wrap:pretty}
:where(.cf-summit-hero) .shx-facts{list-style:none;margin:36px 0 0;padding:0;max-width:560px;display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,1fr));background:var(--band);border:1px solid var(--shx-line);border-radius:var(--card-radius,var(--radius,16px));box-shadow:var(--card-shadow,var(--shadow-md, 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.22), 0 4px 10px -2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.2)));overflow:hidden;border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12))}
:where(.cf-summit-hero) .shx-fact{display:flex;flex-direction:column;gap:6px;padding:18px;min-width:0}
:where(.cf-summit-hero) .shx-fact + .shx-fact{border-left:1px solid var(--shx-line)}
:where(.cf-summit-hero) .shx-fact-value{font-family:var(--font-display,Arial,sans-serif);font-weight:900;font-size:clamp(1.125rem,.6rem + 1vw,1.5rem);line-height:1.1;letter-spacing:-.01em;color:var(--band-ink,#fff);white-space:nowrap}
:where(.cf-summit-hero) .shx-fact-label{font-size:14px;font-weight:600;line-height:1.3;color:var(--shx-soft)}
@media (min-width:560px) and (max-width:1023px){:where(.cf-summit-hero) .shx-fact-value{font-size:1.5rem}}
:where(.cf-summit-hero) .shx-pass-wrap{position:relative;width:100%;max-width:540px}
:where(.cf-summit-hero) .shx-pass-back{position:absolute;inset:0;z-index:0;border-radius:var(--card-radius,var(--radius,24px));overflow:hidden;background:color-mix(in oklab,var(--accent-fill,var(--accent,#0f5fc2)) 55%,var(--band,#0f2747));transform:translate(var(--bx),var(--by)) rotate(var(--br));box-shadow:var(--card-shadow,var(--shadow-md, 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.22), 0 4px 10px -2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.2)));border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12))}
:where(.cf-summit-hero) .shx-pass-back img{display:block;width:100%;height:100%;object-fit:cover;opacity:.6}
:where(.cf-summit-hero) .shx-pass{position:relative;z-index:1;background:var(--card,#fff);color:var(--ink,#101828);border-radius:var(--card-radius,var(--radius,22px));padding:clamp(22px,3vw,34px);box-shadow:var(--card-shadow,var(--shadow-md, 0 1px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.22), 0 4px 10px -2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.2)));border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12))}
:where(.cf-summit-hero) .shx-pass-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 24px}
:where(.cf-summit-hero) .shx-pass-head > div{min-width:0}
:where(.cf-summit-hero) .shx-pass-title{margin:0;font-family:var(--font-display,Arial,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(1.5rem,1.2rem + 1vw,1.875rem);line-height:1.1;letter-spacing:var(--display-tracking,-.02em);color:var(--ink,#101828);text-wrap:balance;text-transform:var(--display-case,none)}
:where(.cf-summit-hero) .shx-pass-sub{margin:10px 0 0;font-size:16px;font-weight:500;line-height:1.45;color:var(--muted,#4a5565);text-wrap:pretty}
:where(.cf-summit-hero) .shx-badge{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 16px 12px;border-radius:14px;background:var(--shx-marker);color:var(--shx-marker-ink);transform:rotate(-3deg);box-shadow:0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.17)}
:where(.cf-summit-hero) .shx-badge span{font-size:14px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;line-height:1}
:where(.cf-summit-hero) .shx-badge strong{font-family:var(--font-display,Arial,sans-serif);font-weight:900;font-size:28px;line-height:1;letter-spacing:-.02em}
:where(.cf-summit-hero) .shx-alert{display:flex;gap:10px;align-items:flex-start;margin:0 0 18px;padding:12px 14px;border-radius:var(--card-radius,var(--radius,12px));background:var(--danger-soft);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));color:var(--danger);font-size:15px;font-weight:600;line-height:1.45;text-wrap:pretty}
:where(.cf-summit-hero) .shx-alert svg{flex:0 0 auto;margin-top:1px}
:where(.cf-summit-hero) .shx-field{display:grid;gap:8px;margin:0 0 16px}
:where(.cf-summit-hero) .shx-label{font-size:16px;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
:where(.cf-summit-hero) .shx-input{width:100%;height:58px;padding:0 16px;font-family:var(--font-body,Arial,sans-serif);font-size:18px;font-weight:500;background:var(--field,#fff);color:var(--field-ink,#101828);border:1.5px solid var(--field-border,oklch(from var(--ink) l c h / 0.22));border-radius:var(--field-radius,var(--radius,12px));box-shadow:inset 0 2px 3px oklch(from var(--surface) calc(l - 0.12) c h / .06);outline:none;transition:border-color .16s ease,box-shadow .16s ease}
:where(.cf-summit-hero) .shx-input::placeholder{color:color-mix(in oklch, var(--field-ink) 65%, var(--field));opacity:1}
:where(.cf-summit-hero) .shx-input:hover:not(:disabled){border-color:var(--field-focus,var(--accent))}
:where(.cf-summit-hero) .shx-input:focus-visible{border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / 0.22)}
:where(.cf-summit-hero) .shx-input[aria-invalid=true]{border-color:var(--danger);box-shadow:0 0 0 3px oklch(from var(--danger) l c h / 0.22)}
:where(.cf-summit-hero) .shx-input:disabled{background:var(--field);cursor:not-allowed}
:where(.cf-summit-hero) .shx-field-err{display:flex;align-items:center;gap:6px;margin:0;font-size:14px;font-weight:600;line-height:1.4;color:var(--shx-err)}
:where(.cf-summit-hero) .shx-field-err svg{flex:0 0 auto}
:where(.cf-summit-hero) .shx-btn{position:relative;width:100%;min-height:68px;margin:8px 0 0;display:inline-flex;align-items:center;justify-content:center;gap:12px;padding:12px 18px;border-radius:var(--button-radius,var(--radius,14px));border:1px solid var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h));background:linear-gradient(180deg,var(--button-bg,var(--cta)),var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h)));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);font-size:clamp(1.125rem,1rem + .6vw,1.375rem);line-height:1.15;letter-spacing:-.005em;text-shadow:var(--button-text-shadow, 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h / 0.75));cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:var(--button-shadow,0 3px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.24));transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;border-color:var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h));text-transform:var(--button-case,none)}
:where(.cf-summit-hero) .shx-btn-label{text-wrap:balance;text-align:center}
:where(.cf-summit-hero) .shx-btn:hover:not(:disabled),:where(.cf-summit-hero) .shx-btn[data-force=hover]{background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h);transform:translateY(-2px);box-shadow:var(--button-shadow,0 3px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.24))}
:where(.cf-summit-hero) .shx-btn:active:not(:disabled),:where(.cf-summit-hero) .shx-btn[data-force=active]{background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h);transform:translateY(4px);box-shadow:var(--button-shadow,0 3px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.24))}
:where(.cf-summit-hero) .shx-btn:focus-visible{outline:3px solid var(--accent,#0f5fc2);outline-offset:4px}
:where(.cf-summit-hero) .shx-btn[aria-busy=true]{cursor:progress}
:where(.cf-summit-hero) .shx-btn:disabled{cursor:not-allowed;background:var(--button-bg,var(--cta));color:var(--button-ink,var(--cta-ink));border-color:var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h));text-shadow:none;filter:none;transform:none;box-shadow:var(--button-shadow,0 3px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.24))}
:where(.cf-summit-hero) .shx-spin{animation:shx-spin .9s linear infinite}
:where(.cf-summit-hero) .shx-note{display:flex;align-items:center;justify-content:center;gap:8px;margin:18px 0 0;font-size:15px;font-weight:700;line-height:1.4;color:var(--ink,#101828);text-align:center;text-wrap:pretty}
:where(.cf-summit-hero) .shx-note svg{flex:0 0 auto;color:var(--success)}
:where(.cf-summit-hero) .shx-privacy{display:flex;align-items:center;justify-content:center;gap:7px;margin:8px 0 0;font-size:14px;font-weight:500;line-height:1.4;color:var(--muted,#4a5565);text-align:center;text-wrap:pretty}
:where(.cf-summit-hero) .shx-privacy svg{flex:0 0 auto}
@media (max-width:559px){
.cf-summit-hero{--bx:8px;--by:-12px;--br:2deg}
:where(.cf-summit-hero) .shx-facts{grid-template-columns:1fr}
:where(.cf-summit-hero) .shx-fact{flex-direction:row;align-items:baseline;justify-content:space-between;gap:16px;padding:14px 18px}
:where(.cf-summit-hero) .shx-fact + .shx-fact{border-left:0;border-top:1px solid var(--shx-line)}
:where(.cf-summit-hero) .shx-fact-label{order:-1;font-size:15px}
:where(.cf-summit-hero) .shx-fact-value{font-size:1.25rem}
:where(.cf-summit-hero) .shx-pass-head{gap:12px}
:where(.cf-summit-hero) .shx-badge{padding:9px 13px 11px}
:where(.cf-summit-hero) .shx-badge strong{font-size:24px}
}
@media (prefers-reduced-motion:no-preference){
:where(.cf-summit-hero) .shx-rise{animation:shx-rise .5s cubic-bezier(.2,.8,.2,1) both;animation-delay:var(--d,0ms)}
:where(.cf-summit-hero) .shx-pass-wrap{animation:shx-card .6s cubic-bezier(.2,.8,.2,1) .12s both}
:where(.cf-summit-hero) .shx-pass-back{animation:shx-back .8s cubic-bezier(.2,.8,.2,1) .2s both}
}
@media (prefers-reduced-motion:reduce){
:where(.cf-summit-hero) .shx-btn,:where(.cf-summit-hero) .shx-input{transition:none}
:where(.cf-summit-hero) .shx-btn:hover:not(:disabled),:where(.cf-summit-hero) .shx-btn[data-force=hover]{transform:none}
:where(.cf-summit-hero) .shx-spin{animation-duration:2.4s}
}
@keyframes shx-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes shx-card{from{opacity:.82;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes shx-back{from{transform:translate(0,0) rotate(0deg)}to{transform:translate(var(--bx),var(--by)) rotate(var(--br))}}
@keyframes shx-spin{to{transform:rotate(360deg)}}
`
pieces/hero/summit-hero/specimen.tsx 43 lines
import __studioImage8eebcb1b from "../assets/707a5e4def84a520.webp";
import * as React from 'react'
import SummitHero, { type SummitHeroState } from '../summit-hero'
import { slot } from '../../slots'
import defaults from '../../studio-defaults.json'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function SummitHeroSpecimen({ state = 'default' }: { state?: string }) {
const reg = defaults.sample.registration
const fields = defaults.sample.fields.map((f) => ({
...f,
placeholder: f.name === 'email' ? 'you@example.com' : 'Your full name',
}))
return (
<div>
<SummitHero
state={state as SummitHeroState}
summitName={reg.name}
format={reg.eyebrow}
headline={reg.headline}
highlight="your first funnel"
lead={reg.lead}
facts={[
{ value: 'Free', label: 'Your ticket' },
{ value: 'Online', label: 'Where' },
{ value: 'On-demand', label: 'When' },
]}
passTitle="Claim your free seat"
passSubtitle="Enter your details to start watching."
badgeLabel="Ticket"
badgeValue="Free"
fields={fields}
label={reg.label}
sublabel={reg.sublabel}
privacy={reg.privacy}
errorMessage={reg.error}
sceneImage={slot('scene', __studioImage8eebcb1b)}
/>
</div>
)
}
| Name | Type | Details |
|---|---|---|
summitName OptionalSummitHero |
string |
Default 'Funnel Starter Workshop'
|
format OptionalSummitHero |
string |
Default 'Free on-demand workshop'
|
headline OptionalSummitHero |
string |
Default 'Map out your first funnel'
|
highlight OptionalSummitHero |
string |
|
lead OptionalSummitHero |
string |
|
facts OptionalSummitHero |
SummitHeroFact[] |
Default []
|
passTitle OptionalSummitHero |
string |
Default 'Claim your free seat'
|
passSubtitle OptionalSummitHero |
string |
Default 'Enter your details to save your seat.'
|
badgeLabel OptionalSummitHero |
string |
Default 'Ticket'
|
badgeValue OptionalSummitHero |
string |
Default 'Free'
|
fields OptionalSummitHero |
SummitHeroField[] |
Default DEFAULT_FIELDS
|
label OptionalSummitHero |
string |
Default 'Yes! Save My Seat'
|
loadingLabel OptionalSummitHero |
string |
Default 'Saving your seat…'
|
sublabel OptionalSummitHero |
string |
|
privacy OptionalSummitHero |
string |
Default 'We respect your inbox. Unsubscribe anytime.'
|
successMessage OptionalSummitHero |
string |
|
errorMessage OptionalSummitHero |
string |
Default 'We couldn’t complete your registration. Please try again.'
|
emailHint OptionalSummitHero |
string |
Default 'Enter an email like name@example.com.'
|
editLabel OptionalSummitHero |
string |
|
sceneImage OptionalSummitHero |
string |
Default backgroundImage
|
backgroundImage OptionalSummitHero |
string |
|
state OptionalSummitHero |
SummitHeroState |
Default 'default'
|
onSubmit OptionalSummitHero |
(values: Record<string, string>) => void | Promise<void> |
Default onRegister
|
onRegister OptionalSummitHero |
(values: Record<string, string>) => void | Promise<void> |
|
copy OptionalSummitHero |
{
emailPlaceholder?: string
namePlaceholder?: string
/** Replaces {label} with the lower-case field label. */
requiredError?: string
/** @deprecated No longer rendered. */
registeredLabel?: string
} |
Default {}
|
className OptionalSummitHero |
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.
--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.
scene- A wide atmosphere photo behind or beside the copy.
-
707a5e4def84a520.webp
image/webp · 54.5 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB