Summit Hero 4
Fills free summit seats with the host's own invitation: the host stands on a colour block beside a speech card that says why they gathered the speakers, and the free-pass button opens the name and email fields in place, so the first click is a small yes.
Use it in a prompt
Use hero/summit-hero-4 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-4.tsx. - Import it and pass your copy and images (Props tab):
import { SummitHero4 } from "@/components/funneldna/hero/summit-hero-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/summit-hero-4/component.tsx 560 lines
// layout: presenter-cutout
// Fills free summit seats with the host's own invitation: the host stands on a colour block beside a speech card that says why they gathered the speakers, and the free-pass button opens the name and email fields in place, so the first click is a small yes.
'use client'
import * as React from 'react'
import { CircleAlert, Loader2, Lock, Quote } from 'lucide-react'
import { FX_HOST, Texture } from '../fx/fx'
import leak from '../fx/textures/leak'
export type SummitHero4State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type SummitHero4Count = {
/** A supplied figure only, e.g. a real session or speaker count. */
value: string
label: string
}
export type SummitHero4Field = {
name: string
label: string
type?: string
autoComplete?: string
placeholder?: string
}
export type SummitHero4Props = {
headline?: string
/** One continuous phrase inside the headline that gets the colour-block swipe. */
highlight?: string
lead?: string
/** Supplied session or speaker counts only. Nothing renders when empty. */
counts?: SummitHero4Count[]
/** The host's three short lines: the struggle, the discovery, why they gathered the speakers. The last line is set bold. */
story?: React.ReactNode[]
/** Sign-off under the story. Nothing renders when empty. */
hostName?: string
hostRole?: string
/** Host cut-out on a transparent background (slot: presenter-cutout). Without it the block runs as one column. */
presenterCutoutImage?: string
presenterAlt?: string
/** Name on the pass caption beside the action. */
summitName?: string
/** Short line under the summit name on the pass caption. */
passNote?: string
/** Lanyard pass image on a transparent background (slot: product). */
productImage?: string
productAlt?: string
/** Step one: the small-yes button that opens the fields in place. */
openLabel?: string
/** One short reassurance line under the first button. */
openNote?: string
fields?: SummitHero4Field[]
/** Step two: the submit button. */
submitLabel?: string
loadingLabel?: string
privacy?: string
/** Shown when onSubmit returns a promise that rejects. */
errorMessage?: string
state?: SummitHero4State
/** Called when the first button opens the fields. */
onAction?: () => void
/** Receives validated, trimmed values. Return a promise to show the loading label. */
onSubmit?: (values: Record<string, string>) => void | Promise<unknown>
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
/** Shown under the submit button while it is locked. */
incompleteHint?: string
/** Accessible name for the counts list. */
countsLabel?: string
/** Prefilled values for the forced error state. */
demoName?: string
demoEmail?: string
}
className?: string
}
export function SummitHero4({
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.',
counts = [],
story = DEFAULT_STORY,
hostName = '',
hostRole = '',
presenterCutoutImage,
presenterAlt = 'Your workshop host',
summitName = 'Funnel Starter Workshop',
passNote = 'Free on-demand workshop',
productImage,
productAlt = 'Free workshop pass on a lanyard',
openLabel = 'Yes! Save My Seat',
openNote = 'Free workshop · Watch online',
fields = DEFAULT_FIELDS,
submitLabel = 'Save My Free Seat',
loadingLabel = 'Saving your seat…',
privacy = 'We respect your inbox. Unsubscribe anytime.',
errorMessage = 'We couldn’t complete your registration. Please try again.',
state = 'default',
onAction,
onSubmit,
copy = {},
className,
}: SummitHero4Props) {
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.',
incompleteHint = 'Add your details above to continue.',
countsLabel = 'At a glance',
demoName = 'Alex Morgan',
demoEmail = 'alex@email',
} = copy
const messages: Messages = { requiredError, emailError }
const uid = React.useId()
const formId = `${uid}-form`
const hintId = `${uid}-hint`
const openerRef = React.useRef<HTMLButtonElement>(null)
const formRef = React.useRef<HTMLFormElement>(null)
const focusNext = React.useRef<'field' | 'opener' | null>(null)
const dirty = React.useRef<Record<string, boolean>>({})
const alive = React.useRef(true)
const forced = state === 'error'
const [open, setOpen] = React.useState(forced)
const [values, setValues] = React.useState<Record<string, string>>(() =>
forced ? demoValues(fields, demoName, demoEmail) : {},
)
const [touched, setTouched] = React.useState<Record<string, boolean>>(() => (forced ? allTrue(fields) : {}))
const [busy, setBusy] = React.useState(false)
const [failed, setFailed] = React.useState(false)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
React.useEffect(() => {
const isError = state === 'error'
setOpen(isError)
setValues(isError ? demoValues(fields, demoName, demoEmail) : {})
setTouched(isError ? allTrue(fields) : {})
dirty.current = {}
setBusy(false)
setFailed(false)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state])
// The signature: focus follows the reveal, and returns to the button on collapse.
React.useEffect(() => {
const target = focusNext.current
focusNext.current = null
if (target === 'field' && open) {
formRef.current?.querySelector<HTMLInputElement>('input')?.focus()
} else if (target === 'opener' && !open) {
openerRef.current?.focus()
}
}, [open])
const disabled = state === 'disabled'
const force = state === 'hover' || state === 'active' ? state : undefined
const errors = validate(fields, values, messages)
const valid = Object.keys(errors).length === 0
const [before, marked, after] = splitHighlight(headline, highlight)
const hasStage = Boolean(presenterCutoutImage)
const placeholderFor = (field: SummitHero4Field) => {
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 openForm = () => {
if (disabled) return
focusNext.current = 'field'
setOpen(true)
onAction?.()
}
const onKeyDown = (event: React.KeyboardEvent<HTMLFormElement>) => {
if (event.key !== 'Escape' || busy) return
event.preventDefault()
focusNext.current = 'opener'
setOpen(false)
}
const onChange = (name: string) => (event: React.ChangeEvent<HTMLInputElement>) => {
const value = event.target.value
dirty.current[name] = true
setValues((prev) => ({ ...prev, [name]: value }))
if (failed) setFailed(false)
}
const onBlur = (name: string) => () => {
if (!dirty.current[name] && !(values[name] ?? '').trim()) return
setTouched((prev) => (prev[name] ? prev : { ...prev, [name]: true }))
}
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
if (disabled || busy) return
if (!valid) {
setTouched(allTrue(fields))
return
}
setFailed(false)
try {
const result: unknown = onSubmit?.(trimValues(fields, values))
if (!result || typeof (result as { then?: unknown }).then !== 'function') return
setBusy(true)
await result
if (alive.current) setBusy(false)
} catch {
if (alive.current) {
setBusy(false)
setFailed(true)
}
}
}
return (
<section
className={`cf-summit-hero-4${className ? ` ${className}` : ''}`}
data-stage={hasStage ? '1' : '0'}
aria-labelledby={`${uid}-h`}
style={FX_HOST}
>
<style>{CSS}</style>
<Texture src={leak} tone="accent-fill" position="top right" />
<div className="sh4-wrap">
<div className="sh4-intro sh4-rise">
<h1 id={`${uid}-h`} className="sh4-h1">
{before ? <span className="sh4-txt">{before}</span> : null}
{marked ? <span className="sh4-mark">{marked}</span> : null}
{after ? <span className="sh4-txt">{after}</span> : null}
</h1>
{lead ? <p className="sh4-lead">{lead}</p> : null}
{counts.length > 0 ? (
<ul className="sh4-counts" aria-label={countsLabel}>
{counts.map((count) => (
<li key={`${count.value}-${count.label}`}>
<span className="sh4-num">{count.value}</span>
<span className="sh4-count-label">{count.label}</span>
</li>
))}
</ul>
) : null}
</div>
{hasStage ? (
<div className="sh4-stage sh4-rise" style={{ animationDelay: '.07s' }}>
<div className="sh4-figure">
<span className="sh4-block" aria-hidden="true" />
<img
className="sh4-host"
src={presenterCutoutImage}
alt={presenterAlt}
width={1024}
height={1024}
fetchPriority="high"
decoding="async"
/>
</div>
</div>
) : null}
<div className="sh4-card sh4-rise" style={{ animationDelay: '.14s' }}>
<Quote className="sh4-quote" size={24} strokeWidth={2.5} aria-hidden="true" />
<blockquote className="sh4-story">
{story.map((line, index) => (
<p key={index} className={index === story.length - 1 ? 'is-turn' : undefined}>
{line}
</p>
))}
</blockquote>
{hostName ? (
<p className="sh4-sign">
<strong>{hostName}</strong>
{hostRole ? <span>{hostRole}</span> : null}
</p>
) : null}
<div className="sh4-act" data-pass={productImage ? '1' : '0'}>
{productImage ? (
<div className="sh4-pass">
<img src={productImage} alt={productAlt} width={512} height={512} decoding="async" />
</div>
) : null}
<p className="sh4-pass-text">
<strong>{summitName}</strong>
{passNote ? <span>{passNote}</span> : null}
</p>
<div className="sh4-go">
<div className="sh4-start" hidden={open}>
<button
ref={openerRef}
type="button"
className="sh4-btn"
data-force={force}
aria-expanded={open}
aria-controls={formId}
disabled={disabled}
onClick={openForm}
>
{openLabel}
</button>
{openNote ? <p className="sh4-note">{openNote}</p> : null}
</div>
<form
id={formId}
ref={formRef}
className="sh4-form"
hidden={!open}
noValidate
aria-label={summitName}
onSubmit={handleSubmit}
onKeyDown={onKeyDown}
>
{fields.map((field) => {
const id = `${uid}-${field.name}`
const errId = `${id}-err`
const message = touched[field.name] ? errors[field.name] : undefined
return (
<div className="sh4-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)}
value={values[field.name] ?? ''}
onChange={onChange(field.name)}
onBlur={onBlur(field.name)}
readOnly={busy}
disabled={disabled}
required
aria-invalid={message ? true : undefined}
aria-describedby={message ? errId : undefined}
/>
{message ? (
<p id={errId} className="sh4-err">
<CircleAlert size={16} strokeWidth={2.5} aria-hidden="true" />
{message}
</p>
) : null}
</div>
)
})}
<button
type="submit"
className="sh4-btn sh4-btn--submit"
data-force={force}
disabled={disabled || busy || !valid}
aria-busy={busy || undefined}
aria-describedby={!valid ? hintId : undefined}
>
{busy ? (
<>
<Loader2 className="sh4-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
{loadingLabel}
</>
) : (
submitLabel
)}
</button>
{!valid ? (
<p id={hintId} className="sh4-hint">
{incompleteHint}
</p>
) : null}
{failed ? (
<p className="sh4-fail" role="alert">
<CircleAlert size={16} strokeWidth={2.5} aria-hidden="true" />
{errorMessage}
</p>
) : null}
{privacy ? (
<p className="sh4-privacy">
<Lock size={16} strokeWidth={2.5} aria-hidden="true" />
{privacy}
</p>
) : null}
</form>
</div>
</div>
</div>
</div>
</section>
)
}
export default SummitHero4
const DEFAULT_STORY: React.ReactNode[] = [
'You have an offer and a dozen open tabs of advice.',
'What you actually need is one clear plan for the pages it takes.',
'So I put that plan into one free workshop you can watch tonight.',
]
const DEFAULT_FIELDS: SummitHero4Field[] = [
{ name: 'name', label: 'Full name', autoComplete: 'name' },
{ name: 'email', label: 'Email address', type: 'email', autoComplete: 'email' },
]
type Messages = { requiredError: string; emailError: string }
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
function isEmailField(field: SummitHero4Field) {
return field.type === 'email' || /email/i.test(field.name)
}
function isNameField(field: SummitHero4Field) {
return field.autoComplete === 'name' || /name/i.test(field.name)
}
function fieldError(field: SummitHero4Field, value: string, messages: Messages) {
if (!value) return messages.requiredError.replace('{label}', field.label.toLowerCase())
if (isEmailField(field) && !EMAIL.test(value)) return messages.emailError
return ''
}
function validate(fields: SummitHero4Field[], values: Record<string, string>, messages: Messages) {
const out: Record<string, string> = {}
for (const field of fields) {
const message = fieldError(field, (values[field.name] ?? '').trim(), messages)
if (message) out[field.name] = message
}
return out
}
function trimValues(fields: SummitHero4Field[], values: Record<string, string>) {
const out: Record<string, string> = {}
for (const field of fields) out[field.name] = (values[field.name] ?? '').trim()
return out
}
function allTrue(fields: SummitHero4Field[]) {
const out: Record<string, boolean> = {}
for (const field of fields) out[field.name] = true
return out
}
function demoValues(fields: SummitHero4Field[], name: string, email: string) {
const out: Record<string, string> = {}
for (const field of fields) {
if (isEmailField(field)) out[field.name] = email
else if (isNameField(field)) out[field.name] = name
else out[field.name] = ''
}
return out
}
function splitHighlight(text: string, phrase?: string): [string, string, string] {
if (!phrase) return [text, '', '']
const index = text.toLowerCase().indexOf(phrase.toLowerCase())
if (index < 0) return [text, '', '']
return [text.slice(0, index), text.slice(index, index + phrase.length), text.slice(index + phrase.length)]
}
const CSS = `
.cf-summit-hero-4{--sh4-shadow:var(--shadow,oklch(0.22 0.03 260));--sh4-line:var(--card-border,oklch(from var(--ink) l c h / .12));position:relative;background:var(--band);color:var(--band-ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);overflow-x:clip}
.cf-summit-hero-4 *,.cf-summit-hero-4 *::before,.cf-summit-hero-4 *::after{box-sizing:border-box}
.cf-summit-hero-4 .sh4-wrap{position:relative;z-index:1;container-type:inline-size;--sh4-col:calc((100cqw - clamp(32px,5vw,72px)) * 5 / 12);max-width:1120px;margin:0 auto;display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);grid-template-areas:"intro intro" "stage card";column-gap:clamp(32px,5vw,72px);row-gap:clamp(32px,4vw,48px);align-items:start}
.cf-summit-hero-4[data-stage="0"] .sh4-wrap{grid-template-columns:minmax(0,1fr);grid-template-areas:"intro" "card";max-width:46rem}
.cf-summit-hero-4 .sh4-intro{grid-area:intro;min-width:0}
.cf-summit-hero-4 .sh4-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,5.4vw,4.875rem);line-height:1.08;text-wrap:balance;color:var(--band-ink)}
.cf-summit-hero-4 .sh4-txt{position:relative}
.cf-summit-hero-4 .sh4-mark{--sh4-mark:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));background:linear-gradient(transparent 13%,var(--sh4-mark) 13%,var(--sh4-mark) 95%,transparent 95%);padding:0 .12em;margin:0 -.02em;border-radius:.3em .18em .26em .14em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-summit-hero-4 .sh4-lead{margin:24px 0 0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--band-ink);text-wrap:pretty}
.cf-summit-hero-4 .sh4-counts{list-style:none;margin:24px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:12px 32px}
.cf-summit-hero-4 .sh4-counts li{display:inline-flex;align-items:baseline;gap:8px;color:var(--band-ink)}
.cf-summit-hero-4 .sh4-num{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.cf-summit-hero-4 .sh4-count-label{font-size:15px;font-weight:600;line-height:1.4}
.cf-summit-hero-4 .sh4-stage{grid-area:stage;min-width:0;align-self:stretch}
.cf-summit-hero-4 .sh4-figure{position:relative;width:100%;height:100%;min-height:var(--sh4-col)}
.cf-summit-hero-4 .sh4-block{position:absolute;left:0;right:0;bottom:0;aspect-ratio:1/.78;max-height:100%;border-radius:var(--card-radius,var(--radius,14px));background:var(--accent-fill,var(--accent));box-shadow:inset 0 1px 0 oklch(from var(--accent-fill,var(--accent)) calc(l + .12) c h / .6),inset 0 -3px 0 oklch(from var(--accent-fill,var(--accent)) calc(l - .1) c h / .5),0 2px 4px oklch(from var(--sh4-shadow) l c h / .24),0 12px 24px -8px oklch(from var(--sh4-shadow) l c h / .34)}
.cf-summit-hero-4 .sh4-host{position:relative;display:block;width:100%;height:100%;object-fit:contain;object-position:50% 100%;filter:drop-shadow(0 2px 3px oklch(from var(--sh4-shadow) l c h / .3)) drop-shadow(0 12px 16px oklch(from var(--sh4-shadow) l c h / .2))}
.cf-summit-hero-4 .sh4-card{grid-area:card;position:relative;min-width:0;background:var(--card);color:var(--ink);border:1px solid var(--sh4-line);border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--sh4-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--sh4-shadow) l c h / .32)));padding:clamp(20px,3vw,32px);display:flex;flex-direction:column}
.cf-summit-hero-4[data-stage="1"] .sh4-card{min-height:var(--sh4-col)}
.cf-summit-hero-4[data-stage="1"] .sh4-card::before{content:"";position:absolute;left:-12px;top:max(32px,calc(100% - var(--sh4-col) * .72 - 11px));width:22px;height:22px;background:var(--card);border-left:1px solid var(--sh4-line);border-bottom:1px solid var(--sh4-line);border-bottom-left-radius:4px;transform:rotate(45deg)}
.cf-summit-hero-4 .sh4-quote{display:block;align-self:flex-start;flex:none;color:var(--accent);margin-bottom:12px}
.cf-summit-hero-4 .sh4-story{margin:0 0 24px;padding:0}
.cf-summit-hero-4 .sh4-story p{margin:0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.45;font-weight:400;color:var(--ink);text-wrap:pretty}
.cf-summit-hero-4 .sh4-story p+p{margin-top:12px}
.cf-summit-hero-4 .sh4-story p.is-turn{font-weight:700}
.cf-summit-hero-4 .sh4-sign{margin:-8px 0 24px;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;font-size:17px;line-height:1.4}
.cf-summit-hero-4 .sh4-sign strong{font-weight:800;color:var(--ink)}
.cf-summit-hero-4 .sh4-sign span{font-size:15px;font-weight:500;color:var(--muted)}
.cf-summit-hero-4 .sh4-act{margin-top:auto;padding-top:24px;border-top:1px solid oklch(from var(--ink) l c h / .12);display:grid;grid-template-columns:120px minmax(0,1fr);grid-template-areas:"pass text" "pass go";column-gap:20px;row-gap:12px;align-items:start}
.cf-summit-hero-4 .sh4-act[data-pass="0"]{grid-template-columns:minmax(0,1fr);grid-template-areas:"text" "go"}
.cf-summit-hero-4 .sh4-pass{grid-area:pass;min-width:0}
.cf-summit-hero-4 .sh4-pass img{display:block;width:120px;height:120px;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--sh4-shadow) l c h / .28)) drop-shadow(0 10px 12px oklch(from var(--sh4-shadow) l c h / .18))}
.cf-summit-hero-4 .sh4-pass-text{grid-area:text;margin:0;display:flex;flex-direction:column;gap:2px;line-height:1.35;min-width:0}
.cf-summit-hero-4 .sh4-pass-text strong{font-size:17px;font-weight:800;color:var(--ink);text-wrap:balance}
.cf-summit-hero-4 .sh4-pass-text span{font-size:15px;font-weight:500;color:var(--muted)}
.cf-summit-hero-4 .sh4-go{grid-area:go;min-width:0}
.cf-summit-hero-4 .sh4-start[hidden],.cf-summit-hero-4 .sh4-form[hidden]{display:none}
.cf-summit-hero-4 .sh4-btn{appearance:none;border:0;cursor:pointer;width:100%;min-height:64px;padding:0 28px;display:inline-flex;align-items:center;justify-content:center;gap:10px;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);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));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(--sh4-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--sh4-shadow) l c h / .38));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-summit-hero-4 .sh4-btn--submit{min-height:56px}
.cf-summit-hero-4 .sh4-btn:hover:not(:disabled),.cf-summit-hero-4 .sh4-btn[data-force="hover"]:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .1) c h / .6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),0 1px 2px oklch(from var(--sh4-shadow) l c h / .32),0 12px 20px -8px oklch(from var(--sh4-shadow) l c h / .44)}
.cf-summit-hero-4 .sh4-btn:active:not(:disabled),.cf-summit-hero-4 .sh4-btn[data-force="active"]:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .06) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 1px oklch(from var(--sh4-shadow) l c h / .3)}
.cf-summit-hero-4 .sh4-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-summit-hero-4 .sh4-btn:disabled{cursor:not-allowed;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:none;transform:none}
.cf-summit-hero-4 .sh4-btn[aria-busy="true"]:disabled{cursor:progress;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));box-shadow:inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h)}
.cf-summit-hero-4 .sh4-note{margin:10px 0 0;font-size:15px;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-summit-hero-4 .sh4-form{display:grid;gap:16px;animation:sh4-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-summit-hero-4 .sh4-field{min-width:0}
.cf-summit-hero-4 .sh4-field label{display:block;margin:0 0 8px;font-size:16px;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
.cf-summit-hero-4 .sh4-field input{display:block;width:100%;min-height:56px;padding:0 16px;font-family:var(--font-body);font-size:17px;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));transition:border-color .16s ease,box-shadow .16s ease}
.cf-summit-hero-4 .sh4-field input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
.cf-summit-hero-4 .sh4-field input:focus{outline:none;border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
.cf-summit-hero-4 .sh4-field input[aria-invalid="true"]{border-color:var(--danger)}
.cf-summit-hero-4 .sh4-field input[aria-invalid="true"]:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
.cf-summit-hero-4 .sh4-err{margin:8px 0 0;font-size:15px;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
.cf-summit-hero-4 .sh4-hint{margin:-4px 0 0;font-size:15px;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-summit-hero-4 .sh4-fail{margin:0;padding:10px 12px;border-radius:10px;font-size:15px;font-weight:600;line-height:1.4;color:var(--danger);background:var(--danger-soft);text-wrap:pretty}
.cf-summit-hero-4 .sh4-privacy{margin:0;font-size:15px;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-summit-hero-4 .sh4-err svg,.cf-summit-hero-4 .sh4-fail svg,.cf-summit-hero-4 .sh4-privacy svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
.cf-summit-hero-4 .sh4-spin{animation:sh4-spin .8s linear infinite}
.cf-summit-hero-4 .sh4-rise{animation:sh4-rise .45s cubic-bezier(.2,.7,.2,1) both}
@keyframes sh4-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes sh4-spin{to{transform:rotate(360deg)}}
@media (max-width:900px){
.cf-summit-hero-4 .sh4-wrap{grid-template-columns:minmax(0,1fr);grid-template-areas:"intro" "stage" "card";row-gap:0}
.cf-summit-hero-4 .sh4-intro{margin-bottom:32px}
.cf-summit-hero-4[data-stage="0"] .sh4-intro{margin-bottom:32px}
.cf-summit-hero-4 .sh4-stage{align-self:auto}
.cf-summit-hero-4 .sh4-figure{aspect-ratio:auto;height:clamp(260px,74vw,340px);min-height:0;max-width:420px;margin:0 auto}
.cf-summit-hero-4 .sh4-block{top:22%;aspect-ratio:auto;max-height:none}
.cf-summit-hero-4 .sh4-host{object-fit:cover;object-position:50% 0}
.cf-summit-hero-4 .sh4-card{margin-top:-24px;z-index:1}
.cf-summit-hero-4[data-stage="1"] .sh4-card{min-height:0}
.cf-summit-hero-4 .sh4-btn{padding:0 16px;font-size:clamp(1rem,4.4vw,1.375rem);text-wrap:balance}
.cf-summit-hero-4[data-stage="0"] .sh4-card{margin-top:0}
.cf-summit-hero-4[data-stage="1"] .sh4-card::before{left:50%;top:-12px;border-bottom:0;border-top:1px solid var(--sh4-line);border-bottom-left-radius:0;border-top-left-radius:4px;transform:translateX(-50%) rotate(45deg)}
.cf-summit-hero-4 .sh4-act{grid-template-columns:64px minmax(0,1fr);grid-template-areas:"pass text" "go go";align-items:center;row-gap:16px;column-gap:16px}
.cf-summit-hero-4 .sh4-pass img{width:64px;height:64px}
.cf-summit-hero-4 .sh4-go{align-self:start}
}
@media (prefers-reduced-motion:reduce){
.cf-summit-hero-4 .sh4-rise,.cf-summit-hero-4 .sh4-form,.cf-summit-hero-4 .sh4-spin{animation:none}
.cf-summit-hero-4 .sh4-btn,.cf-summit-hero-4 .sh4-field input{transition:none}
.cf-summit-hero-4 .sh4-btn:hover:not(:disabled),.cf-summit-hero-4 .sh4-btn:active:not(:disabled),.cf-summit-hero-4 .sh4-btn[data-force]:not(:disabled){transform:none}
}
`
pieces/hero/summit-hero-4/specimen.tsx 50 lines
import __studioImagef644d024 from "../assets/1d84ecb6cf4473fb.webp";
import __studioImage0cab1144 from "../assets/4c8cde6776711150.webp";
import * as React from 'react'
import { SummitHero4, type SummitHero4State } from '../summit-hero-4'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function SummitHero4Specimen({ state = 'default' }: { state?: SummitHero4State }) {
const registration = defaults.sample.registration
return (
<SummitHero4
state={state}
headline="Fund your mission without a fundraising team"
highlight="without a fundraising team"
lead="The Giving Forward Summit is a free online event for small-charity founders who raise every dollar themselves."
counts={[
{ value: '12', label: 'founder sessions' },
{ value: '3', label: 'days, all online' },
]}
story={[
'For six years I ran a food bank out of a church basement, and fundraising nearly made me quit.',
'Then one founder showed me her one-page donor plan. That single page did more than a year of bake sales.',
'So I asked twelve founders who cracked it to share theirs with you, free.',
]}
hostName="Rosa Delgado"
hostRole="Your summit host"
presenterCutoutImage={slot(
'presenter-cutout',
__studioImagef644d024,
)}
presenterAlt="Rosa Delgado, host of the Giving Forward Summit"
summitName="Giving Forward Summit"
passNote="Free pass · 3 days online"
productImage={slot(
'product',
__studioImage0cab1144,
)}
productAlt="Giving Forward Summit pass on a lanyard"
openLabel="Yes! Save My Free Pass"
openNote="Free online summit · No card needed"
submitLabel="Send Me My Free Pass"
loadingLabel="Saving your pass…"
privacy={registration.privacy}
errorMessage={registration.error}
copy={{ incompleteHint: 'Add your name and email to get your pass.' }}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalSummitHero4 |
string |
Default 'Map out your first funnel'
|
highlight OptionalSummitHero4 |
string |
Default 'first funnel'
|
lead OptionalSummitHero4 |
string |
Default 'Join the Funnel Starter Workshop and walk through your offer, page copy, and next steps.'
|
counts OptionalSummitHero4 |
SummitHero4Count[] |
Default []
|
story OptionalSummitHero4 |
React.ReactNode[] |
Default DEFAULT_STORY
|
hostName OptionalSummitHero4 |
string |
Default ''
|
hostRole OptionalSummitHero4 |
string |
Default ''
|
presenterCutoutImage OptionalSummitHero4 |
string |
|
presenterAlt OptionalSummitHero4 |
string |
Default 'Your workshop host'
|
summitName OptionalSummitHero4 |
string |
Default 'Funnel Starter Workshop'
|
passNote OptionalSummitHero4 |
string |
Default 'Free on-demand workshop'
|
productImage OptionalSummitHero4 |
string |
|
productAlt OptionalSummitHero4 |
string |
Default 'Free workshop pass on a lanyard'
|
openLabel OptionalSummitHero4 |
string |
Default 'Yes! Save My Seat'
|
openNote OptionalSummitHero4 |
string |
Default 'Free workshop · Watch online'
|
fields OptionalSummitHero4 |
SummitHero4Field[] |
Default DEFAULT_FIELDS
|
submitLabel OptionalSummitHero4 |
string |
Default 'Save My Free Seat'
|
loadingLabel OptionalSummitHero4 |
string |
Default 'Saving your seat…'
|
privacy OptionalSummitHero4 |
string |
Default 'We respect your inbox. Unsubscribe anytime.'
|
errorMessage OptionalSummitHero4 |
string |
Default 'We couldn’t complete your registration. Please try again.'
|
state OptionalSummitHero4 |
SummitHero4State |
Default 'default'
|
onAction OptionalSummitHero4 |
() => void |
|
onSubmit OptionalSummitHero4 |
(values: Record<string, string>) => void | Promise<unknown> |
|
copy OptionalSummitHero4 |
{
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
/** Shown under the submit button while it is locked. */
incompleteHint?: string
/** Accessible name for the counts list. */
countsLabel?: string
/** Prefilled values for the forced error state. */
demoName?: string
demoEmail?: string
} |
Default {}
|
className OptionalSummitHero4 |
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-bg--button-2-ink- 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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
presenter-cutout- The presenter on a transparent background.
product- The main product shot or cover (ebook, kit, bottle).
-
1d84ecb6cf4473fb.webp
image/webp · 232 KB
-
4c8cde6776711150.webp
image/webp · 159 KB
-
986367d82c360c9a.webp
image/webp · 102 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB