Summit Hero 3
Fills a free virtual summit from a dark stage. A big promise and an outcome photo sit above a day-by-day agenda, where each day ends on what the attendee will have by then. A sticky registration card stays beside the agenda.
Use it in a prompt
Use hero/summit-hero-3 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/hero/summit-hero-3.tsx. - Import it and pass your copy and images (Props tab):
import { SummitHero3 } from "@/components/funneldna/hero/summit-hero-3"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/summit-hero-3/component.tsx 677 lines
// layout: bento-grid
// Fills a free virtual summit from a dark stage. A big promise and an outcome photo sit above a day-by-day agenda, where each day ends on what the attendee will have by then. A sticky registration card stays beside the agenda.
'use client'
import * as React from 'react'
import { CircleAlert, Flag, Loader2, Lock, MonitorPlay, Ticket } from 'lucide-react'
import { Backdrop, FX_HOST } from '../fx/fx'
import seminar from '../fx/backdrops/seminar'
export type SummitHero3State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type SummitHero3Session = {
/** As supplied, e.g. '10:00 AM ET'. */
time: string
title: string
speaker?: string
}
export type SummitHero3Day = {
/** Tab label, e.g. 'Day 1'. */
label: string
/** Short theme under the tab label, e.g. 'Visibility'. */
theme?: string
/** A supplied date only. Nothing renders when empty. */
date?: string
/** Panel headline for the day. Falls back to the label. */
title?: string
sessions: SummitHero3Session[]
/** Future pacing: what the attendee will have by the end of the day. */
outcome?: string
}
export type SummitHero3Fact = {
value: string
label: string
}
export type SummitHero3Field = {
name: string
label: string
type?: string
autoComplete?: string
placeholder?: string
/** Defaults to true. */
required?: boolean
}
export type SummitHero3Props = {
summitName?: string
/** Short line beside the summit name (hidden on small phones). */
format?: string
headline?: string
/** One continuous phrase inside the headline that gets the marker stroke. */
highlight?: string
lead?: string
/** Italic aside in the host's voice, under the lead. */
aside?: string
/** Supplied facts only. Nothing renders when empty. */
facts?: SummitHero3Fact[]
agendaTitle?: string
/** The agenda by day, from props only. Empty hides the agenda and keeps the promise and form. */
days?: SummitHero3Day[]
/** Outcome photo beside the promise (slot: scene). Without it the promise takes the space. */
sceneImage?: string
sceneAlt?: string
/** Plain caption under the photo. */
sceneCaption?: string
/** Stage photo behind the band, re-coloured to the theme (an fx backdrop module). */
backdropImage?: string
formTitle?: string
formLead?: string
passLabel?: string
/** Ticket price as supplied, e.g. 'Free'. Empty hides the row. */
passValue?: string
/** Registration fields, rendered in order. Each falls back to a sensible placeholder. */
fields?: SummitHero3Field[]
/** Main line inside the submit button. */
label?: string
/** Second line inside the button. */
sublabel?: string
loadingLabel?: string
/** Shown under the button while a field needs fixing. */
blockedHint?: string
privacy?: string
/** Shown when onSubmit returns a promise that rejects. */
errorMessage?: string
/** Forces a rendered state for the specimen and builder previews. */
state?: SummitHero3State
/** 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
/** Replaces {day} with the day's tab label. */
outcomeLead?: string
/** Word before each speaker name. */
speakerPrefix?: string
/** Accessible name for the day tabs. */
agendaLabel?: string
/** Accessible name for the facts list. */
factsLabel?: string
/** Prefilled values for the forced error state. */
demoName?: string
demoEmail?: string
}
/** Added to the root section for page-level placement. */
className?: string
}
const DEFAULT_FIELDS: SummitHero3Field[] = [
{ name: 'name', label: 'Full name', autoComplete: 'name' },
{ name: 'email', label: 'Work email', type: 'email', autoComplete: 'email' },
{ name: 'company', label: 'Company (optional)', autoComplete: 'organization', placeholder: 'Northline Freight', required: false },
]
export function SummitHero3(props: SummitHero3Props) {
const {
summitName = 'Fleet Ops Virtual Summit',
format = 'Free B2B summit · Live online',
headline = 'Run a calmer fleet in three days',
highlight = 'calmer fleet',
lead = 'Practical sessions for logistics managers who are done firefighting dispatch every morning.',
aside = '(I know. Another summit. This one is built around your Monday morning.)',
facts = [],
agendaTitle = 'Pick a day. See what you’ll leave with.',
days = [],
sceneImage,
sceneAlt = 'Logistics manager standing calmly in a modern dispatch office at dusk, route screens glowing behind',
sceneCaption = 'Picture Friday at 4 p.m.: every route covered, and your phone is quiet.',
backdropImage = seminar,
formTitle = 'Save your free seat',
formLead = 'Every session, live online. Join the ones that fit your week.',
passLabel = 'Full summit pass',
passValue = 'Free',
fields = DEFAULT_FIELDS,
label = 'Save my free seat',
sublabel = 'Free B2B pass · Live online',
loadingLabel = 'Saving your seat…',
blockedHint = 'Fix the highlighted field to save your seat.',
privacy = 'We respect your inbox. Unsubscribe anytime.',
errorMessage = 'We couldn’t complete your registration. Please try again.',
state = 'default',
onSubmit,
copy = {},
className,
} = props
const {
namePlaceholder = 'Jane Smith',
emailPlaceholder = 'you@company.com',
phonePlaceholder = '(555) 123-4567',
fieldPlaceholder = 'Your {label}',
requiredError = 'Please enter your {label}.',
emailError = 'Enter a work email like name@company.com.',
outcomeLead = 'By the end of {day},',
speakerPrefix = 'with',
agendaLabel = 'Summit agenda by day',
factsLabel = 'At a glance',
demoName = 'Alex Morgan',
demoEmail = 'alex@northline',
} = copy
const messages: Messages = { requiredError, emailError }
const uid = React.useId()
const headingId = `${uid}-h`
const formHeadingId = `${uid}-fh`
const agendaHeadingId = `${uid}-ah`
const hintId = `${uid}-hint`
const panelId = `${uid}-panel`
const formRef = React.useRef<HTMLFormElement>(null)
const tabRefs = React.useRef<Array<HTMLButtonElement | null>>([])
const alive = React.useRef(true)
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 [dirty, setDirty] = React.useState<Record<string, boolean>>({})
const [busy, setBusy] = React.useState(false)
const [failed, setFailed] = React.useState(false)
const [active, setActive] = React.useState(0)
const [dir, setDir] = React.useState(0)
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) : {})
setDirty({})
setBusy(false)
setFailed(false)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state])
const disabled = state === 'disabled'
const force = state === 'hover' || state === 'active' ? state : undefined
const blocked = Object.keys(errors).length > 0
const hasAgenda = days.length > 0
const tabbed = days.length > 1
const hasPhoto = Boolean(sceneImage)
const current = Math.min(active, Math.max(days.length - 1, 0))
const day = days[current]
const [before, marked, after] = splitHighlight(headline, highlight)
const select = (index: number) => {
if (index === current) return
setDir(index > current ? 1 : -1)
setActive(index)
}
const onTabKey = (event: React.KeyboardEvent<HTMLDivElement>) => {
const n = days.length
let next = -1
if (event.key === 'ArrowRight') next = (current + 1) % n
else if (event.key === 'ArrowLeft') next = (current - 1 + n) % n
else if (event.key === 'Home') next = 0
else if (event.key === 'End') next = n - 1
if (next < 0) return
event.preventDefault()
select(next)
tabRefs.current[next]?.focus()
}
const placeholderFor = (field: SummitHero3Field) => {
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 check = (field: SummitHero3Field, raw: string) => {
const message = fieldError(field, raw.trim(), messages)
setErrors((prev) => {
if ((prev[field.name] ?? '') === message) return prev
const next = { ...prev }
if (message) next[field.name] = message
else delete next[field.name]
return next
})
}
const onChange = (field: SummitHero3Field) => (event: React.ChangeEvent<HTMLInputElement>) => {
const value = event.target.value
setValues((prev) => ({ ...prev, [field.name]: value }))
setDirty((prev) => (prev[field.name] ? prev : { ...prev, [field.name]: true }))
if (failed) setFailed(false)
if (errors[field.name]) check(field, value)
}
const onBlur = (field: SummitHero3Field) => () => {
const value = values[field.name] ?? ''
if (!dirty[field.name] && !value.trim()) return
check(field, value)
}
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
if (disabled || busy) return
const clean = trimValues(fields, values)
const found = validate(fields, clean, messages)
setErrors(found)
const first = fields.find((f) => found[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)
if (!isPromise(result)) return
setBusy(true)
await result
if (alive.current) setBusy(false)
} catch {
if (alive.current) {
setBusy(false)
setFailed(true)
}
}
}
return (
<section
className={`cf-summit-hero-3${className ? ` ${className}` : ''}`}
style={{ ...FX_HOST, overflow: 'clip' }}
aria-labelledby={headingId}
>
<style>{CSS}</style>
<Backdrop src={backdropImage} treatment='duotone' slot={null} />
<div className='sh3-wrap' data-agenda={hasAgenda ? 'on' : 'off'} data-photo={hasPhoto ? 'on' : 'off'}>
<div className='sh3-tile sh3-glass sh3-promise' style={vars({ '--d': 0 })}>
<p className='sh3-chip'>
<MonitorPlay size={16} strokeWidth={2.5} aria-hidden />
<span className='sh3-chip-name'>{summitName}</span>
{format ? <span className='sh3-chip-format'>· {format}</span> : null}
</p>
<h1 id={headingId} className='sh3-h1'>
{before}
{marked ? <span className='sh3-mark'>{marked}</span> : null}
{after}
</h1>
{lead ? <p className='sh3-lead'>{lead}</p> : null}
{aside ? <p className='sh3-aside'>{aside}</p> : null}
{facts.length > 0 ? (
<dl className='sh3-facts' aria-label={factsLabel}>
{facts.map((fact) => (
<div className='sh3-fact' key={`${fact.value}-${fact.label}`}>
<dt>{fact.label}</dt>
<dd>{fact.value}</dd>
</div>
))}
</dl>
) : null}
</div>
<div className='sh3-tile sh3-form' style={vars({ '--d': 1 })}>
<h2 id={formHeadingId} className='sh3-h3'>{formTitle}</h2>
{formLead ? <p className='sh3-form-lead'>{formLead}</p> : null}
{passValue ? (
<p className='sh3-pass'>
<span className='sh3-pass-label'>
<Ticket size={18} strokeWidth={2.5} aria-hidden />
{passLabel}
</span>
<span className='sh3-pass-value'>{passValue}</span>
</p>
) : null}
<form ref={formRef} noValidate onSubmit={handleSubmit} aria-labelledby={formHeadingId}>
<fieldset className='sh3-fieldset' disabled={disabled || busy}>
{fields.map((field) => {
const id = `${uid}-${field.name}`
const err = errors[field.name]
const required = field.required !== false
return (
<div className='sh3-field' key={field.name}>
<label className='sh3-label' htmlFor={id}>{field.label}</label>
<input
id={id}
name={field.name}
className='sh3-input'
type={field.type ?? 'text'}
autoComplete={field.autoComplete}
placeholder={placeholderFor(field)}
value={values[field.name] ?? ''}
onChange={onChange(field)}
onBlur={onBlur(field)}
required={required}
aria-required={required}
aria-invalid={err ? true : undefined}
aria-describedby={err ? `${id}-err` : undefined}
/>
{err ? (
<p id={`${id}-err`} className='sh3-err'>
<CircleAlert className='sh3-ico' size={16} strokeWidth={2.5} aria-hidden />
{err}
</p>
) : null}
</div>
)
})}
</fieldset>
{failed ? (
<p role='alert' className='sh3-alert'>
<CircleAlert className='sh3-ico' size={16} strokeWidth={2.5} aria-hidden />
{errorMessage}
</p>
) : null}
<button
type='submit'
className='sh3-btn'
data-force={force}
data-busy={busy ? 'true' : undefined}
disabled={disabled || busy || blocked}
aria-describedby={blocked && !disabled ? hintId : undefined}
aria-busy={busy || undefined}
>
{busy ? (
<span className='sh3-btn-main'>
<Loader2 className='sh3-spin' size={20} strokeWidth={2.5} aria-hidden />
{loadingLabel}
</span>
) : (
<>
<span className='sh3-btn-main'>{label}</span>
{sublabel ? <span className='sh3-btn-sub'>{sublabel}</span> : null}
</>
)}
</button>
{blocked && !disabled && blockedHint ? (
<p id={hintId} className='sh3-hint'>{blockedHint}</p>
) : null}
{privacy ? (
<p className='sh3-privacy'>
<Lock className='sh3-ico' size={16} strokeWidth={2.5} aria-hidden />
{privacy}
</p>
) : null}
</form>
</div>
{hasAgenda && day ? (
<section className='sh3-tile sh3-agenda' style={vars({ '--d': 3 })} aria-labelledby={agendaHeadingId}>
<h2 id={agendaHeadingId} className='sh3-h3'>{agendaTitle}</h2>
{tabbed ? (
<div
role='tablist'
aria-label={agendaLabel}
className='sh3-seg'
style={vars({ '--n': days.length, '--i': current })}
onKeyDown={onTabKey}
>
<span className='sh3-seg-ind' aria-hidden />
{days.map((d, i) => (
<button
key={`${d.label}-${i}`}
ref={(el) => {
tabRefs.current[i] = el
}}
type='button'
role='tab'
id={`${uid}-tab-${i}`}
aria-selected={i === current}
aria-controls={panelId}
tabIndex={i === current ? 0 : -1}
className='sh3-tab'
onClick={() => select(i)}
>
<span className='sh3-tab-day'>{d.label}</span>
{d.theme ? <span className='sh3-tab-theme'>{d.theme}</span> : null}
</button>
))}
</div>
) : null}
<div
className='sh3-panel'
id={panelId}
role={tabbed ? 'tabpanel' : undefined}
aria-labelledby={tabbed ? `${uid}-tab-${current}` : undefined}
tabIndex={tabbed ? 0 : undefined}
>
<div key={current} className={dir ? 'sh3-swap' : undefined} style={vars({ '--dir': dir || 1 })}>
<h3 className='sh3-day-h'>{day.title ?? day.label}</h3>
{day.date ? <p className='sh3-day-date'>{day.date}</p> : null}
{day.sessions.length > 0 ? (
<ol className='sh3-sessions'>
{day.sessions.map((session, i) => (
<li className='sh3-session' key={`${session.time}-${i}`}>
<p className='sh3-time'>{session.time}</p>
<div>
<p className='sh3-s-title'>{session.title}</p>
{session.speaker ? (
<p className='sh3-s-speaker'>
{speakerPrefix ? `${speakerPrefix} ` : ''}
{session.speaker}
</p>
) : null}
</div>
</li>
))}
</ol>
) : null}
{day.outcome ? (
<div className='sh3-outcome'>
<span className='sh3-disc' aria-hidden>
<Flag size={20} strokeWidth={2.5} />
</span>
<p>
<strong>{outcomeLead.replace('{day}', day.label)}</strong> {day.outcome}
</p>
</div>
) : null}
</div>
</div>
</section>
) : null}
{hasPhoto ? (
<figure className='sh3-tile sh3-glass sh3-photo' style={vars({ '--d': 2 })}>
<img src={sceneImage} alt={sceneAlt} width={600} height={800} decoding='async' />
{sceneCaption ? <figcaption>{sceneCaption}</figcaption> : null}
</figure>
) : null}
</div>
</section>
)
}
export default SummitHero3
type Messages = { requiredError: string; emailError: string }
const EMAIL = /^[^ @]+@[^ @]+[.][^ @]+$/
function vars(map: Record<string, string | number>) {
return map as React.CSSProperties
}
function isEmailField(field: SummitHero3Field) {
return field.type === 'email' || field.name.toLowerCase().includes('email')
}
function isNameField(field: SummitHero3Field) {
return field.autoComplete === 'name' || field.name.toLowerCase().includes('name')
}
function fieldError(field: SummitHero3Field, value: string, m: Messages) {
if (!value) return field.required === false ? '' : m.requiredError.replace('{label}', field.label.toLowerCase())
if (isEmailField(field) && !EMAIL.test(value)) return m.emailError
return ''
}
function validate(fields: SummitHero3Field[], values: Record<string, string>, m: Messages) {
const found: Record<string, string> = {}
for (const field of fields) {
const message = fieldError(field, (values[field.name] ?? '').trim(), m)
if (message) found[field.name] = message
}
return found
}
function trimValues(fields: SummitHero3Field[], values: Record<string, string>) {
const clean: Record<string, string> = {}
for (const field of fields) clean[field.name] = (values[field.name] ?? '').trim()
return clean
}
function demoValues(fields: SummitHero3Field[], 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
}
return out
}
function isPromise(value: unknown): value is Promise<unknown> {
return Boolean(value) && typeof (value as { then?: unknown }).then === 'function'
}
function splitHighlight(text: string, phrase?: string): [string, string, string] {
if (!phrase) return [text, '', '']
const at = text.toLowerCase().indexOf(phrase.toLowerCase())
if (at < 0) return [text, '', '']
return [text.slice(0, at), text.slice(at, at + phrase.length), text.slice(at + phrase.length)]
}
const R = '.cf-summit-hero-3'
const CSS = `
${R}{--sh3-well:color-mix(in oklch, var(--ink) 5%, var(--card));--sh3-line:oklch(from var(--ink) l c h / .12);--sh3-glass:oklch(from var(--band) l c h / .84);--sh3-glass-line:oklch(from var(--band-ink) l c h / .16);--sh3-focus:oklch(from var(--field-focus, var(--accent)) l c h / .45);--sh3-shade:var(--shadow, oklch(0.22 0.03 260));--sh3-sm:var(--shadow-sm, 0 1px 2px oklch(from var(--sh3-shade) l c h / .25));--sh3-md:var(--shadow-md, 0 1px 2px oklch(from var(--sh3-shade) l c h / .3), 0 4px 10px -2px oklch(from var(--sh3-shade) l c h / .28));--sh3-lg:var(--shadow-lg, 0 2px 3px oklch(from var(--sh3-shade) l c h / .32), 0 12px 24px -8px oklch(from var(--sh3-shade) l c h / .4));--sh3-marker:oklch(from var(--marker, #fae37c) l c h / 1);--sh3-marker-ink:oklch(from var(--sh3-marker) calc(0.2 + clamp(0, (0.6 - l) * 1000, 1) * 0.78) 0.02 h);position:relative;isolation:isolate;overflow:clip;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)}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} .sh3-wrap{position:relative;z-index:1;max-width:1200px;margin-inline:auto;display:grid;gap:24px;grid-template-columns:minmax(0,1.75fr) minmax(0,1fr) 384px;grid-template-areas:'p i f' 'a a f'}
${R} .sh3-wrap[data-photo='off']{grid-template-areas:'p p f' 'a a f'}
${R} .sh3-wrap[data-agenda='off']{grid-template-areas:'p i f'}
${R} .sh3-wrap[data-agenda='off'][data-photo='off']{grid-template-areas:'p p f'}
${R} .sh3-tile{min-width:0;border-radius:var(--card-radius, var(--radius, 14px));animation:sh3-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--d, 0) * .07s)}
${R} .sh3-glass{background:var(--sh3-glass);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid var(--sh3-glass-line);box-shadow:inset 0 1px 0 oklch(from var(--band-ink) l c h / .08),var(--sh3-md)}
${R} .sh3-promise{grid-area:p;padding:clamp(24px,3.2vw,40px);display:flex;flex-direction:column;container:sh3p / inline-size}
${R} .sh3-chip{align-self:flex-start;display:inline-flex;align-items:center;flex-wrap:nowrap;gap:8px;min-height:32px;max-width:100%;margin:0 0 20px;padding:4px 14px 4px 12px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .12);color:var(--band-ink);font-size:.875rem;font-weight:800;line-height:1.2}
${R} .sh3-chip svg{flex:none}
${R} .sh3-chip-name{min-width:0}
${R} .sh3-chip-format{white-space:nowrap}
@container sh3p (max-width:459px){${R} .sh3-chip-format{display:none}}
${R} .sh3-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.5rem);line-height:1.04;color:var(--band-ink);text-wrap:balance}
${R} .sh3-mark{background-color:var(--sh3-marker);color:var(--sh3-marker-ink);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .12em;margin-inline:-.04em;border-radius:.16em .08em .18em .1em}
${R} .sh3-lead{margin:16px 0 0;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;color:var(--band-ink);text-wrap:pretty}
${R} .sh3-aside{margin:12px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-style:italic;line-height:1.5;color:var(--band-ink);text-wrap:pretty}
${R} .sh3-facts{display:flex;flex-wrap:wrap;gap:16px 40px;margin:auto 0 0;padding:32px 0 0}
${R} .sh3-fact{display:flex;flex-direction:column-reverse;gap:8px}
${R} .sh3-fact dd{margin:0;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:-.02em;font-variant-numeric:tabular-nums}
${R} .sh3-fact dt{font-size:.9375rem;font-weight:600;line-height:1.4}
${R} .sh3-photo{grid-area:i;margin:0;padding:12px;display:flex;flex-direction:column;gap:12px}
${R} .sh3-photo img{display:block;width:100%;height:auto;flex:1 1 0;min-height:240px;object-fit:cover;object-position:50% 30%;border-radius:12px}
${R} .sh3-photo figcaption{padding:0 8px 4px;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--band-ink);text-wrap:pretty}
${R} .sh3-agenda{grid-area:a;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));box-shadow:var(--card-shadow, var(--sh3-md))}
${R} .sh3-h3{margin:0;font-family:var(--font-display);font-weight:var(--display-weight, 800);letter-spacing:-.01em;text-transform:var(--display-case, none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance}
${R} .sh3-seg{position:relative;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));margin-top:20px;padding:4px;border-radius:calc(var(--radius, 12px) + 4px);background:var(--sh3-well);box-shadow:inset 0 1px 2px oklch(from var(--sh3-shade) l c h / .14)}
${R} .sh3-seg-ind{position:absolute;top:4px;bottom:4px;left:4px;width:calc((100% - 8px) / var(--n));border-radius:var(--radius, 12px);background:color-mix(in oklch, var(--accent) 8%, var(--card));border:1px solid oklch(from var(--accent) l c h / .35);box-shadow:var(--sh3-sm);transform:translateX(calc(var(--i) * 100%));transition:transform .32s cubic-bezier(.2,.7,.2,1);pointer-events:none}
${R} .sh3-tab{position:relative;z-index:1;appearance:none;margin:0;border:0;background:transparent;border-radius:var(--radius, 12px);min-height:60px;padding:8px 12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-family:var(--font-body);color:var(--ink);text-align:center;cursor:pointer;transition:background-color .16s ease;-webkit-tap-highlight-color:transparent}
${R} .sh3-tab[aria-selected='false']:hover{background:oklch(from var(--ink) l c h / .06)}
${R} .sh3-tab:focus-visible{outline:3px solid var(--sh3-focus);outline-offset:1px}
${R} .sh3-tab-day{font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.06em;text-transform:uppercase}
${R} .sh3-tab-theme{font-size:.9375rem;font-weight:700;line-height:1.25;text-wrap:balance}
${R} .sh3-tab[aria-selected='true'] .sh3-tab-day{color:var(--accent)}
${R} .sh3-panel{margin-top:24px;border-radius:10px}
${R} .sh3-panel:focus-visible{outline:3px solid var(--sh3-focus);outline-offset:6px}
${R} .sh3-swap{animation:sh3-swap .38s cubic-bezier(.2,.7,.2,1) both}
${R} .sh3-day-h{margin:0;font-family:var(--font-display);font-weight:var(--display-weight, 800);letter-spacing:-.01em;text-transform:var(--display-case, none);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;text-wrap:balance}
${R} .sh3-day-date{margin:8px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted)}
${R} .sh3-sessions{list-style:none;margin:12px 0 0;padding:0}
${R} .sh3-session{display:grid;grid-template-columns:120px minmax(0,1fr);gap:4px 24px;padding:16px 0;border-top:1px solid var(--sh3-line)}
${R} .sh3-session:first-child{border-top:0}
${R} .sh3-time{margin:0;padding-top:2px;font-size:.9375rem;font-weight:800;line-height:1.4;color:var(--accent);font-variant-numeric:tabular-nums}
${R} .sh3-s-title{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.35;text-wrap:pretty}
${R} .sh3-s-speaker{margin:4px 0 0;font-size:.9375rem;line-height:1.4;color:var(--muted)}
${R} .sh3-outcome{display:flex;align-items:flex-start;gap:16px;margin-top:8px;padding:16px 20px;border-radius:10px;background:var(--sh3-well)}
${R} .sh3-disc{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:var(--accent-fill, var(--accent));color:var(--accent-fill-ink, var(--card))}
${R} .sh3-outcome p{margin:0;padding-top:7px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.45;text-wrap:pretty}
${R} .sh3-outcome strong{font-weight:800}
${R} .sh3-form{grid-area:f;align-self:start;position:sticky;top:24px;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));box-shadow:var(--card-shadow, var(--sh3-lg))}
${R} .sh3-form-lead{margin:12px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
${R} .sh3-pass{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 0;padding:12px 16px;border-radius:10px;background:var(--sh3-well)}
${R} .sh3-pass-label{display:inline-flex;align-items:center;gap:8px;font-size:.9375rem;font-weight:700;line-height:1.3}
${R} .sh3-pass-label svg{flex:none;color:var(--accent)}
${R} .sh3-pass-value{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:-.02em;font-variant-numeric:tabular-nums}
${R} .sh3-fieldset{display:grid;gap:16px;min-width:0;margin:20px 0 0;padding:0;border:0}
${R} .sh3-label{display:block;margin-bottom:8px;font-size:1rem;font-weight:700;line-height:1.3;color:var(--label-ink, var(--ink))}
${R} .sh3-input{display:block;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}
${R} .sh3-input::placeholder{color:color-mix(in oklch, var(--field-ink) 65%, var(--field));opacity:1}
${R} .sh3-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)}
${R} .sh3-input[aria-invalid='true']{border-color:var(--danger)}
${R} .sh3-input[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
${R} .sh3-input:disabled{cursor:not-allowed;background:color-mix(in oklch, var(--field-ink) 6%, var(--field))}
${R} .sh3-err{margin:8px 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
${R} .sh3-ico{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em}
${R} .sh3-alert{margin:16px 0 0;padding:12px 16px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:600;line-height:1.4}
${R} .sh3-btn{--sh3-bg:var(--button-bg, var(--cta));--sh3-bg2:var(--button-bg-2, var(--cta-2));position:relative;width:100%;margin-top:20px;min-height:72px;padding:12px 24px;border:0;border-radius:var(--button-radius, var(--radius, 12px));display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;background:linear-gradient(oklch(from var(--sh3-bg) calc(l + .04) c h), oklch(from var(--sh3-bg2) calc(l - .02) c h));color:var(--button-ink, var(--cta-ink));font-family:var(--button-font, var(--font-display));font-weight:var(--button-weight, 800);text-transform:var(--button-case, none);text-shadow:var(--button-text-shadow, none);box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--sh3-bg) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--sh3-bg) calc(l - .16) c h), 0 1px 2px oklch(from var(--sh3-shade) l c h / .35), 0 8px 16px -6px oklch(from var(--sh3-shade) l c h / .5));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
${R} .sh3-btn:hover:not(:disabled),${R} .sh3-btn[data-force='hover']{transform:translateY(-1px);background:linear-gradient(oklch(from var(--sh3-bg) calc(l - .01) c h), oklch(from var(--sh3-bg2) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--sh3-bg) calc(l + .12) c h / .6), inset 0 -3px 0 oklch(from var(--sh3-bg) calc(l - .18) c h), 0 1px 2px oklch(from var(--sh3-shade) l c h / .4), 0 12px 20px -6px oklch(from var(--sh3-shade) l c h / .55)}
${R} .sh3-btn:active:not(:disabled),${R} .sh3-btn[data-force='active']{transform:translateY(1px);background:linear-gradient(oklch(from var(--sh3-bg) calc(l - .04) c h), oklch(from var(--sh3-bg2) calc(l - .1) c h));box-shadow:inset 0 2px 4px oklch(from var(--sh3-bg) calc(l - .22) c h / .5), inset 0 -2px 0 oklch(from var(--sh3-bg) calc(l - .16) c h), 0 1px 2px oklch(from var(--sh3-shade) l c h / .3)}
${R} .sh3-btn:focus-visible{outline:3px solid var(--sh3-focus);outline-offset:3px}
${R} .sh3-btn:disabled{cursor:not-allowed;transform:none;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:none}
${R} .sh3-btn[data-busy='true']{cursor:progress;background:linear-gradient(oklch(from var(--sh3-bg) calc(l + .04) c h), oklch(from var(--sh3-bg2) calc(l - .02) c h));color:var(--button-ink, var(--cta-ink));text-shadow:var(--button-text-shadow, none);box-shadow:inset 0 -3px 0 oklch(from var(--sh3-bg) calc(l - .16) c h), 0 1px 2px oklch(from var(--sh3-shade) l c h / .35)}
${R} .sh3-btn-main{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15}
${R} .sh3-btn-sub{font-family:var(--font-body);font-size:.9375rem;font-weight:600;line-height:1.3;text-transform:none;text-wrap:pretty}
${R} .sh3-spin{animation:sh3-spin .8s linear infinite}
${R} .sh3-hint{margin:12px 0 0;text-align:center;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-wrap:pretty}
${R} .sh3-privacy{margin:12px 0 0;text-align:center;font-size:.9375rem;line-height:1.4;color:var(--muted);text-wrap:pretty}
@keyframes sh3-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes sh3-swap{from{opacity:.4;transform:translateX(calc(var(--dir, 1) * 8px))}to{opacity:1;transform:none}}
@keyframes sh3-spin{to{transform:rotate(360deg)}}
@media (max-width:1180px){
${R} .sh3-wrap{grid-template-columns:minmax(0,1fr) minmax(320px,368px);grid-template-areas:'p f' 'a f' 'i f'}
${R} .sh3-wrap[data-photo='off']{grid-template-areas:'p f' 'a f'}
${R} .sh3-wrap[data-agenda='off']{grid-template-areas:'p f' 'i f'}
${R} .sh3-wrap[data-agenda='off'][data-photo='off']{grid-template-areas:'p f'}
${R} .sh3-photo img{flex:none;aspect-ratio:16/10;min-height:0;object-position:50% 16%}
}
@media (max-width:760px){
${R} .sh3-wrap{gap:16px;grid-template-columns:minmax(0,1fr);grid-template-areas:'p' 'f' 'a' 'i'}
${R} .sh3-wrap[data-photo='off']{grid-template-areas:'p' 'f' 'a'}
${R} .sh3-wrap[data-agenda='off']{grid-template-areas:'p' 'f' 'i'}
${R} .sh3-wrap[data-agenda='off'][data-photo='off']{grid-template-areas:'p' 'f'}
${R} .sh3-form{position:static}
}
@media (max-width:520px){
${R} .sh3-facts{gap:12px 28px}
${R} .sh3-session{grid-template-columns:minmax(0,1fr);gap:4px}
${R} .sh3-time{padding-top:0}
${R} .sh3-outcome{gap:12px;padding:16px}
${R} .sh3-tab{padding:8px 6px}
}
@media (prefers-reduced-motion:reduce){
${R} .sh3-tile,${R} .sh3-swap,${R} .sh3-spin{animation:none}
${R} .sh3-seg-ind,${R} .sh3-tab,${R} .sh3-btn,${R} .sh3-input{transition:none}
${R} .sh3-btn:hover:not(:disabled),${R} .sh3-btn[data-force='hover']{transform:none}
}
`
pieces/hero/summit-hero-3/specimen.tsx 61 lines
import sceneImage from '../assets/6994731fb0cb1003.webp'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { SummitHero3, type SummitHero3Day, type SummitHero3Fact, type SummitHero3State } from '../summit-hero-3'
export const states: SummitHero3State[] = ['default', 'hover', 'active', 'disabled', 'error']
const DAYS: SummitHero3Day[] = [
{
label: 'Day 1',
theme: 'Visibility',
title: 'See every truck, every hour',
sessions: [
{ time: '10:00 AM ET', title: 'Where your fleet’s hours really go', speaker: 'Dana Ruiz' },
{ time: '11:15 AM ET', title: 'Telematics your drivers won’t fight', speaker: 'Marcus Bell' },
{ time: '1:00 PM ET', title: 'Build a one-screen morning dashboard', speaker: 'Priya Shah' },
],
outcome: 'you’ll have a one-screen view of where every truck and every driver hour went yesterday.',
},
{
label: 'Day 2',
theme: 'Dispatch',
title: 'Plan dispatch that holds up past noon',
sessions: [
{ time: '10:00 AM ET', title: 'End the 7 a.m. dispatch scramble', speaker: 'Tomás Reyes' },
{ time: '11:15 AM ET', title: 'Re-routing when the plan breaks', speaker: 'Grace Okafor' },
{ time: '1:00 PM ET', title: 'Fill the half-empty trailers', speaker: 'Ben Holloway' },
],
outcome: 'you’ll have a dispatch routine that survives a no-show driver and a closed road.',
},
{
label: 'Day 3',
theme: 'Margins',
title: 'Turn idle miles into margin',
sessions: [
{ time: '10:00 AM ET', title: 'The true cost of an idle mile', speaker: 'Lena Fischer' },
{ time: '11:15 AM ET', title: 'Maintenance that prevents roadside breakdowns', speaker: 'Sam Whitaker' },
{ time: '1:00 PM ET', title: 'Write your 90-day fleet ops plan', speaker: 'Dana Ruiz' },
],
outcome: 'you’ll have a written 90-day plan with the first three fixes you’ll make on Monday.',
},
]
const FACTS: SummitHero3Fact[] = [
{ value: 'Free', label: 'for logistics teams' },
{ value: '3 days', label: 'of live sessions' },
]
export default function SummitHero3Specimen({ state }: { state?: SummitHero3State }) {
const registration = defaults.sample.registration
return (
<SummitHero3
state={state}
days={DAYS}
facts={FACTS}
sceneImage={slot('scene', sceneImage)}
privacy={registration.privacy}
errorMessage={registration.error}
/>
)
}
| Name | Type | Details |
|---|---|---|
summitName OptionalSummitHero3 |
string |
|
format OptionalSummitHero3 |
string |
|
headline OptionalSummitHero3 |
string |
|
highlight OptionalSummitHero3 |
string |
|
lead OptionalSummitHero3 |
string |
|
aside OptionalSummitHero3 |
string |
|
facts OptionalSummitHero3 |
SummitHero3Fact[] |
|
agendaTitle OptionalSummitHero3 |
string |
|
days OptionalSummitHero3 |
SummitHero3Day[] |
|
sceneImage OptionalSummitHero3 |
string |
|
sceneAlt OptionalSummitHero3 |
string |
|
sceneCaption OptionalSummitHero3 |
string |
|
backdropImage OptionalSummitHero3 |
string |
|
formTitle OptionalSummitHero3 |
string |
|
formLead OptionalSummitHero3 |
string |
|
passLabel OptionalSummitHero3 |
string |
|
passValue OptionalSummitHero3 |
string |
|
fields OptionalSummitHero3 |
SummitHero3Field[] |
|
label OptionalSummitHero3 |
string |
|
sublabel OptionalSummitHero3 |
string |
|
loadingLabel OptionalSummitHero3 |
string |
|
blockedHint OptionalSummitHero3 |
string |
|
privacy OptionalSummitHero3 |
string |
|
errorMessage OptionalSummitHero3 |
string |
|
state OptionalSummitHero3 |
SummitHero3State |
|
onSubmit OptionalSummitHero3 |
(values: Record<string, string>) => void | Promise<unknown> |
|
copy OptionalSummitHero3 |
{
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 {day} with the day's tab label. */
outcomeLead?: string
/** Word before each speaker name. */
speakerPrefix?: string
/** Accessible name for the day tabs. */
agendaLabel?: string
/** Accessible name for the facts list. */
factsLabel?: string
/** Prefilled values for the forced error state. */
demoName?: string
demoEmail?: string
} |
|
className OptionalSummitHero3 |
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.
-
43adf3b56422e1e1.webp
image/webp · 58.2 KB
-
6994731fb0cb1003.webp
image/webp · 76 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB