Application Form 2
Fit check before a strategy call: visitors tick who it is and isn’t for, watch a live fit read-out, then apply with four short answers.
Use it in a prompt
Use forms/application-form-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/forms/application-form-2.tsx. - Import it and pass your copy and images (Props tab):
import { ApplicationForm2 } from "@/components/funneldna/forms/application-form-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/forms/application-form-2/component.tsx 727 lines
// layout: split-contrast
// Fit check before a strategy call: visitors tick who it is and isn’t for, watch a live fit read-out, then apply with four short answers.
"use client"
import * as React from "react"
import { AlertCircle, Check, ChevronDown, Info, Loader2, Lock, X } from "lucide-react"
import { FX_HOST, Pattern } from "../fx/fx"
export type ApplicationForm2Answers = {
name: string
email: string
/** The team size option the visitor chose. */
teamSize: string
/** The one thing they want fixed. */
oneThing: string
/** They ticked the commitment line above the button. */
committed: boolean
/** The “for you” lines they ticked. */
fitsYou: string[]
/** The “isn’t for you” lines they ticked. */
notForYou: string[]
fitCount: number
fitTotal: number
}
export type ApplicationForm2Copy = {
/** Read-out template; {fit} and {total} are replaced with the counts. */
readout: string
readoutEmpty: string
readoutStrong: string
readoutGood: string
readoutLow: string
/** Gentle note shown when any “isn’t for you” line is ticked. The button stays usable. */
disqualifierNote: string
formTitle: string
formLead: string
nameLabel: string
namePlaceholder: string
emailLabel: string
emailPlaceholder: string
teamLabel: string
/** First, disabled option of the team size select. */
teamPlaceholder: string
oneThingLabel: string
oneThingPlaceholder: string
/** The commitment line ticked above the button. */
commitLabel: string
nameRequired: string
emailRequired: string
emailInvalid: string
teamRequired: string
oneThingRequired: string
oneThingShort: string
commitRequired: string
}
type Values = { name: string; email: string; teamSize: string; oneThing: string; committed: boolean }
type FieldKey = keyof Values
type Errors = Partial<Record<FieldKey, string>>
export type ApplicationForm2Props = {
title?: string
/** A phrase inside title that gets the marker stroke. */
highlight?: string
lead?: React.ReactNode
forTitle?: string
forHint?: string
/** Lines that describe who the call is for. Three to six. */
forItems?: string[]
notForTitle?: string
notForHint?: string
/** Honest disqualifiers. Two to four. */
notForItems?: string[]
/** Options for the team size select. */
teamSizes?: string[]
/** Illustration of the call (scene slot). */
illustrationImage?: string
illustrationAlt?: string
submitLabel?: string
/** Reassurance line under the button. */
sublabel?: string
sendingLabel?: string
sendErrorText?: string
/** Read-out, form, placeholder and validation copy. */
copy?: Partial<ApplicationForm2Copy>
/** Lines ticked on first render, by index. */
initialChecked?: { forYou?: number[]; notForYou?: number[] }
initialValues?: Partial<Values>
/** Receives the answers once every field is valid. A returned promise shows the sending label; a rejection shows sendErrorText. */
onSubmit?: (answers: ApplicationForm2Answers) => void | Promise<void>
/** Turns the form off, for example while applications are paused. */
disabled?: boolean
state?: "default" | "hover" | "active" | "disabled" | "error"
className?: string
}
export function ApplicationForm2({
title = "Before you book a call, check you’re a fit",
highlight = "you’re a fit",
lead = "Tick every line that’s honestly true. It takes a minute and makes your call worth the time.",
forTitle = "This is for you if",
forHint = "Tick each one that’s true today.",
forItems = DEFAULT_FOR,
notForTitle = "This isn’t for you if",
notForHint = "Be honest. We’d rather tell you now.",
notForItems = DEFAULT_NOT_FOR,
teamSizes = DEFAULT_TEAM_SIZES,
illustrationImage,
illustrationAlt = "",
submitLabel = "Request My Strategy Call",
sublabel = "Takes about 2 minutes · No payment needed",
sendingLabel = "Sending…",
sendErrorText = "We couldn’t send your application. Please try again.",
copy: copyOverrides,
initialChecked,
initialValues,
onSubmit,
disabled = false,
state = "default",
className,
}: ApplicationForm2Props) {
const copy = mergeCopy(copyOverrides)
const uid = React.useId()
const formRef = React.useRef<HTMLFormElement>(null)
const isError = state === "error"
const formDisabled = disabled || state === "disabled"
const [yes, setYes] = React.useState<number[]>(() => initialChecked?.forYou ?? [])
const [no, setNo] = React.useState<number[]>(() => initialChecked?.notForYou ?? [])
const [values, setValues] = React.useState<Values>(() => (isError ? EMPTY : { ...EMPTY, ...initialValues }))
const [touched, setTouched] = React.useState<Partial<Record<FieldKey, boolean>>>(() => (isError ? ALL_TOUCHED : {}))
const [errors, setErrors] = React.useState<Errors>(() => (isError ? validate(EMPTY, copy) : {}))
const [status, setStatus] = React.useState<"idle" | "sending" | "failed">("idle")
React.useEffect(() => {
if (state !== "error") return
setTouched(ALL_TOUCHED)
setErrors(validate(values, copy))
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state])
const total = forItems.length
const fitsYou = forItems.filter((_, i) => yes.includes(i))
const notForYou = notForItems.filter((_, i) => no.includes(i))
const fitCount = fitsYou.length
const ratio = total ? fitCount / total : 0
const message =
fitCount + notForYou.length === 0
? copy.readoutEmpty
: ratio >= 0.8
? copy.readoutStrong
: ratio >= 0.4
? copy.readoutGood
: copy.readoutLow
const liveText = `${fill(copy.readout, fitCount, total)}. ${message}${notForYou.length ? ` ${copy.disqualifierNote}` : ""}`
const sending = status === "sending"
const fieldId = (k: FieldKey) => `${uid}-${k}`
const errorId = (k: FieldKey) => `${uid}-${k}-error`
const invalid = (k: FieldKey) => Boolean(touched[k] && errors[k])
const described = (k: FieldKey) => (invalid(k) ? errorId(k) : undefined)
const update = <K extends FieldKey>(key: K, value: Values[K]) => {
const next: Values = { ...values, [key]: value }
setValues(next)
if (touched[key]) setErrors((prev) => ({ ...prev, [key]: validate(next, copy)[key] }))
if (status === "failed") setStatus("idle")
}
const blur = (key: FieldKey) => {
setTouched((prev) => ({ ...prev, [key]: true }))
setErrors((prev) => ({ ...prev, [key]: validate(values, copy)[key] }))
}
const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault()
if (formDisabled || sending) return
const found = validate(values, copy)
setTouched(ALL_TOUCHED)
setErrors(found)
const first = FIELD_ORDER.find((k) => found[k])
if (first) {
formRef.current?.querySelector<HTMLElement>(`[name="${first}"]`)?.focus()
return
}
if (!onSubmit) return
const answers: ApplicationForm2Answers = {
name: values.name.trim(),
email: values.email.trim(),
teamSize: values.teamSize,
oneThing: values.oneThing.trim(),
committed: values.committed,
fitsYou,
notForYou,
fitCount,
fitTotal: total,
}
try {
const result: unknown = onSubmit(answers)
if (isThenable(result)) {
setStatus("sending")
await result
}
setStatus("idle")
} catch {
setStatus("failed")
}
}
const buttonClass = [
"af2-btn",
state === "hover" ? "is-hover" : "",
state === "active" ? "is-active" : "",
sending ? "is-sending" : "",
]
.filter(Boolean)
.join(" ")
return (
<section
className={["cf-application-form-2", className].filter(Boolean).join(" ")}
style={FX_HOST}
aria-labelledby={`${uid}-title`}
>
<style>{CSS}</style>
<Pattern name="grid" fade="top" />
<div className="af2-wrap">
<header className="af2-head">
<h2 id={`${uid}-title`} className="af2-title">
{withMarker(title, highlight)}
</h2>
{lead ? <p className="af2-lead">{lead}</p> : null}
</header>
<div className="af2-board">
<div className="af2-split">
<div className="af2-half af2-half--yes" role="group" aria-labelledby={`${uid}-yes`}>
<div className="af2-half-head">
<span className="af2-badge af2-badge--yes" aria-hidden="true">
<Check size={20} strokeWidth={3} />
</span>
<div>
<h3 id={`${uid}-yes`} className="af2-h3">
{forTitle}
</h3>
{forHint ? <p className="af2-hint">{forHint}</p> : null}
</div>
</div>
<ul className="af2-list">
{forItems.map((item, i) => {
const on = yes.includes(i)
return (
<li key={`${i}-${item}`}>
<label className={`af2-row${on ? " is-on" : ""}`} style={{ "--i": i } as React.CSSProperties}>
<input
className="af2-input"
type="checkbox"
name="fitsYou"
value={item}
checked={on}
onChange={() => setYes(toggle(i))}
/>
<span className="af2-box" aria-hidden="true">
<Check size={18} strokeWidth={3} />
</span>
<span className="af2-row-text">{item}</span>
</label>
</li>
)
})}
</ul>
</div>
<div className="af2-half af2-half--no" role="group" aria-labelledby={`${uid}-no`}>
<div className="af2-half-head">
<span className="af2-badge af2-badge--no" aria-hidden="true">
<X size={20} strokeWidth={3} />
</span>
<div>
<h3 id={`${uid}-no`} className="af2-h3">
{notForTitle}
</h3>
{notForHint ? <p className="af2-hint">{notForHint}</p> : null}
</div>
</div>
<ul className="af2-list">
{notForItems.map((item, i) => {
const on = no.includes(i)
return (
<li key={`${i}-${item}`}>
<label
className={`af2-row${on ? " is-on" : ""}`}
style={{ "--i": i + 2 } as React.CSSProperties}
>
<input
className="af2-input"
type="checkbox"
name="notForYou"
value={item}
checked={on}
onChange={() => setNo(toggle(i))}
/>
<span className="af2-box" aria-hidden="true">
<Check size={18} strokeWidth={3} />
</span>
<span className="af2-row-text">{item}</span>
</label>
</li>
)
})}
</ul>
</div>
</div>
<div className="af2-strip">
<p className="af2-sr" aria-live="polite" aria-atomic="true">
{liveText}
</p>
<p className="af2-score" aria-hidden="true">
<Score template={copy.readout} fit={fitCount} total={total} />
</p>
<div className="af2-meter" aria-hidden="true">
{forItems.map((item, i) => (
<span key={`${i}-${item}`} className={`af2-seg${i < fitCount ? " is-on" : ""}`} />
))}
</div>
<p className="af2-msg" aria-hidden="true">
{message}
</p>
{notForYou.length ? (
<p className="af2-note" aria-hidden="true">
<Info className="af2-inline-icon af2-note-icon" size={18} strokeWidth={2.5} aria-hidden="true" />
{copy.disqualifierNote}
</p>
) : null}
</div>
</div>
<div className={`af2-form${illustrationImage ? "" : " af2-form--solo"}`}>
<div className="af2-aside">
{illustrationImage ? (
<figure className="af2-figure">
<img src={illustrationImage} alt={illustrationAlt} width={1200} height={900} loading="lazy" decoding="async" />
</figure>
) : null}
<h3 id={`${uid}-form`} className="af2-h3 af2-form-title">
{copy.formTitle}
</h3>
{copy.formLead ? <p className="af2-form-lead">{copy.formLead}</p> : null}
</div>
<form ref={formRef} noValidate onSubmit={handleSubmit} aria-labelledby={`${uid}-form`}>
<fieldset className="af2-fieldset" disabled={formDisabled}>
<div className="af2-fields">
<div className="af2-field">
<label className="af2-label" htmlFor={fieldId("name")}>
{copy.nameLabel}
</label>
<input
id={fieldId("name")}
className="af2-control"
name="name"
type="text"
autoComplete="name"
placeholder={copy.namePlaceholder}
value={values.name}
onChange={(e) => update("name", e.target.value)}
onBlur={() => blur("name")}
aria-invalid={invalid("name") || undefined}
aria-describedby={described("name")}
required
/>
<FieldError id={errorId("name")} message={invalid("name") ? errors.name : undefined} />
</div>
<div className="af2-field">
<label className="af2-label" htmlFor={fieldId("email")}>
{copy.emailLabel}
</label>
<input
id={fieldId("email")}
className="af2-control"
name="email"
type="email"
inputMode="email"
autoComplete="email"
placeholder={copy.emailPlaceholder}
value={values.email}
onChange={(e) => update("email", e.target.value)}
onBlur={() => blur("email")}
aria-invalid={invalid("email") || undefined}
aria-describedby={described("email")}
required
/>
<FieldError id={errorId("email")} message={invalid("email") ? errors.email : undefined} />
</div>
<div className="af2-field af2-field--full">
<label className="af2-label" htmlFor={fieldId("teamSize")}>
{copy.teamLabel}
</label>
<div className="af2-select">
<select
id={fieldId("teamSize")}
className="af2-control"
name="teamSize"
value={values.teamSize}
data-empty={values.teamSize === "" || undefined}
onChange={(e) => update("teamSize", e.target.value)}
onBlur={() => blur("teamSize")}
aria-invalid={invalid("teamSize") || undefined}
aria-describedby={described("teamSize")}
required
>
<option value="" disabled>
{copy.teamPlaceholder}
</option>
{teamSizes.map((size) => (
<option key={size} value={size}>
{size}
</option>
))}
</select>
<ChevronDown className="af2-chev" size={20} strokeWidth={2.5} aria-hidden="true" />
</div>
<FieldError id={errorId("teamSize")} message={invalid("teamSize") ? errors.teamSize : undefined} />
</div>
<div className="af2-field af2-field--full">
<label className="af2-label" htmlFor={fieldId("oneThing")}>
{copy.oneThingLabel}
</label>
<textarea
id={fieldId("oneThing")}
className="af2-control"
name="oneThing"
rows={3}
maxLength={400}
placeholder={copy.oneThingPlaceholder}
value={values.oneThing}
onChange={(e) => update("oneThing", e.target.value)}
onBlur={() => blur("oneThing")}
aria-invalid={invalid("oneThing") || undefined}
aria-describedby={described("oneThing")}
required
/>
<FieldError id={errorId("oneThing")} message={invalid("oneThing") ? errors.oneThing : undefined} />
</div>
</div>
<label
className={`af2-row af2-commit${values.committed ? " is-on" : ""}${invalid("committed") ? " is-invalid" : ""}`}
>
<input
className="af2-input"
type="checkbox"
name="committed"
checked={values.committed}
onChange={(e) => update("committed", e.target.checked)}
onBlur={() => blur("committed")}
aria-invalid={invalid("committed") || undefined}
aria-describedby={described("committed")}
/>
<span className="af2-box" aria-hidden="true">
<Check size={18} strokeWidth={3} />
</span>
<span className="af2-row-text">{copy.commitLabel}</span>
</label>
<FieldError id={errorId("committed")} message={invalid("committed") ? errors.committed : undefined} />
<button type="submit" className={buttonClass} aria-busy={sending || undefined}>
{sending ? (
<>
<Loader2 className="af2-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{sendingLabel}</span>
</>
) : (
<span>{submitLabel}</span>
)}
</button>
{sublabel ? (
<p className="af2-sub">
<Lock className="af2-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{sublabel}
</p>
) : null}
{status === "failed" ? (
<p className="af2-send-error" role="alert">
<AlertCircle className="af2-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{sendErrorText}
</p>
) : null}
</fieldset>
</form>
</div>
</div>
</section>
)
}
const DEFAULT_FOR = [
"You know the one problem you want solved first",
"You’re ready to act on a plan in the next 30 days",
"You want honest feedback, not a pep talk",
"You’ll take ten minutes to prepare before the call",
]
const DEFAULT_NOT_FOR = [
"You want someone else to do the work for you",
"You’re only collecting ideas for someday",
]
const DEFAULT_TEAM_SIZES = ["Just me, leading soon", "2–5 people", "6–10 people", "11–20 people", "More than 20 people"]
const EMPTY: Values = { name: "", email: "", teamSize: "", oneThing: "", committed: false }
const ALL_TOUCHED: Record<FieldKey, boolean> = { name: true, email: true, teamSize: true, oneThing: true, committed: true }
const FIELD_ORDER: FieldKey[] = ["name", "email", "teamSize", "oneThing", "committed"]
const COPY: ApplicationForm2Copy = {
readout: "{fit} of {total} fit you",
readoutEmpty: "Tick every line that’s true. Your fit updates as you go.",
readoutStrong: "Strong fit. Your call can go straight to your one thing.",
readoutGood: "A good fit. Raise the lines you left blank on the call.",
readoutLow: "Fewer lines fit right now. You can still apply and ask.",
disqualifierNote:
"Thanks for the honest tick. You can still apply, and we’ll tell you plainly on the call if another route suits you better.",
formTitle: "Tell us the one thing to fix",
formLead: "Four quick answers. They shape your call, so it starts with your situation, not a pitch.",
nameLabel: "Full name",
namePlaceholder: "Jane Smith",
emailLabel: "Work email",
emailPlaceholder: "you@company.com",
teamLabel: "Team size",
teamPlaceholder: "Choose your team size…",
oneThingLabel: "The one thing you want fixed",
oneThingPlaceholder: "What’s the one thing you want to fix first?",
commitLabel: "I’ll come to the call ready to talk honestly about my situation.",
nameRequired: "Please enter your name.",
emailRequired: "Please enter your email.",
emailInvalid: "Please check your email, like you@company.com.",
teamRequired: "Please choose your team size.",
oneThingRequired: "Tell us the one thing you want fixed.",
oneThingShort: "Add a few more words so we can prepare.",
commitRequired: "Tick this so we know you’ll come prepared.",
}
function mergeCopy(overrides?: Partial<ApplicationForm2Copy>): ApplicationForm2Copy {
const out = { ...COPY }
if (overrides) {
for (const key of Object.keys(overrides) as (keyof ApplicationForm2Copy)[]) {
const value = overrides[key]
if (value !== undefined) out[key] = value
}
}
return out
}
function toggle(i: number) {
return (prev: number[]) => (prev.includes(i) ? prev.filter((x) => x !== i) : [...prev, i])
}
function fill(template: string, fit: number, total: number) {
return template.split("{fit}").join(String(fit)).split("{total}").join(String(total))
}
function Score({ template, fit, total }: { template: string; fit: number; total: number }) {
const text = template.split("{total}").join(String(total))
if (!text.includes("{fit}")) return <span className="af2-of">{text}</span>
const [before, ...rest] = text.split("{fit}")
const after = rest.join(String(fit))
return (
<>
{before ? <span className="af2-of">{before}</span> : null}
<span key={fit} className="af2-num">
{fit}
</span>
{after ? <span className="af2-of">{after}</span> : null}
</>
)
}
function withMarker(title: string, highlight?: string): React.ReactNode {
const at = highlight ? title.indexOf(highlight) : -1
if (!highlight || at < 0) return title
return (
<>
{title.slice(0, at)}
<span className="af2-mark">{highlight}</span>
{title.slice(at + highlight.length)}
</>
)
}
function looksLikeEmail(value: string) {
const at = value.indexOf("@")
const dot = value.lastIndexOf(".")
return at > 0 && dot > at + 1 && dot < value.length - 2 && !value.includes(" ")
}
function validate(v: Values, c: ApplicationForm2Copy): Errors {
const e: Errors = {}
if (!v.name.trim()) e.name = c.nameRequired
const email = v.email.trim()
if (!email) e.email = c.emailRequired
else if (!looksLikeEmail(email)) e.email = c.emailInvalid
if (!v.teamSize) e.teamSize = c.teamRequired
const one = v.oneThing.trim()
if (!one) e.oneThing = c.oneThingRequired
else if (one.length < 8) e.oneThing = c.oneThingShort
if (!v.committed) e.committed = c.commitRequired
return e
}
function isThenable(value: unknown): value is PromiseLike<unknown> {
return typeof value === "object" && value !== null && typeof (value as { then?: unknown }).then === "function"
}
function FieldError({ id, message }: { id: string; message?: string }) {
if (!message) return null
return (
<p id={id} className="af2-error">
<AlertCircle className="af2-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{message}
</p>
)
}
const R = ".cf-application-form-2"
const CSS = `
${R}{--af2-shadow:var(--shadow, oklch(0.22 0.03 260));--af2-line:oklch(from var(--ink) l c h / 0.14);--af2-well:color-mix(in oklch, var(--ink) 4%, var(--card));--af2-band-soft:color-mix(in oklch, var(--band-ink) 82%, var(--band));--af2-marker:var(--marker, #fae37c);--af2-glyph:var(--status-glyph, #fff);position:relative;overflow:hidden;background:var(--surface);color:var(--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} .af2-wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto}
${R} .af2-head{max-width:52rem;margin:0 auto clamp(32px,4vw,48px);text-align:center}
${R} .af2-title{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(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--ink);text-wrap:balance}
${R} .af2-mark{background-image:linear-gradient(to bottom,transparent 52%,color-mix(in oklch,var(--af2-marker) 50%,var(--surface)) 52%,color-mix(in oklch,var(--af2-marker) 50%,var(--surface)) 93%,transparent 93%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 0.14em;margin:0 -0.06em;border-radius:0.2em 0.45em 0.25em 0.5em}
${R} .af2-lead{margin:16px auto 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
${R} .af2-board{background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));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)));overflow:hidden}
${R} .af2-split{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr)}
${R} .af2-half{padding:clamp(24px,3.4vw,40px)}
${R} .af2-half--no{background:var(--band);color:var(--band-ink)}
${R} .af2-half-head{display:flex;align-items:flex-start;gap:14px;margin-bottom:20px}
${R} .af2-badge{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;color:var(--af2-glyph)}
${R} .af2-badge--yes{background:var(--success)}
${R} .af2-badge--no{background:var(--danger)}
${R} .af2-h3{margin:0;padding-top:5px;font-family:var(--font-display);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;text-wrap:balance}
${R} .af2-hint{margin:8px 0 0;font-size:0.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
${R} .af2-half--no .af2-hint{color:var(--af2-band-soft)}
${R} .af2-list{list-style:none;margin:0;padding:0;display:grid;gap:6px}
${R} .af2-row{position:relative;display:flex;align-items:flex-start;gap:14px;padding:13px 14px;border-radius:10px;cursor:pointer;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.4;font-weight:500;text-wrap:pretty;transition:background-color .16s ease;animation:af2-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
${R} .af2-row-text{min-width:0}
${R} .af2-input{position:absolute;top:13px;left:14px;width:26px;height:26px;margin:0;opacity:0;cursor:pointer}
${R} .af2-box{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:7px;border:2px solid color-mix(in oklch,var(--ink) 40%,var(--card));background:var(--field,var(--card));color:transparent;transition:background-color .16s ease,border-color .16s ease,transform .16s ease}
${R} .af2-row.is-on{background:var(--success-soft)}
${R} .af2-row.is-on .af2-box{background:var(--success);border-color:var(--success);color:var(--af2-glyph)}
${R} .af2-row:active .af2-box{transform:scale(.92)}
${R} .af2-input:focus-visible + .af2-box{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .55);outline-offset:2px}
${R} .af2-input:disabled,${R} .af2-fieldset:disabled .af2-row{cursor:not-allowed}
@media (hover:hover){${R} .af2-row:hover{background:var(--af2-well)}${R} .af2-row.is-on:hover{background:var(--success-soft)}${R} .af2-row:hover .af2-box{border-color:color-mix(in oklch,var(--ink) 65%,var(--card))}${R} .af2-row.is-on:hover .af2-box{border-color:var(--success)}}
${R} .af2-half--no .af2-box{background:transparent;border-color:oklch(from var(--band-ink) l c h / .6)}
${R} .af2-half--no .af2-row.is-on{background:oklch(from var(--band-ink) l c h / .12)}
${R} .af2-half--no .af2-row.is-on .af2-box{background:var(--band-ink);border-color:var(--band-ink);color:var(--band)}
${R} .af2-half--no .af2-input:focus-visible + .af2-box{outline-color:oklch(from var(--band-ink) l c h / .75)}
@media (hover:hover){${R} .af2-half--no .af2-row:hover{background:oklch(from var(--band-ink) l c h / .08)}${R} .af2-half--no .af2-row.is-on:hover{background:oklch(from var(--band-ink) l c h / .15)}${R} .af2-half--no .af2-row:hover .af2-box{border-color:var(--band-ink)}}
${R} .af2-strip{position:relative;display:grid;grid-template-columns:auto minmax(140px,220px) minmax(0,1fr);align-items:center;gap:12px 28px;padding:20px clamp(24px,3.4vw,40px) 22px;background:var(--af2-well);color:var(--ink)}
${R} .af2-score{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);color:var(--ink);white-space:nowrap;line-height:1}
${R} .af2-num{display:inline-block;font-size:clamp(2.5rem,4.2vw,3.75rem);letter-spacing:-0.03em;font-variant-numeric:tabular-nums;transform-origin:50% 80%;animation:af2-pop .3s cubic-bezier(.2,.7,.2,1) both}
${R} .af2-of{font-size:clamp(1.3125rem,1.8vw,1.625rem)}
${R} .af2-meter{display:flex;gap:6px;min-width:0}
${R} .af2-seg{flex:1;height:10px;border-radius:999px;background:color-mix(in oklch,var(--ink) 14%,var(--card));transition:background-color .2s ease}
${R} .af2-seg.is-on{background:var(--success)}
${R} .af2-msg{margin:0;font-size:0.9375rem;line-height:1.4;font-weight:600;color:var(--ink);text-wrap:pretty}
${R} .af2-note{grid-column:1 / -1;margin:0;padding:12px 16px;border-radius:10px;background:var(--warning-soft);color:var(--ink);font-size:0.9375rem;line-height:1.45;font-weight:500;text-wrap:pretty;animation:af2-rise .45s cubic-bezier(.2,.7,.2,1) both}
${R} .af2-note-icon{color:var(--warning)}
${R} .af2-form{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:clamp(24px,4vw,48px);align-items:start;margin-top:clamp(32px,4vw,48px);padding:clamp(20px,3vw,32px);background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)))}
${R} .af2-form--solo{grid-template-columns:minmax(0,1fr);max-width:46rem;margin-left:auto;margin-right:auto}
${R} .af2-aside{position:sticky;top:24px}
${R} .af2-figure{margin:0 0 20px}
${R} .af2-figure img{display:block;width:100%;height:auto;aspect-ratio:4 / 3;object-fit:cover;object-position:center;border-radius:12px}
${R} .af2-form-title{padding-top:0;color:var(--ink)}
${R} .af2-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} .af2-fieldset{margin:0;padding:0;border:0;min-width:0}
${R} .af2-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 16px}
${R} .af2-field{min-width:0}
${R} .af2-field--full{grid-column:1 / -1}
${R} .af2-label{display:block;margin-bottom:8px;font-size:1.0625rem;line-height:1.3;font-weight:700;color:var(--label-ink,var(--ink))}
${R} .af2-control{display:block;width:100%;min-height:56px;padding:0 16px;margin:0;font-family:var(--font-body);font-size:1.0625rem;line-height:1.3;color:var(--field-ink);background:var(--field);border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));transition:border-color .16s ease,box-shadow .16s ease}
${R} textarea.af2-control{min-height:112px;padding:14px 16px;line-height:1.45;resize:vertical}
${R} .af2-control::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
@media (hover:hover){${R} .af2-control:hover:not(:disabled):not(:focus){border-color:color-mix(in oklch,var(--field-ink) 45%,var(--field))}}
${R} .af2-control:focus{outline:none;border-color:var(--field-focus,var(--accent));box-shadow:0 0 0 3px oklch(from var(--field-focus,var(--accent)) l c h / .35)}
${R} .af2-control[aria-invalid=true]{border-color:var(--danger)}
${R} .af2-control[aria-invalid=true]:focus{border-color:var(--danger);box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
${R} .af2-control:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--field-ink) 5%,var(--field))}
${R} .af2-select{position:relative}
${R} .af2-select select{appearance:none;-webkit-appearance:none;padding-right:48px;cursor:pointer}
${R} .af2-select select[data-empty]{color:color-mix(in oklch,var(--field-ink) 65%,var(--field))}
${R} .af2-select option{color:var(--field-ink);background:var(--field)}
${R} .af2-chev{position:absolute;right:16px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--field-ink)}
${R} .af2-commit{margin-top:20px;background:var(--af2-well);animation:none}
${R} .af2-commit.is-invalid .af2-box{border-color:var(--danger)}
@media (hover:hover){${R} .af2-commit:hover{background:color-mix(in oklch,var(--ink) 7%,var(--card))}}
${R} .af2-error{margin:8px 0 0;font-size:0.9375rem;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
${R} .af2-inline-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
${R} .af2-btn{--af2-bg:var(--button-bg,var(--cta));--af2-bg-2:var(--button-bg-2,var(--cta-2));appearance:none;border:0;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:64px;margin-top:20px;padding:10px 28px;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;letter-spacing:-0.005em;text-align:center;text-wrap:balance;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--af2-bg) calc(l + 0.04) c h),oklch(from var(--af2-bg-2) calc(l - 0.02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--af2-bg) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--af2-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--af2-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--af2-shadow) l c h / 0.45));transition:background .16s ease,box-shadow .16s ease,transform .16s ease}
@media (hover:hover){${R} .af2-btn:hover:not(:disabled){background:linear-gradient(oklch(from var(--af2-bg) calc(l - 0.01) c h),oklch(from var(--af2-bg-2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--af2-bg) calc(l + 0.1) c h / 0.6),inset 0 -3px 0 oklch(from var(--af2-bg) calc(l - 0.2) c h),0 1px 2px oklch(from var(--af2-shadow) l c h / 0.32),0 10px 20px -6px oklch(from var(--af2-shadow) l c h / 0.55)}}
${R} .af2-btn.is-hover{background:linear-gradient(oklch(from var(--af2-bg) calc(l - 0.01) c h),oklch(from var(--af2-bg-2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--af2-bg) calc(l + 0.1) c h / 0.6),inset 0 -3px 0 oklch(from var(--af2-bg) calc(l - 0.2) c h),0 1px 2px oklch(from var(--af2-shadow) l c h / 0.32),0 10px 20px -6px oklch(from var(--af2-shadow) l c h / 0.55)}
${R} .af2-btn:active:not(:disabled),${R} .af2-btn.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--af2-bg) calc(l - 0.06) c h),oklch(from var(--af2-bg-2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--af2-bg) calc(l - 0.24) c h / 0.5),inset 0 -2px 0 oklch(from var(--af2-bg) calc(l - 0.18) c h),0 1px 2px oklch(from var(--af2-shadow) l c h / 0.3)}
${R} .af2-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .6);outline-offset:3px}
${R} .af2-btn.is-sending{cursor:progress}
${R} .af2-btn:disabled{cursor:not-allowed;transform:none;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm))}
${R} .af2-sub{margin:12px 0 0;text-align:center;font-size:0.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
${R} .af2-send-error{margin:12px 0 0;text-align:center;font-size:0.9375rem;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
${R} .af2-spin{animation:af2-spin .8s linear infinite}
${R} .af2-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
@keyframes af2-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes af2-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@keyframes af2-spin{to{transform:rotate(360deg)}}
@media (max-width:860px){${R} .af2-form{grid-template-columns:minmax(0,1fr)}${R} .af2-aside{position:static}${R} .af2-figure img{aspect-ratio:16 / 10}}
@media (max-width:760px){${R} .af2-split{grid-template-columns:minmax(0,1fr)}${R} .af2-strip{grid-template-columns:auto minmax(0,1fr);gap:12px 20px}${R} .af2-msg{grid-column:1 / -1}}
@media (max-width:560px){${R} .af2-fields{grid-template-columns:minmax(0,1fr)}${R} .af2-btn{padding:10px 18px}${R} .af2-row{padding:12px}${R} .af2-input{top:12px;left:12px}}
@media (prefers-reduced-motion:reduce){${R} .af2-row,${R} .af2-num,${R} .af2-note,${R} .af2-spin{animation:none}${R} .af2-row,${R} .af2-box,${R} .af2-seg,${R} .af2-control,${R} .af2-btn{transition:none}${R} .af2-row:active .af2-box,${R} .af2-btn:active:not(:disabled),${R} .af2-btn.is-active{transform:none}}
`
export default ApplicationForm2
pieces/forms/application-form-2/specimen.tsx 47 lines
import __studioImage4bb645c5 from "../assets/50a98a0b0d6dd442.webp";
import { ApplicationForm2 } from "../application-form-2"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled", "error"] as const
type SpecimenState = (typeof states)[number]
export default function ApplicationForm2Specimen({ state = "default" }: { state?: SpecimenState }) {
return (
<ApplicationForm2
state={state}
title="This call isn’t for every new manager. Is it for you?"
highlight="Is it for you?"
lead="Tick every line that’s honestly true. Then tell us the one thing you want fixed, so your Meridian call starts with your team, not a pitch."
forItems={[
"You stepped up to lead a team in the last 18 months",
"You still do your old job and manage on the side",
"Your one-on-ones feel like status updates, not coaching",
"You want a weekly rhythm your team can count on",
"You’ll practise for two hours a week between sessions",
]}
notForItems={[
"You want a certificate more than a changed team",
"You’d like someone to fix your team for you",
"You can’t make time for the work between calls",
]}
teamSizes={["Just me, leading from next month", "2–5 direct reports", "6–10 direct reports", "11–20 direct reports", "More than 20"]}
initialChecked={state === "error" ? { forYou: [0, 1], notForYou: [2] } : { forYou: [0, 1, 2, 4] }}
illustrationImage={slot(
"scene",
__studioImage4bb645c5
)}
illustrationAlt="Illustration of a new manager on a one-on-one video call with a leadership coach"
submitLabel="Request My Strategy Call"
sublabel={`Takes about 2 minutes. ${defaults.sample.registration.privacy}`}
copy={{
formTitle: "Apply for your Meridian strategy call",
formLead: "Four quick answers. Your coach reads them first, so the call goes straight to your team.",
oneThingPlaceholder: "My one-on-ones keep turning into status updates",
commitLabel: "I’ll come to the call ready to talk honestly about my team.",
oneThingShort: "Add a few more words so your coach can prepare.",
}}
/>
)
}
| Name | Type | Details |
|---|---|---|
title OptionalApplicationForm2 |
string |
Default "Before you book a call, check you’re a fit"
|
highlight OptionalApplicationForm2 |
string |
Default "you’re a fit"
|
lead OptionalApplicationForm2 |
React.ReactNode |
Default "Tick every line that’s honestly true. It takes a minute and makes your call worth the time."
|
forTitle OptionalApplicationForm2 |
string |
Default "This is for you if"
|
forHint OptionalApplicationForm2 |
string |
Default "Tick each one that’s true today."
|
forItems OptionalApplicationForm2 |
string[] |
Default DEFAULT_FOR
|
notForTitle OptionalApplicationForm2 |
string |
Default "This isn’t for you if"
|
notForHint OptionalApplicationForm2 |
string |
Default "Be honest. We’d rather tell you now."
|
notForItems OptionalApplicationForm2 |
string[] |
Default DEFAULT_NOT_FOR
|
teamSizes OptionalApplicationForm2 |
string[] |
Default DEFAULT_TEAM_SIZES
|
illustrationImage OptionalApplicationForm2 |
string |
|
illustrationAlt OptionalApplicationForm2 |
string |
Default ""
|
submitLabel OptionalApplicationForm2 |
string |
Default "Request My Strategy Call"
|
sublabel OptionalApplicationForm2 |
string |
Default "Takes about 2 minutes · No payment needed"
|
sendingLabel OptionalApplicationForm2 |
string |
Default "Sending…"
|
sendErrorText OptionalApplicationForm2 |
string |
Default "We couldn’t send your application. Please try again."
|
copy OptionalApplicationForm2 |
Partial<ApplicationForm2Copy> |
|
initialChecked OptionalApplicationForm2 |
{ forYou?: number[]; notForYou?: number[] } |
|
initialValues OptionalApplicationForm2 |
Partial<Values> |
|
onSubmit OptionalApplicationForm2 |
(answers: ApplicationForm2Answers) => void | Promise<void> |
|
disabled OptionalApplicationForm2 |
boolean |
Default false
|
state OptionalApplicationForm2 |
"default" | "hover" | "active" | "disabled" | "error" |
Default "default"
|
className OptionalApplicationForm2 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--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-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.
-
50a98a0b0d6dd442.webp
image/webp · 60.7 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB