Apply Hero 2
Application hero: a selective promise beside a fit ledger. Each criterion the visitor ticks fills a short fit meter in words, and the ticks travel with the button into the application.
Use it in a prompt
Use hero/apply-hero-2 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/apply-hero-2.tsx. - Import it and pass your copy and images (Props tab):
import { ApplyHero2 } from "@/components/funneldna/hero/apply-hero-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/apply-hero-2/component.tsx 729 lines
// layout: ledger-receipt
// Application hero: a selective promise beside a fit ledger. Each criterion the visitor ticks fills a short fit meter in words, and the ticks travel with the button into the application.
import * as React from 'react'
import { AlertCircle, CalendarCheck, Check, Loader2 } from 'lucide-react'
import { FX_HOST, Pattern } from '../fx/fx'
/** States the piece implements: hover and active force the button look, error shows the failed-start alert. */
export type ApplyHero2State = 'default' | 'hover' | 'active' | 'error'
export type ApplyHero2Criterion = {
/** One line the visitor can tick, e.g. 'You lead a team of 5 or more'. */
label: string
/** Value sent when ticked; defaults to c1, c2… */
value?: string
}
/** How many criteria are ticked, in words: none, some, fit (at or past the threshold) or all. */
export type ApplyHero2Level = 'none' | 'some' | 'fit' | 'all'
/** What onAction receives when the visitor starts. */
export type ApplyHero2Fit = {
name: string
/** Values of the ticked criteria, in list order. */
checked: string[]
/** Labels of the ticked criteria. */
labels: string[]
count: number
total: number
level: ApplyHero2Level
}
/** Meter lines per level; {count} and {total} are replaced with the numbers. */
export type ApplyHero2MeterCopy = Record<ApplyHero2Level, string>
export type ApplyHero2Props = {
/** Headline text before the marker-highlighted phrase (keep the trailing space). */
headlineBefore?: string
/** Phrase drawn with one marker stroke. */
headlineEmphasis?: string
headlineAfter?: string
lead?: string
/** Bold lead-in of the what-happens-after-you-apply line. */
nextLead?: string
nextText?: string
/** Heading over the checklist. */
checklistTitle?: string
/** One short line under the checklist heading. */
checklistNote?: string
criteria?: ApplyHero2Criterion[]
/** Values ticked on first render. */
defaultChecked?: string[]
/** Field name the ticks are sent under. */
name?: string
/** Ticks needed for the fit line; defaults to three quarters of the list, rounded up. */
fitThreshold?: number
meterCopy?: Partial<ApplyHero2MeterCopy>
ctaLabel?: string
/** Button label while a promise returned by onAction is pending. */
ctaLoadingLabel?: string
/** Button label after onAction failed. */
ctaRetryLabel?: string
/** One short line under the button. */
reassurance?: string
/** Alert under the button when onAction failed. */
errorMessage?: string
/** Where the application lives; the ticks travel as query parameters. Followed only without onAction and simulate. */
href?: string
/** Called with the ticks when the visitor starts. A returned promise shows the loading label; a rejection shows errorMessage. */
onAction?: (fit: ApplyHero2Fit) => void | Promise<unknown>
/** Preview mode: the form never navigates. */
simulate?: boolean
/** Criteria sheet on a clipboard, transparent background (slot: product). Hidden on phones. */
productImage?: string
productAlt?: string
state?: ApplyHero2State
className?: string
style?: React.CSSProperties
}
type Phase = 'idle' | 'loading' | 'error'
const DEFAULT_CRITERIA: ApplyHero2Criterion[] = [
{ label: 'Your business is already making sales', value: 'revenue' },
{ label: 'You have at least one person on your team', value: 'team' },
{ label: 'You can give it a few hours each month', value: 'time' },
{ label: 'You’re ready to share real numbers with the group', value: 'numbers' },
]
const DEFAULT_METER: ApplyHero2MeterCopy = {
none: '{count} of {total} ticked so far',
some: '{count} of {total}: apply and tell us more',
fit: '{count} of {total}: you sound like a fit',
all: '{count} of {total}: you sound like a strong fit',
}
const NO_TICKS: string[] = []
export function ApplyHero2(props: ApplyHero2Props) {
const {
headlineBefore = 'Earn your seat with founders ',
headlineEmphasis = 'a stage ahead',
headlineAfter = '.',
lead = 'An application-only mastermind for founders ready to grow. Tick what’s true for you, then send your application.',
nextLead = 'After you apply,',
nextText = 'we read every answer and invite you to a short call if it’s a fit.',
checklistTitle = 'Tick what’s true for you',
checklistNote = 'Your ticks go with your application.',
criteria = DEFAULT_CRITERIA,
defaultChecked = NO_TICKS,
name = 'fit',
fitThreshold,
meterCopy,
ctaLabel = 'Send My Application',
ctaLoadingLabel = 'Sending your answers',
ctaRetryLabel = 'Try Again',
reassurance = 'Takes a few minutes · No obligation',
errorMessage = 'We couldn’t start your application. Please try again.',
href,
onAction,
simulate = false,
productImage,
productAlt = 'Clipboard holding the fit criteria sheet',
state = 'default',
className,
style,
} = props
const uid = React.useId()
const headingId = `${uid}-h`
const noteId = `${uid}-note`
const totalId = `${uid}-total`
const reassureId = `${uid}-re`
const errorId = `${uid}-err`
const items = criteria.map((item, index) => ({ label: item.label, value: item.value || `c${index + 1}` }))
const total = items.length
const [checked, setChecked] = React.useState<string[]>(defaultChecked)
const [phase, setPhase] = React.useState<Phase>(state === 'error' ? 'error' : 'idle')
const mounted = React.useRef(true)
React.useEffect(() => {
setPhase(state === 'error' ? 'error' : 'idle')
}, [state])
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
const ticked = items.filter((item) => checked.includes(item.value))
const count = ticked.length
const threshold = Math.min(Math.max(1, fitThreshold ?? Math.ceil(total * 0.75)), Math.max(total, 1))
const level: ApplyHero2Level =
count === 0 ? 'none' : count >= total ? 'all' : count >= threshold ? 'fit' : 'some'
const copy: ApplyHero2MeterCopy = { ...DEFAULT_METER, ...meterCopy }
const meterText = fill(copy[level], count, total)
const isFit = level === 'fit' || level === 'all'
const busy = phase === 'loading'
const isError = phase === 'error'
const forced = state === 'hover' ? ' is-hover' : state === 'active' ? ' is-active' : ''
const label = busy ? ctaLoadingLabel : isError ? ctaRetryLabel : ctaLabel
const describedBy =
[total ? totalId : '', reassurance ? reassureId : '', isError ? errorId : ''].filter(Boolean).join(' ') || undefined
const navigates = Boolean(href) && !onAction && !simulate
function toggle(value: string, on: boolean) {
setChecked((current) =>
on ? (current.includes(value) ? current : [...current, value]) : current.filter((v) => v !== value),
)
}
function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
if (busy) {
event.preventDefault()
return
}
if (onAction) {
event.preventDefault()
const fit: ApplyHero2Fit = {
name,
checked: ticked.map((item) => item.value),
labels: ticked.map((item) => item.label),
count,
total,
level,
}
let result: void | Promise<unknown>
try {
result = onAction(fit)
} catch {
setPhase('error')
return
}
if (!result || typeof (result as Promise<unknown>).then !== 'function') {
setPhase('idle')
return
}
setPhase('loading')
;(result as Promise<unknown>).then(
() => {
if (mounted.current) setPhase('idle')
},
() => {
if (mounted.current) setPhase('error')
},
)
return
}
if (!navigates) event.preventDefault()
}
return (
<section
className={['cf-apply-hero-2', className].filter(Boolean).join(' ')}
style={{ ...FX_HOST, ...style }}
aria-labelledby={headingId}
>
<Pattern name='grid' fade='edges' />
<style>{CSS}</style>
<div className={'ah2-inner' + (productImage ? ' has-image' : '')}>
<div className='ah2-copy'>
<h1 id={headingId} className='ah2-h1 ah2-rise'>
{headlineBefore}
{headlineEmphasis ? <span className='ah2-mark'>{headlineEmphasis}</span> : null}
{headlineAfter}
</h1>
{lead ? (
<p className='ah2-lead ah2-rise' style={delay('.07s')}>
{lead}
</p>
) : null}
{nextLead || nextText ? (
<p className='ah2-next ah2-rise' style={delay('.14s')}>
<CalendarCheck className='ah2-next-ico' aria-hidden='true' strokeWidth={2.5} />
{nextLead ? <strong>{nextLead}</strong> : null}
{nextLead && nextText ? ' ' : null}
{nextText}
</p>
) : null}
</div>
{productImage ? (
<img
className='ah2-img ah2-rise'
style={delay('.21s')}
src={productImage}
alt={productAlt}
width={560}
height={560}
decoding='async'
/>
) : null}
<form
className='ah2-card ah2-rise'
style={delay('.21s')}
action={navigates ? href : undefined}
method='get'
onSubmit={handleSubmit}
noValidate
>
<fieldset className='ah2-set'>
<legend className='ah2-legend'>{checklistTitle}</legend>
{checklistNote ? (
<p id={noteId} className='ah2-note'>
{checklistNote}
</p>
) : null}
<ul className='ah2-rows' role='list'>
{items.map((item, index) => {
const id = `${uid}-c${index}`
const on = checked.includes(item.value)
return (
<li key={item.value + index} className={'ah2-row' + (on ? ' is-on' : '')}>
<input
id={id}
className='ah2-input'
type='checkbox'
name={name}
value={item.value}
checked={on}
onChange={(event) => toggle(item.value, event.target.checked)}
aria-describedby={checklistNote ? noteId : undefined}
/>
<label htmlFor={id} className='ah2-label'>
<span className='ah2-text'>{item.label}</span>
<span className='ah2-box' aria-hidden='true'>
<Check strokeWidth={3} />
</span>
</label>
</li>
)
})}
</ul>
</fieldset>
{total ? (
<div className='ah2-tally'>
<div className={'ah2-meter is-' + level} aria-hidden='true'>
{items.map((item, index) => (
<span
key={item.value + index}
className={'ah2-seg' + (index < count ? ' is-on' : '')}
style={{ '--i': index } as React.CSSProperties}
/>
))}
</div>
<p id={totalId} className={'ah2-total is-' + level} aria-live='polite'>
<span key={meterText} className='ah2-total-text'>
{isFit ? (
<span className='ah2-badge' aria-hidden='true'>
<Check strokeWidth={3} />
</span>
) : null}
{meterText}
</span>
</p>
</div>
) : null}
<button type='submit' className={'ah2-btn' + forced} aria-busy={busy || undefined} aria-describedby={describedBy}>
{busy ? <Loader2 className='ah2-spin' aria-hidden='true' strokeWidth={2.5} /> : null}
<span className='ah2-btn-label'>{label}</span>
</button>
{reassurance ? (
<p id={reassureId} className='ah2-reassure'>
{reassurance}
</p>
) : null}
{isError ? (
<p id={errorId} className='ah2-error' role='alert'>
<AlertCircle className='ah2-error-ico' aria-hidden='true' strokeWidth={2.5} />
{errorMessage}
</p>
) : null}
</form>
</div>
</section>
)
}
export default ApplyHero2
function fill(template: string, count: number, total: number) {
return template.split('{count}').join(String(count)).split('{total}').join(String(total))
}
function delay(value: string) {
return { '--d': value } as React.CSSProperties
}
const CSS = `
.cf-apply-hero-2 {
--ah2-shadow: var(--shadow, oklch(0.22 0.03 256));
--ah2-marker: var(--marker, #fae37c);
--ah2-focus: var(--field-focus, var(--accent, oklch(0.5 0.17 257)));
--ah2-success: var(--success, oklch(0.5 0.138 150));
position: relative;
overflow: clip;
background: var(--surface, oklch(1 0 0));
color: var(--ink, oklch(0.21 0.034 263));
font-family: var(--font-body, system-ui, sans-serif);
padding: clamp(56px, 8vw, 112px) clamp(16px, 5vw, 48px) clamp(64px, 8.5vw, 120px);
}
.cf-apply-hero-2 :where(*, *::before, *::after) { box-sizing: border-box; }
.cf-apply-hero-2 .ah2-inner {
position: relative;
z-index: 1;
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: clamp(32px, 5vw, 72px);
align-items: start;
max-width: 1120px;
margin: 0 auto;
}
.cf-apply-hero-2 .ah2-copy { max-width: 46rem; }
.cf-apply-hero-2 .ah2-h1 {
margin: 0;
font-family: var(--font-display, inherit);
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.4vw, 4rem);
line-height: 1.04;
color: var(--ink, oklch(0.21 0.034 263));
text-wrap: balance;
}
.cf-apply-hero-2 .ah2-mark {
color: var(--marker-ink, var(--field-ink, var(--ink, oklch(0.21 0.034 263))));
background: linear-gradient(180deg, transparent 14%, oklch(from var(--ah2-marker) l c h / 0.92) 14%, oklch(from var(--ah2-marker) l c h / 0.92) 94%, transparent 94%);
padding: 0 0.1em;
margin: 0 -0.04em;
border-radius: 0.18em 0.3em 0.22em 0.34em;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-apply-hero-2 .ah2-lead {
margin: 20px 0 0;
max-width: 34em;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--muted, oklch(0.45 0.03 258));
text-wrap: pretty;
}
.cf-apply-hero-2 .ah2-next {
margin: 28px 0 0;
max-width: 34em;
padding: 14px 16px;
border-radius: 10px;
background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 5%, var(--surface, oklch(1 0 0)));
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
color: var(--ink, oklch(0.21 0.034 263));
text-wrap: pretty;
}
.cf-apply-hero-2 .ah2-next strong { font-weight: 800; }
.cf-apply-hero-2 .ah2-next-ico {
display: inline-block;
width: 18px;
height: 18px;
vertical-align: -0.2em;
margin-inline-end: 0.4em;
color: var(--accent, oklch(0.5 0.17 257));
}
.cf-apply-hero-2 .ah2-img { display: none; }
.cf-apply-hero-2 .ah2-card {
position: relative;
z-index: 2;
margin: 0;
min-width: 0;
max-width: 40rem;
background: var(--card, oklch(1 0 0));
color: var(--ink, oklch(0.21 0.034 263));
border: 1px solid var(--card-border, color-mix(in oklch, var(--accent, oklch(0.5 0.17 257)) 22%, var(--card, oklch(1 0 0))));
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--ah2-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--ah2-shadow) l c h / 0.32)));
padding: clamp(20px, 3vw, 32px);
}
.cf-apply-hero-2 .ah2-set { margin: 0; padding: 0; border: 0; min-width: 0; }
.cf-apply-hero-2 .ah2-legend {
float: left;
width: 100%;
margin: 0;
padding: 0;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
letter-spacing: -0.01em;
color: var(--ink, oklch(0.21 0.034 263));
text-wrap: balance;
}
.cf-apply-hero-2 .ah2-note {
clear: both;
margin: 0;
padding-top: 8px;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 500;
color: var(--muted, oklch(0.45 0.03 258));
text-wrap: pretty;
}
.cf-apply-hero-2 .ah2-rows {
clear: both;
display: grid;
gap: 6px;
margin: 16px 0 0;
padding: 0;
list-style: none;
}
.cf-apply-hero-2 .ah2-row { position: relative; }
.cf-apply-hero-2 .ah2-input {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 1px;
margin: 0;
opacity: 0;
pointer-events: none;
}
.cf-apply-hero-2 .ah2-label {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
min-height: 56px;
padding: 15px 14px 15px 16px;
border-radius: 10px;
background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 4%, var(--card, oklch(1 0 0)));
cursor: pointer;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.4;
font-weight: 600;
color: var(--ink, oklch(0.21 0.034 263));
-webkit-tap-highlight-color: transparent;
transition: background-color 0.16s ease;
}
.cf-apply-hero-2 .ah2-text { flex: 1 1 auto; min-width: 0; text-wrap: pretty; }
.cf-apply-hero-2 .ah2-box {
flex: 0 0 26px;
width: 26px;
height: 26px;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 7px;
background: var(--field, oklch(1 0 0));
border: 2px solid oklch(from var(--field-ink, var(--ink, oklch(0.21 0.034 263))) l c h / 0.38);
color: var(--success-ink, #fff);
transition: background-color 0.16s ease, border-color 0.16s ease;
}
.cf-apply-hero-2 .ah2-box svg {
width: 18px;
height: 18px;
opacity: 0;
transform: scale(0.6);
transition: opacity 0.16s ease, transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cf-apply-hero-2 .ah2-label:hover { background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 8%, var(--card, oklch(1 0 0))); }
.cf-apply-hero-2 .ah2-label:hover .ah2-box { border-color: oklch(from var(--field-ink, var(--ink, oklch(0.21 0.034 263))) l c h / 0.7); }
.cf-apply-hero-2 .ah2-input:focus-visible + .ah2-label {
background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 8%, var(--card, oklch(1 0 0)));
outline: 3px solid oklch(from var(--ah2-focus) l c h / 0.55);
outline-offset: 2px;
}
.cf-apply-hero-2 .ah2-input:focus-visible + .ah2-label .ah2-box { border-color: var(--ah2-focus); }
.cf-apply-hero-2 .ah2-input:checked + .ah2-label {
background: var(--success-soft, color-mix(in oklch, var(--ah2-success) 14%, var(--card, oklch(1 0 0))));
}
.cf-apply-hero-2 .ah2-input:checked + .ah2-label:hover {
background: oklch(from var(--success-soft, color-mix(in oklch, var(--ah2-success) 14%, var(--card, oklch(1 0 0)))) calc(l - 0.02) c h);
}
.cf-apply-hero-2 .ah2-input:checked + .ah2-label .ah2-box {
background: var(--ah2-success);
border-color: var(--ah2-success);
}
.cf-apply-hero-2 .ah2-input:checked + .ah2-label .ah2-box svg { opacity: 1; transform: scale(1); }
.cf-apply-hero-2 .ah2-tally { margin: 24px 0 0; }
.cf-apply-hero-2 .ah2-meter { display: flex; gap: 6px; }
.cf-apply-hero-2 .ah2-seg {
position: relative;
flex: 1 1 0;
height: 10px;
border-radius: 999px;
overflow: hidden;
background: color-mix(in oklch, var(--ink, oklch(0.21 0.034 263)) 10%, var(--card, oklch(1 0 0)));
}
.cf-apply-hero-2 .ah2-seg::after {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
background: var(--accent-fill, var(--accent, oklch(0.5 0.17 257)));
transform: scaleX(0);
transform-origin: left center;
transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), background-color 0.3s ease;
transition-delay: min(calc(var(--i, 0) * 0.05s), 0.28s);
}
.cf-apply-hero-2 .ah2-seg.is-on::after { transform: scaleX(1); }
.cf-apply-hero-2 .ah2-meter.is-fit .ah2-seg::after,
.cf-apply-hero-2 .ah2-meter.is-all .ah2-seg::after { background: var(--ah2-success); }
.cf-apply-hero-2 .ah2-total {
margin: 12px 0 0;
font-family: var(--font-display, inherit);
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.25;
letter-spacing: -0.01em;
color: var(--ink, oklch(0.21 0.034 263));
text-wrap: balance;
}
.cf-apply-hero-2 .ah2-total-text { display: inline-block; }
.cf-apply-hero-2 .ah2-badge {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.05em;
height: 1.05em;
margin-inline-end: 0.35em;
vertical-align: -0.16em;
border-radius: 999px;
background: var(--ah2-success);
color: var(--success-ink, #fff);
}
.cf-apply-hero-2 .ah2-badge svg { width: 0.68em; height: 0.68em; }
.cf-apply-hero-2 .ah2-btn {
--ah2-bg: var(--button-bg, var(--cta, oklch(0.576 0.209 29.5)));
--ah2-bg-2: var(--button-bg-2, var(--cta-2, oklch(0.506 0.206 29.5)));
appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
width: 100%;
min-height: 64px;
margin: 16px 0 0;
padding: 12px 28px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(180deg, oklch(from var(--ah2-bg) calc(l + 0.04) c h), oklch(from var(--ah2-bg-2) calc(l - 0.02) c h));
color: var(--button-ink, var(--cta-ink, #fff));
font-family: var(--button-font, var(--font-display, inherit));
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-shadow: var(--button-text-shadow, none);
cursor: pointer;
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--ah2-bg) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--ah2-bg) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--ah2-shadow) l c h / 0.3), 0 8px 16px -6px oklch(from var(--ah2-shadow) l c h / 0.38));
-webkit-tap-highlight-color: transparent;
transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.cf-apply-hero-2 .ah2-btn-label { text-wrap: balance; }
.cf-apply-hero-2 .ah2-btn:hover,
.cf-apply-hero-2 .ah2-btn.is-hover {
background: linear-gradient(180deg, oklch(from var(--ah2-bg) calc(l - 0.01) c h), oklch(from var(--ah2-bg-2) calc(l - 0.07) c h));
box-shadow: inset 0 1px 0 oklch(from var(--ah2-bg) calc(l + 0.12) c h / 0.6), inset 0 -3px 0 oklch(from var(--ah2-bg) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--ah2-shadow) l c h / 0.32), 0 12px 20px -8px oklch(from var(--ah2-shadow) l c h / 0.45);
transform: translateY(-1px);
}
.cf-apply-hero-2 .ah2-btn:active,
.cf-apply-hero-2 .ah2-btn.is-active {
background: linear-gradient(180deg, oklch(from var(--ah2-bg) calc(l - 0.05) c h), oklch(from var(--ah2-bg-2) calc(l - 0.08) c h));
box-shadow: inset 0 2px 4px oklch(from var(--ah2-bg) calc(l - 0.24) c h / 0.5), inset 0 -2px 0 oklch(from var(--ah2-bg) calc(l - 0.16) c h), 0 1px 1px oklch(from var(--ah2-shadow) l c h / 0.25);
transform: translateY(1px);
}
.cf-apply-hero-2 .ah2-btn:focus-visible {
outline: 3px solid var(--ah2-focus);
outline-offset: 3px;
}
.cf-apply-hero-2 .ah2-btn[aria-busy='true'] { cursor: progress; }
.cf-apply-hero-2 .ah2-spin { width: 20px; height: 20px; flex: 0 0 auto; }
.cf-apply-hero-2 .ah2-reassure {
margin: 12px 0 0;
text-align: center;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 600;
color: var(--muted, oklch(0.45 0.03 258));
text-wrap: pretty;
}
.cf-apply-hero-2 .ah2-error {
margin: 12px 0 0;
padding: 10px 12px;
border-radius: 10px;
background: var(--danger-soft, color-mix(in oklch, var(--danger, oklch(0.5 0.17 27)) 14%, var(--card, oklch(1 0 0))));
color: var(--danger, oklch(0.5 0.17 27));
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 600;
text-wrap: pretty;
}
.cf-apply-hero-2 .ah2-error-ico {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: -0.15em;
margin-inline-end: 0.4em;
}
@media (min-width: 700px) {
.cf-apply-hero-2 .ah2-inner.has-image {
grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
grid-template-areas: 'copy copy' 'img card';
column-gap: clamp(24px, 4vw, 48px);
}
.cf-apply-hero-2 .ah2-inner.has-image .ah2-copy { grid-area: copy; }
.cf-apply-hero-2 .ah2-inner.has-image .ah2-card { grid-area: card; }
.cf-apply-hero-2 .ah2-inner.has-image .ah2-img {
grid-area: img;
display: block;
justify-self: start;
width: 100%;
max-width: 340px;
height: auto;
aspect-ratio: 1 / 1;
object-fit: contain;
object-position: left top;
filter: drop-shadow(0 2px 3px oklch(from var(--ah2-shadow) l c h / 0.28)) drop-shadow(0 14px 16px oklch(from var(--ah2-shadow) l c h / 0.22));
}
}
@media (min-width: 1100px) {
.cf-apply-hero-2 .ah2-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.cf-apply-hero-2 .ah2-inner.has-image {
grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
grid-template-areas: 'copy card' 'img card';
grid-template-rows: auto 1fr;
column-gap: clamp(32px, 5vw, 72px);
row-gap: 24px;
}
.cf-apply-hero-2 .ah2-copy { max-width: none; padding-top: 16px; }
.cf-apply-hero-2 .ah2-card { max-width: none; }
}
@media (max-width: 480px) {
.cf-apply-hero-2 .ah2-label { gap: 12px; padding: 13px 12px 13px 14px; }
}
@media (prefers-reduced-motion: no-preference) {
.cf-apply-hero-2 .ah2-rise { animation: ah2-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--d, 0s); }
.cf-apply-hero-2 .ah2-total-text { animation: ah2-pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cf-apply-hero-2 .ah2-spin { animation: ah2-spin 0.8s linear infinite; }
@keyframes ah2-rise { from { opacity: 0.82; transform: translateY(8px); } }
@keyframes ah2-pop { from { opacity: 0.7; transform: scale(0.96); } }
@keyframes ah2-spin { to { transform: rotate(360deg); } }
}
@media (prefers-reduced-motion: reduce) {
.cf-apply-hero-2 .ah2-label,
.cf-apply-hero-2 .ah2-box,
.cf-apply-hero-2 .ah2-box svg,
.cf-apply-hero-2 .ah2-seg::after,
.cf-apply-hero-2 .ah2-btn { transition: none; }
.cf-apply-hero-2 .ah2-btn:hover,
.cf-apply-hero-2 .ah2-btn.is-hover,
.cf-apply-hero-2 .ah2-btn:active,
.cf-apply-hero-2 .ah2-btn.is-active { transform: none; }
}
`
pieces/hero/apply-hero-2/specimen.tsx 42 lines
import __studioImagec7df56e4 from "../assets/0cf2a8482bc1c350.webp";
// Specimen: the fictional Northbound Founder Mastermind application hero, three of four criteria already ticked.
import * as React from 'react'
import ApplyHero2, { type ApplyHero2Criterion, type ApplyHero2State } from '../apply-hero-2'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'error']
const CRITERIA: ApplyHero2Criterion[] = [
{ label: 'Your business brings in $1M+ a year', value: 'revenue' },
{ label: 'You lead a team of 5 or more', value: 'team' },
{ label: 'You can meet in person one day a month', value: 'time' },
{ label: 'You’ll share real numbers with the group', value: 'numbers' },
]
export default function ApplyHero2Specimen({ state = 'default' }: { state?: ApplyHero2State }) {
return (
<ApplyHero2
headlineBefore='Earn your seat with founders '
headlineEmphasis='a stage ahead'
headlineAfter='.'
lead='Northbound Founder Mastermind is application-only. Tick what’s true for you, then send your application.'
nextLead='After you apply,'
nextText='we read every answer and, if it’s a fit, invite you to a 30-minute call with the founder.'
checklistTitle='Tick what’s true for you'
checklistNote='Your ticks go with your application.'
criteria={CRITERIA}
defaultChecked={['revenue', 'team', 'numbers']}
name='fit'
ctaLabel='Send My Application'
reassurance='About 6 minutes · No payment to apply'
productImage={slot(
'product',
__studioImagec7df56e4,
)}
productAlt='Clipboard holding the Northbound fit criteria sheet'
simulate
state={state}
/>
)
}
| Name | Type | Details |
|---|---|---|
headlineBefore OptionalApplyHero2 |
string |
|
headlineEmphasis OptionalApplyHero2 |
string |
|
headlineAfter OptionalApplyHero2 |
string |
|
lead OptionalApplyHero2 |
string |
|
nextLead OptionalApplyHero2 |
string |
|
nextText OptionalApplyHero2 |
string |
|
checklistTitle OptionalApplyHero2 |
string |
|
checklistNote OptionalApplyHero2 |
string |
|
criteria OptionalApplyHero2 |
ApplyHero2Criterion[] |
|
defaultChecked OptionalApplyHero2 |
string[] |
|
name OptionalApplyHero2 |
string |
|
fitThreshold OptionalApplyHero2 |
number |
|
meterCopy OptionalApplyHero2 |
Partial<ApplyHero2MeterCopy> |
|
ctaLabel OptionalApplyHero2 |
string |
|
ctaLoadingLabel OptionalApplyHero2 |
string |
|
ctaRetryLabel OptionalApplyHero2 |
string |
|
reassurance OptionalApplyHero2 |
string |
|
errorMessage OptionalApplyHero2 |
string |
|
href OptionalApplyHero2 |
string |
|
onAction OptionalApplyHero2 |
(fit: ApplyHero2Fit) => void | Promise<unknown> |
|
simulate OptionalApplyHero2 |
boolean |
|
productImage OptionalApplyHero2 |
string |
|
productAlt OptionalApplyHero2 |
string |
|
state OptionalApplyHero2 |
ApplyHero2State |
|
className OptionalApplyHero2 |
string |
|
style OptionalApplyHero2 |
React.CSSProperties |
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-focus--field-ink- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
0cf2a8482bc1c350.webp
image/webp · 28.4 KB