Confirmation Hero 1
The you're-in screen: green check chip, the promise repeated as the headline, where-it-went lead, optional date line and yellow notice strip, the orientation video under a red watch-this-first strip, and the three things to do next as a numbered row of cards.
Use it in a prompt
Use hero/confirmation-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/confirmation-hero.tsx. - Import it and pass your copy and images (Props tab):
import { ConfirmationHero } from "@/components/funneldna/hero/confirmation-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/confirmation-hero/component.tsx 500 lines
// Confirms access and guides the visitor through the workshop’s next steps.
'use client'
import * as React from 'react'
import { Check, Loader2, MailWarning, MonitorPlay, RotateCcw, TriangleAlert } from 'lucide-react'
export type ConfirmationHeroProps = {
/** Supporting labels and plain-text templates; named placeholders are documented below. */
copy?: Partial<ConfirmationHeroCopy>
/** Text in the confirmation chip. */
eyebrow?: string
/** Repeat the promise they opted in for, word for word. */
headline: React.ReactNode
/** One continuous phrase inside a string headline to mark with the highlighter. */
highlight?: string
/** What is ready, e.g. the workshop by name. */
subheadline?: React.ReactNode
/** Where the access went. */
lead?: React.ReactNode
/** The one action on this screen, e.g. into the workshop. */
cta?: { label: string; href?: string; disabled?: boolean }
/** Navigation destination; takes precedence over cta.href. */
href?: string
/** Resends the access email; takes precedence over onResend. */
onAction?: () => Promise<void> | void
/** One short reassurance line under the button. */
ctaNote?: React.ReactNode
/** Quiet grey notice, e.g. spam-folder instructions. */
notice?: React.ReactNode
showResend?: boolean
resendLabel?: string
/** @deprecated No longer rendered: the builder wires what happens after the click. */
resendSuccess?: string
resendError?: string
/** Resend handler; a returned promise shows the sending label, a rejection shows the error state. */
onResend?: () => Promise<void> | void
/** The page’s real orientation video embed. */
media?: React.ReactNode
/** Scene used without a video and as the field texture; takes precedence over legacy image. */
sceneImage?: string
image?: string
imageAlt?: string
/** Centred caption over the image. */
caption?: React.ReactNode
/** Action-colour strip above the slot. Pass an empty string to drop it. */
mediaLabel?: string
/** Event timing line under the slot. */
dateLine?: React.ReactNode
/** The three things to do next, in order. */
steps?: ConfirmationStep[]
stepsHeading?: React.ReactNode
/** Preview state for the studio. "success" is accepted for older callers and renders as default. */
state?: ConfirmationHeroState
className?: string
}
export function ConfirmationHero({
eyebrow = 'You’re in!',
headline,
highlight,
subheadline,
lead,
cta,
href = cta?.href,
ctaNote,
notice,
showResend = true,
resendLabel = 'Resend my access email',
resendError = 'We couldn’t resend it. Please try again.',
onResend,
onAction = onResend,
media,
image: legacyImage,
sceneImage: image = legacyImage,
imageAlt = '',
caption,
mediaLabel = 'Watch this first',
dateLine,
steps = [],
stepsHeading = 'Your next three steps',
state = 'default',
className,
copy,
}: ConfirmationHeroProps) {
const text = { ...DEFAULT_COPY, ...copy }
const uid = React.useId()
const titleId = `cfh-title-${uid}`
const stepsId = `cfh-steps-${uid}`
const [resend, setResend] = React.useState<ResendStatus>('idle')
const [done, setDone] = React.useState<Record<number, boolean>>({})
const mounted = React.useRef(true)
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
const status: ResendStatus = state === 'error' ? 'error' : resend
const ctaDisabled = state === 'disabled' || Boolean(cta?.disabled)
const list = steps.slice(0, 3)
const doneCount = list.filter((_, i) => done[i]).length
const hasMedia = Boolean(media || image)
async function handleResend() {
if (status === 'loading' || !onAction) return
try {
const result = onAction()
if (!result) return
setResend('loading')
await result
if (mounted.current) setResend('idle')
} catch {
if (mounted.current) setResend('error')
}
}
return (
<section className={cx('cf-confirmation-hero', className)} aria-labelledby={titleId}>
<style>{CSS}</style>
<div className='cfh-top'>
<div className={cx('cfh-shell cfh-grid', !hasMedia && 'no-media')}>
<div className='cfh-copy'>
<p className='cfh-chip cfh-in' style={delay('0s')}>
<span className='cfh-chip-dot' aria-hidden='true'>
<Check size={18} strokeWidth={3.5} />
</span>
{eyebrow}
</p>
<h1 id={titleId} className='cfh-h1 cfh-in' style={delay('.04s')}>
{withHighlight(headline, highlight)}
</h1>
{subheadline && (
<p className='cfh-sub cfh-in' style={delay('.08s')}>
{subheadline}
</p>
)}
{lead && (
<p className='cfh-lead cfh-in' style={delay('.12s')}>
{lead}
</p>
)}
{cta && (
<div className='cfh-actions cfh-in' style={delay('.16s')}>
<a
href={ctaDisabled ? undefined : href}
role='link'
aria-disabled={ctaDisabled || undefined}
tabIndex={ctaDisabled ? -1 : undefined}
className={cx('cfh-cta', state === 'hover' && 'is-hover', state === 'active' && 'is-active')}
onClick={(event) => {
if (ctaDisabled) event.preventDefault()
}}
>
<span className='cfh-cta-label'>{cta.label}</span>
</a>
{ctaNote && (
<p className='cfh-cta-note'>
<Check size={16} strokeWidth={3} aria-hidden='true' />
<span>{ctaNote}</span>
</p>
)}
</div>
)}
{notice && (
<div className='cfh-notice cfh-in' style={delay('.22s')}>
<span className='cfh-notice-icon' aria-hidden='true'>
<MailWarning size={22} strokeWidth={2.25} />
</span>
<div className='cfh-notice-body'>
<p className='cfh-notice-text'>{notice}</p>
{showResend && (
<div className='cfh-resend-row'>
<button
type='button'
className='cfh-resend'
onClick={handleResend}
disabled={status === 'loading'}
aria-busy={status === 'loading' || undefined}
>
{status === 'loading' ? (
<Loader2 className='cfh-spin' size={16} strokeWidth={2.75} aria-hidden='true' />
) : (
<RotateCcw size={16} strokeWidth={2.75} aria-hidden='true' />
)}
{status === 'loading' ? text.sending : resendLabel}
</button>
<p
className={cx('cfh-status', status === 'error' && 'is-error')}
role='status'
aria-live='polite'
>
{status === 'error' && (
<>
<TriangleAlert size={16} strokeWidth={2.5} aria-hidden='true' />
<span>{resendError}</span>
</>
)}
</p>
</div>
)}
</div>
</div>
)}
</div>
{hasMedia && (
<div className='cfh-mediaCol'>
<span className='cfh-field' aria-hidden='true'>
{image && <img className='cfh-field-img' src={image} alt='' />}
</span>
<div className='cfh-frame-wrap cfh-in' style={delay('.1s')}>
<figure className='cfh-frame'>
{mediaLabel && <p className='cfh-strip'>{mediaLabel}</p>}
<div className={cx('cfh-screen', Boolean(media) && 'is-media')}>
{media ?? (image ? <img src={image} alt={imageAlt} width={1600} height={1000} /> : null)}
</div>
{!media && caption && <figcaption className='cfh-caption'>{caption}</figcaption>}
</figure>
</div>
{dateLine && (
<p className='cfh-date cfh-in' style={delay('.2s')}>
<MonitorPlay size={20} strokeWidth={2.25} aria-hidden='true' />
<span>{dateLine}</span>
</p>
)}
</div>
)}
</div>
</div>
{list.length > 0 && (
<div className='cfh-steps'>
<div className='cfh-shell'>
<div className='cfh-steps-head'>
<h2 id={stepsId} className='cfh-h2'>
{stepsHeading}
</h2>
<div className='cfh-progress'>
<span className='cfh-progress-label'>
{doneCount === list.length ? text.allDone : copyText(text.progress, { count: doneCount, total: list.length })}
</span>
<span
className='cfh-progress-track'
role='progressbar'
aria-label={text.progressAria}
aria-valuemin={0}
aria-valuemax={list.length}
aria-valuenow={doneCount}
>
<span className='cfh-progress-fill' style={{ width: `${(doneCount / list.length) * 100}%` }} />
</span>
</div>
</div>
<ol className='cfh-list' aria-labelledby={stepsId}>
{list.map((step, i) => {
const isDone = Boolean(done[i])
return (
<li
key={step.title}
className={cx('cfh-card cfh-in', isDone && 'is-done')}
style={delay(`${0.1 + i * 0.07}s`)}
>
<div className='cfh-num-row' aria-hidden='true'>
{isDone ? (
<span className='cfh-done'>
<Check size={24} strokeWidth={3.25} />
</span>
) : (
<span className='cfh-num'>{String(i + 1).padStart(2, '0')}</span>
)}
</div>
<h3 className='cfh-h3'>
<span className='cfh-sr'>{copyText(text.stepPrefix, { number: i + 1 })}</span>
{step.title}
</h3>
{step.description && <p className='cfh-desc'>{step.description}</p>}
<div className='cfh-foot'>
{step.action && (
<a className='cfh-link' href={step.action.href}>
{step.action.label}
</a>
)}
<button
type='button'
className='cfh-toggle'
aria-pressed={isDone}
aria-label={copyText(text.stepDoneAria, { number: i + 1 })}
onClick={() => setDone((d) => ({ ...d, [i]: !d[i] }))}
>
<span className='cfh-checkbox' aria-hidden='true'>
{isDone && <Check size={13} strokeWidth={3.75} />}
</span>
{isDone ? text.done : text.markDone}
</button>
</div>
</li>
)
})}
</ol>
</div>
</div>
)}
</section>
)
}
export default ConfirmationHero
export type ConfirmationStep = {
title: string
description?: React.ReactNode
/** One link per step, e.g. { label: 'Start watching', href: '#workshop' }. */
action?: { label: string; href: string }
}
export type ConfirmationHeroState = 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
type ResendStatus = 'idle' | 'loading' | 'error'
function cx(...parts: Array<string | false | null | undefined>) {
return parts.filter(Boolean).join(' ')
}
function withHighlight(headline: React.ReactNode, highlight?: string) {
if (typeof headline !== 'string' || !highlight) return headline
const at = headline.toLowerCase().indexOf(highlight.toLowerCase())
if (at < 0) return headline
return (
<>
{headline.slice(0, at)}
<span className='cfh-mark'>{headline.slice(at, at + highlight.length)}</span>
{headline.slice(at + highlight.length)}
</>
)
}
const delay = (d: string) => ({ ['--d' as string]: d }) as React.CSSProperties
// Theme roles control close, surface-tinted button and card shadows.
// The spam-folder notice is a quiet neutral grey well (ink tint into the surface), never a page or warning tint.
// The confirmation check sits in a deep shade of the theme's success green (L capped at 0.44 so white holds on every theme);
// --cfh-check-ink is the check colour, white unless a theme supplies --success-ink.
const CSS = `
.cf-confirmation-hero{--cfh-green:var(--success);--cfh-green-ink:var(--success);--cfh-green-tint:var(--success-soft);--cfh-deep:oklch(from var(--success,#1f7a45) min(l, 0.44) c h);--cfh-check-ink:var(--success-ink,#ffffff);--cfh-marker:var(--marker,#fae37c);--cfh-notice:color-mix(in oklch,var(--ink,#101828) 4.5%,var(--surface,#ffffff));--cfh-notice-ink:var(--ink,#101828);--cfh-r:var(--radius,14px);position:relative;overflow:clip;background:var(--surface,#ffffff);color:var(--ink,#101828);font-family:var(--font-body,system-ui,sans-serif);-webkit-font-smoothing:antialiased}
.cf-confirmation-hero *,.cf-confirmation-hero *::before,.cf-confirmation-hero *::after{box-sizing:border-box}
:where(.cf-confirmation-hero) .cfh-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
:where(.cf-confirmation-hero) .cfh-shell{width:100%;max-width:1240px;margin:0 auto;padding:0 1.25rem}
:where(.cf-confirmation-hero) .cfh-grid{display:grid;grid-template-columns:minmax(0,1fr);align-items:start}
:where(.cf-confirmation-hero) .cfh-copy{position:relative;z-index:1;padding:3rem 0 2.75rem}
:where(.cf-confirmation-hero) .cfh-chip{display:inline-flex;align-items:center;gap:.6rem;margin:0 0 1.25rem;padding:.4rem 1.05rem .4rem .4rem;border-radius:999px;background:var(--cfh-green-tint);color:var(--cfh-green-ink);font-family:var(--font-display,system-ui,sans-serif);font-weight:800;font-size:1.0625rem;line-height:1.2;box-shadow:inset 0 0 0 1px var(--card-border,oklch(from var(--ink) l c h / 0.12)),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14))}
:where(.cf-confirmation-hero) .cfh-chip-dot{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;background:linear-gradient(180deg,oklch(from var(--cfh-deep) calc(l + 0.06) c h),oklch(from var(--cfh-deep) calc(l - 0.04) c h));color:var(--cfh-check-ink);box-shadow:inset 0 1px 0 oklch(from var(--cfh-deep) calc(l + 0.18) c h / .7),inset 0 -2px 0 oklch(from var(--cfh-deep) calc(l - 0.1) c h),0 0 0 1px oklch(from var(--cfh-deep) calc(l - 0.08) c h),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14));animation:cfh-pop .45s .1s cubic-bezier(.3,1.4,.5,1) backwards}
:where(.cf-confirmation-hero) .cfh-chip-dot svg{filter:drop-shadow(0 1px 0 oklch(from var(--cfh-deep) calc(l - 0.14) c h / .6))}
:where(.cf-confirmation-hero) .cfh-h1{margin:0;font-family:var(--font-display,system-ui,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(2.7rem,6.3vw,5.25rem);line-height:.98;letter-spacing:var(--display-tracking,-.035em);text-wrap:balance;color:var(--ink,#101828);text-transform:var(--display-case,none)}
:where(.cf-confirmation-hero) .cfh-mark{background-image:linear-gradient(var(--cfh-marker),var(--cfh-marker));background-repeat:no-repeat;background-position:0 90%;background-size:100% 62%;padding:0 .14em;margin:0 -.08em;border-radius:.4em .22em .5em .28em/.55em .3em .6em .35em;-webkit-box-decoration-break:clone;box-decoration-break:clone;animation:cfh-ink .65s .25s cubic-bezier(.3,.7,.2,1) backwards}
:where(.cf-confirmation-hero) .cfh-sub{margin:1.4rem 0 0;font-family:var(--font-display,system-ui,sans-serif);font-weight:var(--display-weight,500);font-size:clamp(1.3rem,2.2vw,1.7rem);line-height:1.22;letter-spacing:var(--display-tracking,-.012em);text-wrap:balance;color:var(--ink,#101828);text-transform:var(--display-case,none)}
:where(.cf-confirmation-hero) .cfh-sub strong{font-weight:var(--display-weight,800)}
:where(.cf-confirmation-hero) .cfh-lead{margin:.85rem 0 0;font-size:1.125rem;line-height:1.55;color:var(--muted,#4a5565);max-width:44ch;text-wrap:pretty}
:where(.cf-confirmation-hero) .cfh-actions{margin-top:1.75rem;display:flex;flex-direction:column;align-items:flex-start;gap:.65rem}
:where(.cf-confirmation-hero) .cfh-cta{display:inline-flex;align-items:center;justify-content:center;gap:.75rem;min-height:3.75rem;padding:.85rem 1.6rem;border-radius:var(--button-radius,var(--cfh-r));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));text-shadow:var(--button-text-shadow, 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h / 0.75));font:var(--button-weight,800) 1.2rem/1.1 var(--button-font,var(--font-display));letter-spacing:-.005em;text-decoration:none;text-align:center;text-wrap:balance;cursor:pointer;box-shadow:var(--button-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;text-transform:var(--button-case,none)}
:where(.cf-confirmation-hero) .cfh-cta-label{display:block;padding-top:1px}
:where(.cf-confirmation-hero) .cfh-cta:hover,:where(.cf-confirmation-hero) .cfh-cta.is-hover{transform:translateY(-2px);background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h);box-shadow:var(--button-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-confirmation-hero) .cfh-cta:active,:where(.cf-confirmation-hero) .cfh-cta.is-active{transform:translateY(2px);background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h);box-shadow:var(--button-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-confirmation-hero) .cfh-cta[aria-disabled='true']{background:var(--field);border-color:var(--field-border,oklch(from var(--ink) l c h / 0.22));color:var(--field-ink);text-shadow:none;cursor:not-allowed;transform:none;filter:none;box-shadow:var(--button-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-confirmation-hero) .cfh-cta-note{margin:0;display:inline-flex;align-items:center;gap:.45rem;font-size:.9375rem;font-weight:600;line-height:1.35;color:var(--muted,#4a5565);text-wrap:pretty}
:where(.cf-confirmation-hero) .cfh-cta-note svg{flex:none;color:var(--cfh-green)}
:where(.cf-confirmation-hero) .cfh-notice{margin-top:1.75rem;display:flex;align-items:flex-start;gap:.85rem;max-width:34rem;padding:1rem 1.15rem 1.05rem;border-radius:var(--card-radius,var(--cfh-r));background:var(--cfh-notice);color:var(--cfh-notice-ink);box-shadow:inset 0 0 0 1px oklch(from var(--ink,#101828) l c h / 0.09)}
:where(.cf-confirmation-hero) .cfh-notice-icon{flex:none;display:grid;place-items:center;width:2.4rem;height:2.4rem;border-radius:10px;background:var(--card,#ffffff);color:var(--muted,#4a5565);box-shadow:inset 0 0 0 1px oklch(from var(--ink,#101828) l c h / 0.1),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14))}
:where(.cf-confirmation-hero) .cfh-notice-body{min-width:0;flex:1}
:where(.cf-confirmation-hero) .cfh-notice-text{margin:.35rem 0 0;font-weight:700;font-size:1rem;line-height:1.4;color:var(--cfh-notice-ink);text-wrap:pretty}
:where(.cf-confirmation-hero) .cfh-resend-row{margin-top:.75rem;display:flex;flex-wrap:wrap;align-items:center;gap:.55rem .85rem}
:where(.cf-confirmation-hero) .cfh-resend{display:inline-flex;align-items:center;gap:.45rem;min-height:2.5rem;padding:.45rem .95rem;border-radius:var(--button-radius,var(--radius,999px));border:1px solid var(--button-2-border, transparent);background:var(--button-2-bg, var(--secondary, oklch(0.93 0.01 260)));color:var(--button-2-ink, var(--secondary-ink, var(--ink)));font:var(--button-weight,800) .9375rem/1.2 var(--button-font,var(--font-display));font-weight:var(--button-weight,800);font-size:.9375rem;line-height:1.2;cursor:pointer;box-shadow:var(--button-2-shadow, var(--shadow-sm));transition:background .15s ease,transform .15s ease;text-transform:var(--button-case,none)}
:where(.cf-confirmation-hero) .cfh-resend:hover{background:oklch(from var(--button-2-bg, var(--secondary, oklch(0.93 0.01 260))) calc(l - 0.03) c h);transform:translateY(-1px)}
:where(.cf-confirmation-hero) .cfh-resend:active{transform:translateY(1px);box-shadow:var(--button-2-shadow, var(--shadow-sm))}
:where(.cf-confirmation-hero) .cfh-resend:disabled{cursor:progress;opacity:.85;transform:none}
:where(.cf-confirmation-hero) .cfh-status{margin:0;display:inline-flex;align-items:center;gap:.4rem;font-weight:700;font-size:.9375rem;line-height:1.3;text-wrap:pretty}
:where(.cf-confirmation-hero) .cfh-status svg{flex:none}
:where(.cf-confirmation-hero) .cfh-status.is-error{padding:.35rem .75rem;border-radius:999px;color:var(--danger);background:var(--danger-soft)}
:where(.cf-confirmation-hero) .cfh-spin{animation:cfh-spin .9s linear infinite}
:where(.cf-confirmation-hero) .cfh-mediaCol{position:relative;align-self:stretch;display:flex;flex-direction:column;gap:1.35rem;padding:4.25rem 0 2.75rem}
:where(.cf-confirmation-hero) .cfh-field{position:absolute;top:0;bottom:0;left:-1.25rem;right:-1.25rem;background:var(--band,#0f2747);clip-path:polygon(0 2.75rem,100% 0,100% 100%,0 100%);overflow:hidden}
:where(.cf-confirmation-hero) .cfh-field-img{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;opacity:.14;filter:grayscale(1) contrast(1.15);mix-blend-mode:luminosity}
:where(.cf-confirmation-hero) .cfh-frame-wrap{position:relative;z-index:1}
:where(.cf-confirmation-hero) .cfh-frame{margin:0;position:relative;padding:.5rem;border-radius:var(--card-radius,calc(var(--cfh-r) + 4px));background:var(--card,#ffffff);box-shadow:inset 0 0 0 1px var(--card-border,oklch(from var(--ink) l c h / 0.12)),var(--card-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));transition:transform .4s cubic-bezier(.2,.8,.2,1)}
:where(.cf-confirmation-hero) .cfh-strip{margin:0 0 .5rem;padding:.7rem 1rem;border-radius:calc(var(--cfh-r) - 2px) calc(var(--cfh-r) - 2px) 4px 4px;background:var(--band);color:var(--band-ink);font-family:var(--font-display,system-ui,sans-serif);font-weight:900;font-size:clamp(1.05rem,1.9vw,1.4rem);line-height:1.15;letter-spacing:.05em;text-transform:uppercase;text-align:center;text-wrap:balance;box-shadow:inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .25),inset 0 -2px 0 oklch(from var(--surface) calc(l - 0.12) c h / .15)}
:where(.cf-confirmation-hero) .cfh-screen{position:relative;overflow:hidden;aspect-ratio:16/10;border-radius:4px 4px calc(var(--cfh-r) - 2px) calc(var(--cfh-r) - 2px);background:var(--band,#0f2747)}
:where(.cf-confirmation-hero) .cfh-screen.is-media{aspect-ratio:16/9}
:where(.cf-confirmation-hero) .cfh-screen img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .7s cubic-bezier(.2,.8,.2,1)}
:where(.cf-confirmation-hero) .cfh-screen.is-media > *{display:block;width:100%;height:100%;border:0}
:where(.cf-confirmation-hero) .cfh-frame-wrap:hover .cfh-screen img{transform:scale(1.035)}
:where(.cf-confirmation-hero) .cfh-caption{margin:0;padding:.7rem 1rem .4rem;color:var(--muted,#4a5565);font-weight:700;font-size:.9375rem;line-height:1.3;text-align:center;text-wrap:balance}
:where(.cf-confirmation-hero) .cfh-date{position:relative;z-index:1;margin:0;display:block;color:var(--band-ink,#ffffff);font-weight:700;font-size:1.0625rem;line-height:1.35;text-align:center;text-wrap:pretty;background:var(--band)}
:where(.cf-confirmation-hero) .cfh-date svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;color:var(--band-ink)}
:where(.cf-confirmation-hero) .cfh-steps{position:relative;background:color-mix(in oklch,var(--ink) 3%,var(--surface,#ffffff));padding:3.25rem 0 3.75rem}
:where(.cf-confirmation-hero) .cfh-steps-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:1rem 2rem;margin-bottom:1.75rem}
:where(.cf-confirmation-hero) .cfh-h2{margin:0;font-family:var(--font-display,system-ui,sans-serif);font-weight:var(--display-weight,900);font-size:clamp(2rem,3.8vw,3rem);line-height:1.04;letter-spacing:var(--display-tracking,-.03em);text-wrap:balance;color:var(--ink,#101828);text-transform:var(--display-case,none)}
:where(.cf-confirmation-hero) .cfh-progress{display:flex;align-items:center;gap:.85rem;min-width:min(100%,17rem);padding:.6rem 1rem;border-radius:999px;background:var(--card,#ffffff);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));box-shadow:var(--card-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-confirmation-hero) .cfh-progress-label{flex:none;font-weight:800;font-size:.9375rem;color:var(--ink,#101828);font-variant-numeric:tabular-nums}
:where(.cf-confirmation-hero) .cfh-progress-track{flex:1;min-width:6rem;height:.6rem;border-radius:999px;overflow:hidden;background:color-mix(in oklch,var(--ink,#101828) 10%,var(--card,#ffffff))}
:where(.cf-confirmation-hero) .cfh-progress-fill{display:block;height:100%;border-radius:inherit;background:var(--cfh-green);box-shadow:inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .35);transition:width .5s cubic-bezier(.2,.8,.2,1)}
:where(.cf-confirmation-hero) .cfh-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}
:where(.cf-confirmation-hero) .cfh-card{position:relative;display:flex;flex-direction:column;gap:.5rem;padding:1.5rem 1.5rem 1.3rem;border-radius:var(--card-radius,calc(var(--cfh-r) + 2px));background:var(--card,#ffffff);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));box-shadow:inset 0 0 0 4px color-mix(in oklch,var(--ink) 4%,var(--card)),var(--card-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
:where(.cf-confirmation-hero) .cfh-card:hover{transform:translateY(-3px);box-shadow:inset 0 0 0 4px color-mix(in oklch,var(--ink) 6%,var(--card)),var(--card-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-confirmation-hero) .cfh-card.is-done{border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12));box-shadow:inset 0 0 0 4px var(--success-soft),var(--card-shadow,var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
:where(.cf-confirmation-hero) .cfh-num-row{height:2.75rem;display:flex;align-items:center;margin-bottom:.35rem}
:where(.cf-confirmation-hero) .cfh-num{font-family:var(--font-display,system-ui,sans-serif);font-weight:var(--display-weight,900);font-size:2.75rem;line-height:1;letter-spacing:var(--display-tracking,-.04em);color:var(--accent,#0f5fc2);font-variant-numeric:tabular-nums;text-transform:var(--display-case,none)}
:where(.cf-confirmation-hero) .cfh-done{display:grid;place-items:center;width:2.75rem;height:2.75rem;border-radius:50%;background:linear-gradient(180deg,oklch(from var(--cfh-deep) calc(l + 0.06) c h),oklch(from var(--cfh-deep) calc(l - 0.04) c h));color:var(--cfh-check-ink);box-shadow:inset 0 1px 0 oklch(from var(--cfh-deep) calc(l + 0.18) c h / .7),inset 0 -2px 0 oklch(from var(--cfh-deep) calc(l - 0.1) c h),0 0 0 1px oklch(from var(--cfh-deep) calc(l - 0.08) c h),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14));animation:cfh-pop .4s cubic-bezier(.3,1.4,.5,1)}
:where(.cf-confirmation-hero) .cfh-done svg{filter:drop-shadow(0 1px 0 oklch(from var(--cfh-deep) calc(l - 0.14) c h / .6))}
:where(.cf-confirmation-hero) .cfh-h3{margin:0;font-family:var(--font-display,system-ui,sans-serif);font-weight:var(--display-weight,800);font-size:1.4rem;line-height:1.15;letter-spacing:var(--display-tracking,-.015em);text-wrap:balance;color:var(--ink,#101828);text-transform:var(--display-case,none)}
:where(.cf-confirmation-hero) .cfh-desc{margin:0;font-size:1.0625rem;line-height:1.5;color:var(--muted,#4a5565);text-wrap:pretty}
:where(.cf-confirmation-hero) .cfh-foot{margin-top:auto;padding-top:.9rem;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem .75rem}
:where(.cf-confirmation-hero) .cfh-link{display:inline-flex;align-items:center;gap:.35rem;min-height:2.75rem;color:var(--link, var(--accent));font-weight:800;font-size:1.0625rem;text-decoration:underline;text-decoration-thickness:2px;text-decoration-color:oklch(from var(--link, var(--accent)) l c h / 0.45);text-underline-offset:0.18em}:where(.cf-confirmation-hero) .cfh-link:hover,:where(.cf-confirmation-hero) .cfh-link:focus-visible{color:oklch(from var(--link, var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor}
:where(.cf-confirmation-hero) .cfh-toggle{display:inline-flex;align-items:center;gap:.5rem;min-height:2.75rem;padding:.45rem 1rem .45rem .75rem;border-radius:var(--button-radius,var(--radius,999px));border:1px solid var(--button-2-border, transparent);background:var(--button-2-bg, var(--secondary, oklch(0.93 0.01 260)));color:var(--button-2-ink, var(--secondary-ink, var(--ink)));font:var(--button-weight,800) .9375rem/1.2 var(--button-font,var(--font-display));font-weight:var(--button-weight,800);font-size:.9375rem;line-height:1.2;cursor:pointer;box-shadow:var(--button-2-shadow, var(--shadow-sm));transition:background .15s ease,border-color .15s ease,transform .15s ease;text-transform:var(--button-case,none)}
:where(.cf-confirmation-hero) .cfh-toggle:hover{background:oklch(from var(--button-2-bg, var(--secondary, oklch(0.93 0.01 260))) calc(l - 0.03) c h);transform:translateY(-1px)}
:where(.cf-confirmation-hero) .cfh-toggle:active{transform:translateY(1px);box-shadow:var(--button-2-shadow, var(--shadow-sm))}
:where(.cf-confirmation-hero) .cfh-checkbox{display:grid;place-items:center;width:1.2rem;height:1.2rem;border-radius:var(--field-radius,var(--radius,6px));border:2px solid var(--field-border,oklch(from var(--ink) l c h / 0.22));background:var(--field,#ffffff);color:var(--field-ink);transition:background .15s ease,border-color .15s ease}
:where(.cf-confirmation-hero) .cfh-toggle[aria-pressed='true']{background:var(--button-2-bg,var(--card));border-color:var(--button-2-border,oklch(from var(--ink) l c h / 0.22));color:var(--button-2-ink,var(--ink))}
:where(.cf-confirmation-hero) .cfh-toggle[aria-pressed='true'] .cfh-checkbox{background:var(--success-soft);border-color:var(--success);color:var(--success)}
.cf-confirmation-hero a:focus-visible,.cf-confirmation-hero button:focus-visible{outline:3px solid var(--accent,#0f5fc2);outline-offset:3px}
:where(.cf-confirmation-hero) .cfh-cta:focus-visible{outline-offset:4px}
:where(.cf-confirmation-hero) .cfh-in{animation:cfh-rise .45s cubic-bezier(.2,.8,.2,1) backwards;animation-delay:var(--d,0s)}
@keyframes cfh-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes cfh-ink{from{background-size:0% 62%}to{background-size:100% 62%}}
@keyframes cfh-pop{0%{transform:scale(.6)}60%{transform:scale(1.12)}100%{transform:scale(1)}}
@keyframes cfh-spin{to{transform:rotate(360deg)}}
@media (max-width:559px){
:where(.cf-confirmation-hero) .cfh-actions{align-items:stretch}
:where(.cf-confirmation-hero) .cfh-cta{width:100%}
:where(.cf-confirmation-hero) .cfh-cta-note{justify-content:center}
:where(.cf-confirmation-hero) .cfh-progress{width:100%}
:where(.cf-confirmation-hero) .cfh-caption{font-size:.875rem}
}
@media (min-width:760px){
:where(.cf-confirmation-hero) .cfh-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:1.25rem}
}
@media (min-width:960px){
:where(.cf-confirmation-hero) .cfh-shell{padding:0 2.5rem}
:where(.cf-confirmation-hero) .cfh-grid{grid-template-columns:minmax(0,1.04fr) minmax(0,1fr)}
:where(.cf-confirmation-hero) .cfh-grid.no-media{grid-template-columns:minmax(0,1fr)}
:where(.cf-confirmation-hero) .cfh-copy{padding:5.25rem 3.75rem 5.25rem 0}
:where(.cf-confirmation-hero) .cfh-mediaCol{padding:5rem 0 4.5rem 4.75rem}
:where(.cf-confirmation-hero) .cfh-field{left:-2.75rem;right:-100vw;clip-path:polygon(5.5rem 0,100% 0,100% 100%,0 100%)}
:where(.cf-confirmation-hero) .cfh-field-img{width:62vw}
:where(.cf-confirmation-hero) .cfh-frame{transform:rotate(-1.25deg)}
:where(.cf-confirmation-hero) .cfh-frame-wrap:hover .cfh-frame{transform:rotate(0deg) translateY(-4px)}
:where(.cf-confirmation-hero) .cfh-steps{padding:4rem 0 4.5rem}
}
@media (prefers-reduced-motion:reduce){
.cf-confirmation-hero *,.cf-confirmation-hero *::before,.cf-confirmation-hero *::after{animation:none!important;transition:none!important}
:where(.cf-confirmation-hero) .cfh-frame-wrap:hover .cfh-screen img{transform:none}
}
`
type ConfirmationHeroCopy = {
sending: string
allDone: string
/** Uses {count} and {total}. */
progress: string
progressAria: string
/** Uses {number}. */
stepPrefix: string
/** Uses {number}. */
stepDoneAria: string
done: string
markDone: string
}
const DEFAULT_COPY: ConfirmationHeroCopy = {
"sending": "Sending…",
"allDone": "All done",
"progress": "{count} of {total} done",
"progressAria": "Next steps completed",
"stepPrefix": "Step {number}: ",
"stepDoneAria": "Step {number} done",
"done": "Done",
"markDone": "Mark done"
}
function copyText(template: string, values: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => Object.hasOwn(values, key) ? String(values[key]) : match)
}
pieces/hero/confirmation-hero/specimen.tsx 53 lines
import __studioImage058dfb26 from "../assets/c8647b3b3949dd2d.webp";
import * as React from 'react'
import { slot } from '../../slots'
import defaults from '../../studio-defaults.json'
import { ConfirmationHero, type ConfirmationHeroState } from '../confirmation-hero'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function ConfirmationHeroSpecimen({ state = 'default' }: { state?: string }) {
const sample = defaults.sample
const reg = sample.registration
return (
<div>
<ConfirmationHero
state={state as ConfirmationHeroState}
eyebrow='You’re in!'
headline={reg.headline}
highlight='your first funnel'
subheadline={
<>
Your <strong>{reg.name}</strong> is ready to watch.
</>
}
lead='We’ve also sent your access link to your inbox, so you can come back to it any time.'
cta={{ label: 'Start The Workshop Now', href: '#workshop' }}
ctaNote={reg.sublabel}
notice='Can’t find the email? Check your spam or promotions folder.'
sceneImage={slot('scene', __studioImage058dfb26)}
imageAlt='A desk set up to plan a first funnel: an open notebook with a sketched funnel diagram, a pen and a mug of coffee'
caption='Your offer · Your page copy · Your next steps'
mediaLabel='Start here'
dateLine='On demand · Start whenever you’re ready'
stepsHeading='Your next three steps'
steps={[
{
title: 'Watch the workshop',
description: 'Walk through your offer, page copy, and next steps.',
action: { label: 'Start watching', href: '#workshop' },
},
{
title: 'Map your offer',
description: sample.items[0].detail,
},
{
title: 'Check your next steps',
description: sample.items[2].detail,
},
]}
/>
</div>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalConfirmationHero |
Partial<ConfirmationHeroCopy> |
|
eyebrow OptionalConfirmationHero |
string |
Default 'You’re in!'
|
headline RequiredConfirmationHero |
React.ReactNode |
|
highlight OptionalConfirmationHero |
string |
|
subheadline OptionalConfirmationHero |
React.ReactNode |
|
lead OptionalConfirmationHero |
React.ReactNode |
|
cta OptionalConfirmationHero |
{ label: string; href?: string; disabled?: boolean } |
|
href OptionalConfirmationHero |
string |
Default cta?.href
|
onAction OptionalConfirmationHero |
() => Promise<void> | void |
Default onResend
|
ctaNote OptionalConfirmationHero |
React.ReactNode |
|
notice OptionalConfirmationHero |
React.ReactNode |
|
showResend OptionalConfirmationHero |
boolean |
Default true
|
resendLabel OptionalConfirmationHero |
string |
Default 'Resend my access email'
|
resendSuccess OptionalConfirmationHero |
string |
|
resendError OptionalConfirmationHero |
string |
Default 'We couldn’t resend it. Please try again.'
|
onResend OptionalConfirmationHero |
() => Promise<void> | void |
|
media OptionalConfirmationHero |
React.ReactNode |
|
sceneImage OptionalConfirmationHero |
string |
Default legacyImage
|
image OptionalConfirmationHero |
string |
|
imageAlt OptionalConfirmationHero |
string |
Default ''
|
caption OptionalConfirmationHero |
React.ReactNode |
|
mediaLabel OptionalConfirmationHero |
string |
Default 'Watch this first'
|
dateLine OptionalConfirmationHero |
React.ReactNode |
|
steps OptionalConfirmationHero |
ConfirmationStep[] |
Default []
|
stepsHeading OptionalConfirmationHero |
React.ReactNode |
Default 'Your next three steps'
|
state OptionalConfirmationHero |
ConfirmationHeroState |
Default 'default'
|
className OptionalConfirmationHero |
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-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-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.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
c8647b3b3949dd2d.webp
image/webp · 129 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB