Apply Hero 4
Application hero that asks the first question right in the hero: picking a budget range unlocks the start button and hands that answer to the application.
Use it in a prompt
Use hero/apply-hero-4 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/hero/apply-hero-4.tsx. - Import it and pass your copy and images (Props tab):
import { ApplyHero4 } from "@/components/funneldna/hero/apply-hero-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/apply-hero-4/component.tsx 492 lines
// layout: clipboard-checklist
// Application hero that asks the first question right in the hero: picking a budget range unlocks the start button and hands that answer to the application.
import * as React from "react"
import { AlertCircle, Check, Loader2, Quote, ShieldCheck } from "lucide-react"
import { FX_HOST, Glow, Texture } from "../fx/fx"
import concrete from "../fx/textures/concrete"
/** States the piece implements: "hover" and "active" force the ready button's look, "error" shows the field error. */
export type ApplyHero4State = "default" | "hover" | "active" | "disabled" | "error"
export type ApplyHero4Option = {
/** Value sent with the answer. */
value: string
/** The range shown on the chip, e.g. "$25k–$50k". */
label: string
/** One short line under the range. */
detail?: string
}
export type ApplyHero4Step = {
/** One line of how the consultation works. */
text: string
}
/** What onAction receives: the first answer of the application. */
export type ApplyHero4Answer = {
name: string
question: string
value: string
label: string
}
export type ApplyHero4Props = {
/** Headline text before the marker-highlighted phrase (keep the trailing space). */
headlineBefore?: string
/** Phrase drawn with the marker stroke. */
headlineEmphasis?: string
headlineAfter?: string
subheadline?: React.ReactNode
/** Short italic aside in the owner's voice under the subheadline. Hidden when empty. */
aside?: React.ReactNode
/** Progress line above the question, e.g. "Question 1 of 5". */
stepLabel?: string
/** Number of questions in the application; draws the progress track when set. */
stepTotal?: number
/** The application's first question. */
question?: string
/** Field name sent with the answer. */
name?: string
/** Answer choices shown as large chips. */
options?: ApplyHero4Option[]
/** Pre-selected option value. */
defaultValue?: string
/** Inline error when the visitor tries to start without choosing. */
fieldError?: string
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
/** Note under the button when applications are closed. */
disabledMessage?: string
/** Alert under the button when onAction failed. */
errorMessage?: string
/** Heading of the how-it-works tile. */
howTitle?: string
/** Three short lines on how the consultation works. */
howSteps?: ApplyHero4Step[]
/** Proof tile quote. The tile is hidden when this is empty. */
proofQuote?: React.ReactNode
proofName?: string
/** Short line under the name, e.g. the project. */
proofDetail?: string
/** Photo tile of the finished result (slot: scene). Hidden when empty. */
sceneImage?: string
sceneAlt?: string
/** Where the application continues; the answer travels as a query parameter. Used only without onAction and simulate. */
href?: string
/** Called with the chosen answer when the visitor starts. A returned promise shows the loading label; a rejection shows errorMessage. */
onAction?: (answer: ApplyHero4Answer) => void | Promise<unknown>
/** Preview mode: the form never navigates. */
simulate?: boolean
/** Applications closed: chips and button are disabled. */
disabled?: boolean
state?: ApplyHero4State
className?: string
style?: React.CSSProperties
}
type Phase = "idle" | "loading" | "error"
export function ApplyHero4({
headlineBefore = "Your project starts with ",
headlineEmphasis = "one honest answer",
headlineAfter = ".",
subheadline = "Answer the first question below and we'll plan your consultation around the project you actually want to build.",
aside = "",
stepLabel = "Question 1",
stepTotal,
question = "What's your project budget?",
name = "budget",
options = DEFAULT_OPTIONS,
defaultValue,
fieldError = "Choose a budget range to start your application.",
ctaLabel = "Yes! Start My Application",
ctaLoadingLabel = "Starting your application",
ctaRetryLabel = "Try Again",
reassurance = "No obligation · Stop anytime",
disabledMessage = "Applications aren't open right now.",
errorMessage = "We couldn't start your application. Please try again.",
howTitle = "From your first answer to a clear plan",
howSteps = DEFAULT_STEPS,
proofQuote,
proofName = "",
proofDetail = "",
sceneImage,
sceneAlt = "",
href,
onAction,
simulate = false,
disabled = false,
state = "default",
className,
style,
}: ApplyHero4Props) {
const uid = React.useId()
const headingId = `${uid}-h`
const questionId = `${uid}-q`
const fieldErrId = `${uid}-fe`
const noteId = `${uid}-note`
const msgId = `${uid}-msg`
const chipsRef = React.useRef<HTMLDivElement>(null)
const mounted = React.useRef(true)
const [value, setValue] = React.useState<string>(defaultValue ?? "")
const [showError, setShowError] = React.useState(state === "error")
const [phase, setPhase] = React.useState<Phase>("idle")
React.useEffect(() => {
setValue(defaultValue ?? "")
}, [defaultValue])
React.useEffect(() => {
setShowError(state === "error")
setPhase("idle")
}, [state])
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
const isDisabled = disabled || state === "disabled"
const selected = options.find((option) => option.value === value)
const busy = phase === "loading"
const fieldInvalid = showError && !selected && !isDisabled
const hasPhoto = Boolean(sceneImage)
const hasProof = Boolean(proofQuote)
const forced = !isDisabled ? (state === "hover" ? " is-hover" : state === "active" ? " is-active" : "") : ""
const label = busy ? ctaLoadingLabel : phase === "error" ? ctaRetryLabel : ctaLabel
const message = isDisabled ? disabledMessage : phase === "error" ? errorMessage : ""
const native = Boolean(href) && !onAction && !simulate && !isDisabled
const fill = stepTotal && stepTotal > 0 ? (selected ? Math.min(100, 100 / stepTotal) : 0) : null
const describedBy = [reassurance ? noteId : "", message ? msgId : ""].filter(Boolean).join(" ") || undefined
function choose(next: string) {
setValue(next)
setShowError(false)
if (phase === "error") setPhase("idle")
}
function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
if (isDisabled || busy) {
event.preventDefault()
return
}
if (!selected) {
event.preventDefault()
setShowError(true)
chipsRef.current?.querySelector<HTMLInputElement>("input:not(:disabled)")?.focus()
return
}
if (onAction) {
event.preventDefault()
const answer: ApplyHero4Answer = { name, question, value: selected.value, label: selected.label }
let result: unknown
try {
result = onAction(answer)
} 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 (!native) event.preventDefault()
}
return (
<section
className={["cf-apply-hero-4", hasPhoto ? "has-photo" : "", hasProof ? "has-proof" : "", className].filter(Boolean).join(" ")}
style={{ ...FX_HOST, ...style }}
aria-labelledby={headingId}
>
<style>{CSS}</style>
<Texture src={concrete} tone="band-ink" />
<Glow />
<div className="ah4-inner">
<div className="ah4-grid">
<div className="ah4-tile ah4-q ah4-rise">
<div className="ah4-head">
<h1 id={headingId} className="ah4-h1">
{headlineBefore}
{headlineEmphasis ? <span className="ah4-mark">{headlineEmphasis}</span> : null}
{headlineAfter}
</h1>
{subheadline ? <p className="ah4-lead">{subheadline}</p> : null}
{aside ? <p className="ah4-aside">{aside}</p> : null}
</div>
<form className="ah4-form" onSubmit={handleSubmit} action={native ? href : undefined} method="get" noValidate>
<div className="ah4-sheet">
{stepLabel ? (
<div className="ah4-progress">
<span>{stepLabel}</span>
{fill !== null ? (
<span className="ah4-track" aria-hidden="true">
<span className="ah4-fill" style={{ width: `${fill}%` }} />
</span>
) : null}
</div>
) : null}
<fieldset className="ah4-fieldset" aria-describedby={fieldInvalid ? fieldErrId : undefined}>
<legend className="ah4-legend">
<h2 id={questionId} className="ah4-question">
{question}
</h2>
</legend>
<div className={"ah4-chips" + (fieldInvalid ? " is-invalid" : "")} ref={chipsRef}>
{options.map((option, i) => {
const id = `${uid}-o${i}`
return (
<label key={option.value} className="ah4-chip" htmlFor={id}>
<input
id={id}
type="radio"
name={name}
value={option.value}
checked={value === option.value}
onChange={() => choose(option.value)}
disabled={isDisabled}
aria-invalid={fieldInvalid || undefined}
aria-describedby={fieldInvalid ? fieldErrId : undefined}
/>
<span className="ah4-face">
<span className="ah4-chip-label">{option.label}</span>
{option.detail ? <span className="ah4-chip-detail">{option.detail}</span> : null}
<span className="ah4-dot" aria-hidden="true">
<Check strokeWidth={3} />
</span>
</span>
</label>
)
})}
</div>
{fieldInvalid ? (
<p id={fieldErrId} className="ah4-field-error" role="alert">
<AlertCircle aria-hidden="true" strokeWidth={2.5} />
{fieldError}
</p>
) : null}
</fieldset>
</div>
<div className="ah4-action">
<button
type="submit"
className={"ah4-btn" + forced}
disabled={isDisabled}
aria-busy={busy || undefined}
aria-describedby={describedBy}
>
{busy ? <Loader2 className="ah4-spin" aria-hidden="true" strokeWidth={2.5} /> : null}
<span className="ah4-btn-label">{label}</span>
</button>
{reassurance ? (
<p id={noteId} className="ah4-note">
<ShieldCheck aria-hidden="true" strokeWidth={2.5} />
{reassurance}
</p>
) : null}
{message ? (
<p id={msgId} className={"ah4-msg" + (isDisabled ? "" : " is-error")} role={isDisabled ? "status" : "alert"}>
{isDisabled ? null : <AlertCircle aria-hidden="true" strokeWidth={2.5} />}
{message}
</p>
) : null}
</div>
</form>
</div>
{hasPhoto ? (
<div className="ah4-tile ah4-photo ah4-rise ah4-d2">
<img src={sceneImage} alt={sceneAlt} width={960} height={720} decoding="async" />
</div>
) : null}
{howSteps.length ? (
<div className="ah4-tile ah4-how ah4-rise ah4-d3">
{howTitle ? <h2 className="ah4-how-title">{howTitle}</h2> : null}
<ol className="ah4-steps">
{howSteps.map((step, i) => (
<li key={i}>
<span className="ah4-num" aria-hidden="true">
{i + 1}
</span>
<span className="ah4-step-text">{step.text}</span>
</li>
))}
</ol>
</div>
) : null}
{hasProof ? (
<figure className="ah4-tile ah4-proof ah4-rise ah4-d4">
<Quote aria-hidden="true" strokeWidth={2.5} />
<blockquote className="ah4-quote">{proofQuote}</blockquote>
{proofName || proofDetail ? (
<figcaption className="ah4-cite">
{proofName ? <strong>{proofName}</strong> : null}
{proofDetail ? <span>{proofDetail}</span> : null}
</figcaption>
) : null}
</figure>
) : null}
</div>
</div>
</section>
)
}
export default ApplyHero4
const DEFAULT_OPTIONS: ApplyHero4Option[] = [
{ value: "under-25k", label: "Under $25k" },
{ value: "25k-50k", label: "$25k–$50k" },
{ value: "50k-100k", label: "$50k–$100k" },
{ value: "100k-plus", label: "$100k+" },
]
const DEFAULT_STEPS: ApplyHero4Step[] = [
{ text: "Answer a few short questions about your project." },
{ text: "We review your answers and reach out." },
{ text: "You get a clear plan for your next step." },
]
const CSS = `
.cf-apply-hero-4{--ah4-sh:var(--shadow,oklch(0.22 0.03 260));--ah4-marker:var(--marker,#fae37c);position:relative;isolation:isolate;overflow:hidden;background:var(--band);color:var(--band-ink);font-family:var(--font-body);padding:clamp(48px,7vw,96px) clamp(16px,5vw,48px) clamp(56px,7.5vw,104px)}
.cf-apply-hero-4 *,.cf-apply-hero-4 *::before,.cf-apply-hero-4 *::after{box-sizing:border-box}
.cf-apply-hero-4 .ah4-inner{position:relative;z-index:1;width:100%;max-width:1120px;margin:0 auto}
.cf-apply-hero-4 .ah4-grid{display:grid;gap:16px;grid-template-columns:minmax(0,7fr) minmax(0,5fr);grid-template-areas:"q how"}
.cf-apply-hero-4.has-photo .ah4-grid{grid-template-areas:"q photo" "q how";grid-template-rows:minmax(240px,1fr) auto}
.cf-apply-hero-4.has-proof .ah4-grid{grid-template-areas:"q how" "q proof";grid-template-rows:auto 1fr}
.cf-apply-hero-4.has-photo.has-proof .ah4-grid{grid-template-areas:"q photo" "q how" "q proof";grid-template-rows:minmax(220px,1fr) auto auto}
.cf-apply-hero-4 .ah4-tile{min-width:0;border-radius:var(--card-radius,var(--radius,14px))}
.cf-apply-hero-4 .ah4-q{grid-area:q;display:flex;flex-direction:column;justify-content:space-between;background:var(--card);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent) 26%,var(--card));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--ah4-sh) l c h / .22),0 12px 24px -8px oklch(from var(--ah4-sh) l c h / .32))),inset 0 1px 0 oklch(from var(--card) calc(l + .04) c h / .6);padding:clamp(20px,3.4vw,40px)}
.cf-apply-hero-4 .ah4-h1{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2.5rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink)}
.cf-apply-hero-4 .ah4-mark{background-image:linear-gradient(transparent 50%,color-mix(in oklch,var(--ah4-marker) 82%,transparent) 50%,color-mix(in oklch,var(--ah4-marker) 82%,transparent) 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .06em;border-radius:.12em}
.cf-apply-hero-4 .ah4-lead{margin:16px 0 0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-apply-hero-4 .ah4-aside{margin:12px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-style:italic;font-weight:500;color:var(--ink);text-wrap:pretty}
.cf-apply-hero-4 .ah4-form{margin:28px 0 0}
.cf-apply-hero-4 .ah4-sheet{border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card));padding:20px 24px 24px}
.cf-apply-hero-4 .ah4-progress{display:flex;align-items:center;gap:12px;margin:0 0 12px;font-size:.875rem;line-height:1.2;font-weight:800;color:var(--muted);font-variant-numeric:tabular-nums}
.cf-apply-hero-4 .ah4-progress>span:first-child{flex:none;white-space:nowrap}
.cf-apply-hero-4 .ah4-track{flex:0 1 160px;min-width:48px;height:6px;border-radius:999px;background:oklch(from var(--ink) l c h / .12);overflow:hidden}
.cf-apply-hero-4 .ah4-fill{display:block;height:100%;min-width:6px;border-radius:inherit;background:var(--accent-fill,var(--accent));transition:width .45s cubic-bezier(.2,.7,.2,1)}
.cf-apply-hero-4 .ah4-fieldset{margin:0;padding:0;border:0;min-width:0}
.cf-apply-hero-4 .ah4-legend{display:block;width:100%;margin:0 0 16px;padding:0}
.cf-apply-hero-4 .ah4-question{margin:0;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:-.01em;color:var(--ink);text-wrap:balance}
.cf-apply-hero-4 .ah4-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cf-apply-hero-4 .ah4-chip{position:relative;display:block;cursor:pointer;-webkit-tap-highlight-color:transparent}
.cf-apply-hero-4 .ah4-chip:has(input:disabled){cursor:not-allowed}
.cf-apply-hero-4 .ah4-chip input{position:absolute;top:0;left:0;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.cf-apply-hero-4 .ah4-face{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:4px;align-content:start;height:100%;min-height:84px;padding:16px 16px 16px 18px;border-radius:var(--radius,12px);border:1.5px solid oklch(from var(--ink) l c h / .18);background:var(--card);color:var(--ink);transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background-color .16s ease}
.cf-apply-hero-4 .ah4-chip-label{grid-column:1;font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
.cf-apply-hero-4 .ah4-chip-detail{grid-column:1;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-apply-hero-4 .ah4-dot{grid-column:2;grid-row:1 / span 2;align-self:start;display:grid;place-items:center;width:26px;height:26px;margin-top:2px;border-radius:999px;border:2px solid oklch(from var(--ink) l c h / .3);background:var(--card);color:var(--success-glyph,#fff);transition:background-color .16s ease,border-color .16s ease}
.cf-apply-hero-4 .ah4-dot svg{width:16px;height:16px;opacity:0;transform:scale(.6);transition:opacity .16s ease,transform .16s ease}
.cf-apply-hero-4 .ah4-chip:hover input:not(:disabled)+.ah4-face{border-color:oklch(from var(--ink) l c h / .42);transform:translateY(-1px);box-shadow:var(--shadow-md,0 1px 2px oklch(from var(--ah4-sh) l c h / .22),0 4px 10px -2px oklch(from var(--ah4-sh) l c h / .2))}
.cf-apply-hero-4 .ah4-chip input:checked+.ah4-face,.cf-apply-hero-4 .ah4-chip:hover input:checked+.ah4-face{background:color-mix(in oklch,var(--accent) 10%,var(--card));border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent),var(--shadow-md,0 1px 2px oklch(from var(--ah4-sh) l c h / .22),0 4px 10px -2px oklch(from var(--ah4-sh) l c h / .2))}
.cf-apply-hero-4 .ah4-chip input:checked+.ah4-face .ah4-dot{background:var(--success);border-color:var(--success)}
.cf-apply-hero-4 .ah4-chip input:checked+.ah4-face .ah4-dot svg{opacity:1;transform:none}
.cf-apply-hero-4 .ah4-chip input:focus-visible+.ah4-face{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / .55);outline-offset:2px}
.cf-apply-hero-4 .ah4-chip input:disabled+.ah4-face{background:color-mix(in oklch,var(--ink) 5%,var(--card));border-color:oklch(from var(--ink) l c h / .14);box-shadow:none}
.cf-apply-hero-4 .ah4-chips.is-invalid .ah4-face{border-color:var(--danger)}
.cf-apply-hero-4 .ah4-field-error{margin:12px 0 0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--danger);text-wrap:pretty}
.cf-apply-hero-4 .ah4-field-error svg,.cf-apply-hero-4 .ah4-note svg,.cf-apply-hero-4 .ah4-msg svg{display:inline-block;width:16px;height:16px;vertical-align:-.15em;margin-inline-end:.4em}
.cf-apply-hero-4 .ah4-action{margin-top:24px}
.cf-apply-hero-4 .ah4-btn{--ah4-bg:var(--button-bg,var(--cta));--ah4-bg2:var(--button-bg-2,var(--cta-2));position:relative;isolation:isolate;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:64px;margin:0;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));cursor:pointer;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;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--ah4-bg) calc(l + .04) c h),oklch(from var(--ah4-bg2) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--ah4-bg) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--ah4-bg) calc(l - .16) c h),0 1px 2px oklch(from var(--ah4-sh) l c h / .3),0 8px 16px -6px oklch(from var(--ah4-sh) l c h / .42));transition:transform .16s ease,box-shadow .16s ease,color .25s ease,text-shadow .25s ease;-webkit-tap-highlight-color:transparent}
.cf-apply-hero-4 .ah4-btn-label{text-align:center;text-wrap:balance}
.cf-apply-hero-4 .ah4-btn:not(:disabled):hover,.cf-apply-hero-4 .ah4-btn.is-hover{background:linear-gradient(oklch(from var(--ah4-bg) calc(l - .01) c h),oklch(from var(--ah4-bg2) calc(l - .07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--ah4-bg) calc(l + .12) c h / .7),inset 0 -3px 0 oklch(from var(--ah4-bg) calc(l - .2) c h),0 1px 2px oklch(from var(--ah4-sh) l c h / .32),0 10px 18px -6px oklch(from var(--ah4-sh) l c h / .5))}
.cf-apply-hero-4 .ah4-btn:not(:disabled):active,.cf-apply-hero-4 .ah4-btn.is-active{background:linear-gradient(oklch(from var(--ah4-bg) calc(l - .04) c h),oklch(from var(--ah4-bg2) calc(l - .08) c h));transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--ah4-bg) calc(l - .24) c h / .55),inset 0 -2px 0 oklch(from var(--ah4-bg) calc(l - .16) c h),0 1px 1px oklch(from var(--ah4-sh) l c h / .3)}
.cf-apply-hero-4 .ah4-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-apply-hero-4 .ah4-btn:disabled{cursor:not-allowed;color:var(--muted);text-shadow:none;background:color-mix(in oklch,var(--ink) 6%,var(--card));box-shadow:inset 0 0 0 1px oklch(from var(--ink) l c h / .12)}
.cf-apply-hero-4 .ah4-spin{width:20px;height:20px;flex:none}
.cf-apply-hero-4 .ah4-note{margin:12px 0 0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-apply-hero-4 .ah4-note svg{color:var(--success)}
.cf-apply-hero-4 .ah4-msg{margin:12px 0 0;text-align:center;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-apply-hero-4 .ah4-msg.is-error{color:var(--danger)}
.cf-apply-hero-4 .ah4-photo{grid-area:photo;position:relative;overflow:hidden;min-height:220px;background:color-mix(in oklch,var(--band-ink) 8%,var(--band))}
.cf-apply-hero-4 .ah4-photo img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:center 55%;border-radius:inherit;transition:transform .6s cubic-bezier(.2,.7,.2,1)}
.cf-apply-hero-4 .ah4-photo:hover img{transform:scale(1.03)}
.cf-apply-hero-4 .ah4-how{grid-area:how;padding:clamp(20px,3vw,32px);background:color-mix(in oklch,var(--band-ink) 8%,var(--band));border:1px solid oklch(from var(--band-ink) l c h / .16);color:var(--band-ink)}
.cf-apply-hero-4 .ah4-how-title{margin:0 0 16px;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:-.01em;color:var(--band-ink);text-wrap:balance}
.cf-apply-hero-4 .ah4-steps{display:grid;margin:0;padding:0;list-style:none}
.cf-apply-hero-4 .ah4-steps li{display:grid;grid-template-columns:28px minmax(0,1fr);column-gap:12px;align-items:baseline;padding:12px 0}
.cf-apply-hero-4 .ah4-steps li+li{border-top:1px solid oklch(from var(--band-ink) l c h / .14)}
.cf-apply-hero-4 .ah4-steps li:first-child{padding-top:0}
.cf-apply-hero-4 .ah4-steps li:last-child{padding-bottom:0}
.cf-apply-hero-4 .ah4-num{font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;font-variant-numeric:tabular-nums}
.cf-apply-hero-4 .ah4-step-text{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.45;font-weight:500;text-wrap:pretty}
.cf-apply-hero-4 .ah4-proof{grid-area:proof;display:flex;flex-direction:column;gap:16px;margin:0;padding:clamp(20px,3vw,32px);background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--ah4-sh) l c h / .2))}
.cf-apply-hero-4 .ah4-proof>svg{width:24px;height:24px;flex:none}
.cf-apply-hero-4 .ah4-quote{margin:0;font-family:var(--font-display);font-weight:700;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.25;letter-spacing:-.01em;text-wrap:pretty}
.cf-apply-hero-4 .ah4-cite{display:flex;flex-direction:column;gap:4px;font-size:.9375rem;line-height:1.4}
.cf-apply-hero-4 .ah4-cite strong{font-weight:800}
.cf-apply-hero-4 .ah4-cite span{font-weight:500}
@media (max-width:960px){
.cf-apply-hero-4 .ah4-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:none;grid-template-areas:"q q" "how how"}
.cf-apply-hero-4.has-photo .ah4-grid{grid-template-rows:none;grid-template-areas:"q q" "photo photo" "how how"}
.cf-apply-hero-4.has-proof .ah4-grid{grid-template-rows:none;grid-template-areas:"q q" "how proof"}
.cf-apply-hero-4.has-photo.has-proof .ah4-grid{grid-template-rows:none;grid-template-areas:"q q" "photo photo" "how proof"}
.cf-apply-hero-4 .ah4-photo{min-height:0;aspect-ratio:2 / 1}
}
@media (max-width:640px){
.cf-apply-hero-4 .ah4-grid,.cf-apply-hero-4.has-photo .ah4-grid,.cf-apply-hero-4.has-proof .ah4-grid,.cf-apply-hero-4.has-photo.has-proof .ah4-grid{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:none;gap:12px}
.cf-apply-hero-4 .ah4-grid>.ah4-tile{grid-area:auto}
.cf-apply-hero-4 .ah4-photo{aspect-ratio:4 / 3}
.cf-apply-hero-4 .ah4-form{margin-top:24px}
.cf-apply-hero-4 .ah4-sheet{padding:0;background:none}
.cf-apply-hero-4 .ah4-chips{grid-template-columns:minmax(0,1fr)}
.cf-apply-hero-4 .ah4-face{min-height:0;padding:14px 16px}
.cf-apply-hero-4 .ah4-btn{padding:12px 16px}
.cf-apply-hero-4 .ah4-progress{gap:12px}
.cf-apply-hero-4 .ah4-track{flex:1 1 auto}
}
@keyframes ah4-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes ah4-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@keyframes ah4-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:no-preference){
.cf-apply-hero-4 .ah4-rise{animation:ah4-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-apply-hero-4 .ah4-d2{animation-delay:.07s}
.cf-apply-hero-4 .ah4-d3{animation-delay:.14s}
.cf-apply-hero-4 .ah4-d4{animation-delay:.21s}
.cf-apply-hero-4 .ah4-chip input:checked+.ah4-face .ah4-dot{animation:ah4-pop .3s cubic-bezier(.2,.7,.2,1) both}
.cf-apply-hero-4 .ah4-spin{animation:ah4-spin .8s linear infinite}
}
@media (prefers-reduced-motion:reduce){
.cf-apply-hero-4 .ah4-face,.cf-apply-hero-4 .ah4-dot,.cf-apply-hero-4 .ah4-dot svg,.cf-apply-hero-4 .ah4-fill,.cf-apply-hero-4 .ah4-btn,.cf-apply-hero-4 .ah4-photo img{transition:none}
.cf-apply-hero-4 .ah4-chip:hover input:not(:disabled)+.ah4-face,.cf-apply-hero-4 .ah4-photo:hover img{transform:none}
.cf-apply-hero-4 .ah4-btn:not(:disabled):hover,.cf-apply-hero-4 .ah4-btn:not(:disabled):active,.cf-apply-hero-4 .ah4-btn.is-hover,.cf-apply-hero-4 .ah4-btn.is-active{transform:none}
}
`
pieces/hero/apply-hero-4/specimen.tsx 50 lines
import __studioImagea6876d9e from "../assets/b21f7da7b10646b1.webp";
import { ApplyHero4, type ApplyHero4State } from "../apply-hero-4"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled", "error"]
export default function ApplyHero4Specimen({ state = "default" }: { state?: ApplyHero4State }) {
const ready = state === "hover" || state === "active"
return (
<ApplyHero4
state={state}
simulate
href="/apply"
headlineBefore="Your new kitchen starts with "
headlineEmphasis="one honest number"
headlineAfter="."
subheadline="Tell us your budget and an Atlas Kitchen Remodels designer plans your layout, materials and timeline around it, before anyone picks up a hammer."
aside="(A ballpark is fine. It's where we start, not a contract.)"
stepLabel="Question 1 of 5"
stepTotal={5}
question="What's your project budget?"
name="budget"
options={[
{ value: "25k-50k", label: "$25k–$50k", detail: "Refresh: cabinets, counters, lighting" },
{ value: "50k-90k", label: "$50k–$90k", detail: "Full remodel in your current layout" },
{ value: "90k-150k", label: "$90k–$150k", detail: "New layout, walls or an island move" },
{ value: "150k-plus", label: "$150k+", detail: "Custom kitchen, whole-room build" },
]}
defaultValue={ready ? "50k-90k" : undefined}
fieldError="Pick a budget range to start. A ballpark is fine."
ctaLabel="Yes! Start My Consultation"
ctaLoadingLabel="Starting your consultation"
reassurance="Five short questions · No obligation"
howTitle="From one answer to your kitchen plan"
howSteps={[
{ text: "Answer five quick questions about your kitchen." },
{ text: "Meet your Atlas designer at home to measure up." },
{ text: "Get a layout, materials list and timeline to price." },
]}
proofQuote="They planned the whole kitchen around our number. No upsell, no pressure, just a plan we could actually build."
proofName="Dana R., Oak Park"
proofDetail="Galley kitchen remodel"
sceneImage={slot(
"scene",
__studioImagea6876d9e,
)}
sceneAlt="A finished kitchen with white oak cabinets, a pale quartz island and brass pendant lights"
/>
)
}
| Name | Type | Details |
|---|---|---|
headlineBefore OptionalApplyHero4 |
string |
Default "Your project starts with "
|
headlineEmphasis OptionalApplyHero4 |
string |
Default "one honest answer"
|
headlineAfter OptionalApplyHero4 |
string |
Default "."
|
subheadline OptionalApplyHero4 |
React.ReactNode |
Default "Answer the first question below and we'll plan your consultation around the project you actually want to build."
|
aside OptionalApplyHero4 |
React.ReactNode |
Default ""
|
stepLabel OptionalApplyHero4 |
string |
Default "Question 1"
|
stepTotal OptionalApplyHero4 |
number |
|
question OptionalApplyHero4 |
string |
Default "What's your project budget?"
|
name OptionalApplyHero4 |
string |
Default "budget"
|
options OptionalApplyHero4 |
ApplyHero4Option[] |
Default DEFAULT_OPTIONS
|
defaultValue OptionalApplyHero4 |
string |
|
fieldError OptionalApplyHero4 |
string |
Default "Choose a budget range to start your application."
|
ctaLabel OptionalApplyHero4 |
string |
Default "Yes! Start My Application"
|
ctaLoadingLabel OptionalApplyHero4 |
string |
Default "Starting your application"
|
ctaRetryLabel OptionalApplyHero4 |
string |
Default "Try Again"
|
reassurance OptionalApplyHero4 |
string |
Default "No obligation · Stop anytime"
|
disabledMessage OptionalApplyHero4 |
string |
Default "Applications aren't open right now."
|
errorMessage OptionalApplyHero4 |
string |
Default "We couldn't start your application. Please try again."
|
howTitle OptionalApplyHero4 |
string |
Default "From your first answer to a clear plan"
|
howSteps OptionalApplyHero4 |
ApplyHero4Step[] |
Default DEFAULT_STEPS
|
proofQuote OptionalApplyHero4 |
React.ReactNode |
|
proofName OptionalApplyHero4 |
string |
Default ""
|
proofDetail OptionalApplyHero4 |
string |
Default ""
|
sceneImage OptionalApplyHero4 |
string |
|
sceneAlt OptionalApplyHero4 |
string |
Default ""
|
href OptionalApplyHero4 |
string |
|
onAction OptionalApplyHero4 |
(answer: ApplyHero4Answer) => void | Promise<unknown> |
|
simulate OptionalApplyHero4 |
boolean |
Default false
|
disabled OptionalApplyHero4 |
boolean |
Default false
|
state OptionalApplyHero4 |
ApplyHero4State |
Default "default"
|
className OptionalApplyHero4 |
string |
|
style OptionalApplyHero4 |
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-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- 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.
-
b21f7da7b10646b1.webp
image/webp · 115 KB
-
f211b3080387e46d.webp
image/webp · 105 KB