Quiz Start 3
Starts a diagnosis quiz: question 1 sits on a dark stage, the report it builds sits beside it, and every answer lights the leak it feeds so the quiz feels about the visitor.
Use it in a prompt
Use forms/quiz-start-3 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/forms/quiz-start-3.tsx. - Import it and pass your copy and images (Props tab):
import { QuizStart3 } from "@/components/funneldna/forms/quiz-start-3"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/forms/quiz-start-3/component.tsx 472 lines
// layout: clipboard-checklist
// Starts a diagnosis quiz: question 1 sits on a dark stage, the report it builds sits beside it, and every answer lights the leak it feeds so the quiz feels about the visitor.
'use client'
import { useEffect, useId, useRef, useState, type CSSProperties, type FormEvent } from 'react'
import { AlertCircle, Check, Loader2, Target } from 'lucide-react'
import { FX_HOST, Pattern } from '../fx/fx'
export type QuizStart3Choice = {
value: string
label: string
/** One short line under the answer. */
detail?: string
/** Index of the report area this answer feeds (defaults to the answer's own position). */
area?: number
}
export type QuizStart3Area = {
/** Area name only. This piece never shows a score. */
title: string
}
/** 'hover' lights the first answer's area as a preview; 'active' picks the first answer and presses the button. */
export type QuizStart3State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
/** Generated labels. Named placeholders in braces are replaced as text. */
export type QuizStart3Copy = {
/** {count} = number of questions. */
questionLabel: string
/** {count} = number of report areas. */
reportTitle: string
/** Phone strip. {count} = number of report areas. */
stripLabel: string
/** Chip on each answer row. {n} = the area number it feeds. */
rowTag: string
/** Flag on the report area the chosen answer feeds. */
pickedTag: string
/** Screen-reader announcement after a pick. {area} = area name. */
liveLine: string
/** Line under the button. {count}, {unit}. */
reassurance: string
questionSingular: string
questionPlural: string
/** Accessible name of the report outline. */
areasLabel: string
}
export type QuizStart3Props = {
/** Templated labels; placeholders are replaced as text. */
copy?: Partial<QuizStart3Copy>
headline?: string
/** One continuous phrase inside the headline shown in the emphasis colour. */
highlight?: string
lead?: string
/** The real number of questions in the quiz. */
questionCount?: number
/** The first question, open so starting takes one tap. */
question?: string
choices?: QuizStart3Choice[]
/** The areas the report covers, names only. */
areas?: QuizStart3Area[]
/** Overrides copy.reportTitle. */
reportTitle?: string
reportNote?: string
/** product slot: the report or audit shot on a transparent background. */
reportImage?: string
reportImageAlt?: string
ctaLabel?: string
/** Button text while a promise returned by onSubmit is pending. */
loadingLabel?: string
/** Overrides copy.reassurance. */
reassurance?: string
/** Shown when the visitor tries to start without an answer. */
errorText?: string
disabled?: boolean
/** Replaces the reassurance line while the quiz is disabled. */
disabledText?: string
state?: QuizStart3State
/** Validated first answer. A returned promise shows the loading label. */
onSubmit?: (answer: string) => void | Promise<void>
/** Called with the answer after onSubmit settles (e.g. show question 2). */
onAction?: (answer: string) => void
className?: string
}
export function QuizStart3({
copy: copyOverrides,
headline = 'Find the funnel leak that costs you the most sales',
highlight = 'costs you the most sales',
lead = 'Answer a few quick questions and your report shows which leak to fix first.',
questionCount = 4,
question = 'Where do most of your visitors drop off?',
choices = DEFAULT_CHOICES,
areas = DEFAULT_AREAS,
reportTitle,
reportNote = 'Every answer points your report at one of these areas.',
reportImage,
reportImageAlt = '',
ctaLabel = 'Send Me My Report',
loadingLabel = 'One moment…',
reassurance,
errorText = 'Pick the answer that fits you best to start.',
disabled = false,
disabledText = 'This quiz isn’t open right now.',
state = 'default',
onSubmit,
onAction,
className = '',
}: QuizStart3Props) {
const copy: QuizStart3Copy = { ...DEFAULT_COPY, ...copyOverrides }
const uid = useId().split(':').join('')
const titleId = `${uid}-title`
const qId = `${uid}-q`
const errId = `${uid}-err`
const noteId = `${uid}-note`
const group = `${uid}-answer`
const count = Number.isFinite(questionCount) ? Math.max(1, Math.round(questionCount)) : 4
const unit = count === 1 ? copy.questionSingular : copy.questionPlural
const firstChoice = choices[0]?.value ?? ''
const [answer, setAnswer] = useState(state === 'active' ? firstChoice : '')
const [hovered, setHovered] = useState<number | null>(state === 'hover' ? 0 : null)
const [focused, setFocused] = useState<number | null>(null)
const [invalid, setInvalid] = useState(state === 'error')
const [loading, setLoading] = useState(false)
const radios = useRef<(HTMLInputElement | null)[]>([])
const mounted = useRef(true)
useEffect(() => {
setAnswer(state === 'active' ? firstChoice : '')
setHovered(state === 'hover' ? 0 : null)
setInvalid(state === 'error')
setLoading(false)
}, [state, firstChoice])
useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
const isDisabled = disabled || state === 'disabled'
const pickedIndex = choices.findIndex((choice) => choice.value === answer)
const picked = pickedIndex >= 0
const areaOf = (index: number) => {
if (!areas.length) return -1
const n = Math.round(choices[index]?.area ?? index)
return ((n % areas.length) + areas.length) % areas.length
}
const previewIndex = hovered ?? focused
const previewArea = previewIndex === null || isDisabled ? -1 : areaOf(previewIndex)
const pickedArea = picked ? areaOf(pickedIndex) : -1
const litClass = (index: number) => (index === pickedArea ? ' is-picked' : index === previewArea ? ' is-preview' : '')
const [before, emph, after] = splitPhrase(headline, highlight)
const reportLine = reportTitle ?? fill(copy.reportTitle, { count: areas.length })
const stripLine = fill(copy.stripLabel, { count: areas.length })
const noteLine = isDisabled ? disabledText : reassurance ?? fill(copy.reassurance, { count, unit })
const live = pickedArea >= 0 ? fill(copy.liveLine, { area: areas[pickedArea].title }) : ''
const locked = !picked && !isDisabled
function pick(value: string) {
if (isDisabled) return
setAnswer(value)
setInvalid(false)
}
async function submit(event: FormEvent<HTMLFormElement>) {
event.preventDefault()
if (isDisabled || loading) return
if (!picked) {
setInvalid(true)
radios.current[0]?.focus()
return
}
setInvalid(false)
try {
const result = onSubmit?.(answer)
if (result && typeof (result as Promise<void>).then === 'function') {
setLoading(true)
await result
}
onAction?.(answer)
} catch {
// The caller reports failures; this piece only resets its button.
} finally {
if (mounted.current) setLoading(false)
}
}
return (
<form
className={`cf-quiz-start-3${isDisabled ? ' is-off' : ''} ${className}`.trim()}
onSubmit={submit}
noValidate
aria-labelledby={titleId}
aria-busy={loading || undefined}
>
<style>{CSS}</style>
<div className='qs3-ask'>
<div className='qs3-ask-in'>
<h2 id={titleId} className='qs3-title'>
{before}
{emph ? <span className='qs3-emph'>{emph}</span> : null}
{after}
</h2>
{lead ? <p className='qs3-lead'>{lead}</p> : null}
<p className='qs3-qlabel'>{fill(copy.questionLabel, { count })}</p>
<h3 id={qId} className='qs3-q'>
{question}
</h3>
<div
className='qs3-rows'
role='radiogroup'
aria-labelledby={qId}
aria-describedby={invalid ? errId : undefined}
aria-invalid={invalid || undefined}
>
{choices.map((choice, index) => {
const on = choice.value === answer
const area = areaOf(index)
return (
<label
key={choice.value}
className={`qs3-row${on ? ' is-picked' : ''}${state === 'hover' && index === 0 ? ' is-hover' : ''}`}
style={{ '--i': index } as CSSProperties}
onMouseEnter={() => setHovered(index)}
onMouseLeave={() => setHovered(null)}
>
<input
ref={(el) => {
radios.current[index] = el
}}
className='qs3-sr'
type='radio'
name={group}
value={choice.value}
checked={on}
disabled={isDisabled}
onChange={() => pick(choice.value)}
onFocus={() => setFocused(index)}
onBlur={() => setFocused(null)}
/>
<span className='qs3-dot' aria-hidden='true'>
{on ? <Check size={18} strokeWidth={3} /> : null}
</span>
<span className='qs3-copy'>
<span className='qs3-label'>{choice.label}</span>
{choice.detail ? <span className='qs3-detail'>{choice.detail}</span> : null}
</span>
{area >= 0 ? <span className='qs3-tag'>{fill(copy.rowTag, { n: area + 1 })}</span> : null}
</label>
)
})}
</div>
{invalid ? (
<p id={errId} className='qs3-err' role='alert'>
<AlertCircle className='qs3-ico' size={18} strokeWidth={2.5} aria-hidden='true' />
{errorText}
</p>
) : null}
<div className='qs3-act'>
<button
type='submit'
className={`qs3-btn${state === 'active' ? ' is-press' : ''}`}
disabled={isDisabled}
aria-disabled={locked || undefined}
aria-describedby={noteId}
>
{loading ? (
<span className='qs3-loading'>
<Loader2 className='qs3-spin' size={20} strokeWidth={2.5} aria-hidden='true' />
{loadingLabel}
</span>
) : (
ctaLabel
)}
</button>
<p id={noteId} className='qs3-note'>
{noteLine}
</p>
</div>
</div>
</div>
<div className='qs3-report' style={FX_HOST}>
<Pattern name='grid' fade='edges' />
<div className='qs3-report-in'>
<div className='qs3-strip'>
<p className='qs3-strip-t'>{stripLine}</p>
<ol className='qs3-pips'>
{areas.map((area, index) => (
<li key={`${index}-${area.title}`} className={`qs3-pip${litClass(index)}`}>
<span aria-hidden='true'>{index + 1}</span>
<span className='qs3-sr'>{area.title}</span>
</li>
))}
</ol>
</div>
<div className='qs3-full'>
<div className='qs3-rhead'>
<h3 className='qs3-rtitle'>{reportLine}</h3>
{reportImage ? (
<img className='qs3-img' src={reportImage} alt={reportImageAlt} width={160} height={160} loading='lazy' decoding='async' />
) : null}
</div>
<ol className='qs3-areas' aria-label={copy.areasLabel}>
{areas.map((area, index) => (
<li key={`${index}-${area.title}`} className={`qs3-area${litClass(index)}`} style={{ '--i': index } as CSSProperties}>
<span className='qs3-num' aria-hidden='true'>
{index + 1}
</span>
<span className='qs3-area-body'>
<span className='qs3-name'>{area.title}</span>
{index === pickedArea ? (
<span className='qs3-flag'>
<Target size={16} strokeWidth={2.5} aria-hidden='true' />
{copy.pickedTag}
</span>
) : null}
</span>
</li>
))}
</ol>
{reportNote ? <p className='qs3-rnote'>{reportNote}</p> : null}
</div>
<p className='qs3-sr' aria-live='polite'>
{live}
</p>
</div>
</div>
</form>
)
}
export default QuizStart3
const DEFAULT_COPY: QuizStart3Copy = {
questionLabel: 'Question 1 of {count}',
reportTitle: 'Your report checks the {count} places sales slip away',
stripLabel: 'Your report covers {count} areas',
rowTag: 'Area {n}',
pickedTag: 'Your answer points here',
liveLine: 'This answer points your report at {area}.',
reassurance: '{count} quick {unit}, then your report',
questionSingular: 'question',
questionPlural: 'questions',
areasLabel: 'What your report covers',
}
const DEFAULT_AREAS: QuizStart3Area[] = [
{ title: 'Your offer' },
{ title: 'Your page copy' },
{ title: 'Your follow-up' },
{ title: 'Your checkout' },
]
const DEFAULT_CHOICES: QuizStart3Choice[] = [
{ value: 'offer', label: 'They read the offer and leave', detail: 'The interest is there. The offer doesn’t land.', area: 0 },
{ value: 'page', label: 'They skim the page and bounce', detail: 'The headline and copy lose them early.', area: 1 },
{ value: 'follow-up', label: 'They opt in, then go quiet', detail: 'Leads come in and never buy.', area: 2 },
{ value: 'checkout', label: 'They reach checkout and stall', detail: 'Carts get started and left behind.', area: 3 },
]
function fill(template: string, vars: Record<string, string | number>) {
return Object.keys(vars).reduce((out, key) => out.split(`{${key}}`).join(String(vars[key])), template)
}
function splitPhrase(text: string, phrase?: string): [string, string, string] {
if (!phrase) return [text, '', '']
const at = text.indexOf(phrase)
if (at < 0) return [text, '', '']
return [text.slice(0, at), phrase, text.slice(at + phrase.length)]
}
const CSS = `
.cf-quiz-start-3{--qs3-gutter:clamp(16px,5vw,48px);--qs3-split:clamp(32px,4vw,64px);--qs3-pad-t:clamp(56px,8vw,112px);--qs3-pad-b:clamp(64px,8.5vw,120px);--qs3-shadow:var(--shadow,oklch(0.22 0.03 260));--qs3-fill:var(--accent-fill,var(--accent));--qs3-fill-ink:var(--accent-fill-ink,var(--card));--qs3-soft:color-mix(in oklab,var(--band-ink) 80%,var(--band));--qs3-emph:color-mix(in oklab,var(--band-ink) 62%,var(--qs3-fill));display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;margin:0;background:var(--surface);color:var(--ink);font-family:var(--font-body);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;overflow-x:clip}
.cf-quiz-start-3 *,.cf-quiz-start-3 *::before,.cf-quiz-start-3 *::after{box-sizing:border-box}
.cf-quiz-start-3 .qs3-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.cf-quiz-start-3 .qs3-ask{min-width:0;background:var(--band);color:var(--band-ink)}
.cf-quiz-start-3 .qs3-ask-in{width:100%;max-width:608px;margin-left:auto;padding:var(--qs3-pad-t) var(--qs3-split) var(--qs3-pad-b) var(--qs3-gutter)}
.cf-quiz-start-3 .qs3-title{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--band-ink);text-wrap:balance}
.cf-quiz-start-3 .qs3-emph{color:var(--qs3-emph)}
.cf-quiz-start-3 .qs3-lead{margin:0 0 32px;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;color:var(--qs3-soft);text-wrap:pretty}
.cf-quiz-start-3 .qs3-qlabel{margin:0 0 12px;font-size:0.875rem;font-weight:800;line-height:1.2;letter-spacing:0.08em;text-transform:uppercase;color:var(--qs3-soft)}
.cf-quiz-start-3 .qs3-q{margin:0 0 16px;font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;color:var(--band-ink);text-wrap:balance}
.cf-quiz-start-3 .qs3-rows{display:grid;gap:12px}
.cf-quiz-start-3 .qs3-row{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:16px;min-height:72px;padding:16px 20px;border-radius:var(--radius,12px);background:oklch(from var(--band-ink) l c h / 0.07);border:1px solid oklch(from var(--band-ink) l c h / 0.18);color:var(--band-ink);cursor:pointer;transition:background-color .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease;animation:qs3-rise .45s cubic-bezier(.2,.7,.2,1) backwards;animation-delay:min(calc(var(--i,0) * 0.07s),0.28s)}
.cf-quiz-start-3 .qs3-row:hover,.cf-quiz-start-3 .qs3-row.is-hover{background:oklch(from var(--band-ink) l c h / 0.13);border-color:oklch(from var(--band-ink) l c h / 0.34);transform:translateY(-1px)}
.cf-quiz-start-3 .qs3-row:active{transform:translateY(0) scale(0.995);background:oklch(from var(--band-ink) l c h / 0.18)}
.cf-quiz-start-3 .qs3-row:has(input:focus-visible){outline:3px solid var(--band-ink);outline-offset:3px}
.cf-quiz-start-3 .qs3-row.is-picked{background:var(--qs3-fill);border-color:oklch(from var(--qs3-fill) calc(l - 0.08) c h);color:var(--qs3-fill-ink);box-shadow:inset 0 1px 0 oklch(from var(--qs3-fill) calc(l + 0.1) c h / 0.6),0 1px 2px oklch(from var(--qs3-shadow) l c h / 0.35),0 8px 16px -6px oklch(from var(--qs3-shadow) l c h / 0.45)}
.cf-quiz-start-3 .qs3-row.is-picked:hover{background:oklch(from var(--qs3-fill) calc(l - 0.04) c h);border-color:oklch(from var(--qs3-fill) calc(l - 0.1) c h)}
.cf-quiz-start-3 .qs3-dot{display:grid;place-items:center;width:28px;height:28px;border-radius:999px;border:2px solid oklch(from var(--band-ink) l c h / 0.55)}
.cf-quiz-start-3 .qs3-row.is-picked .qs3-dot{background:var(--qs3-fill-ink);border-color:var(--qs3-fill-ink);color:var(--qs3-fill)}
.cf-quiz-start-3 .qs3-copy{display:block;min-width:0}
.cf-quiz-start-3 .qs3-label{display:block;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;line-height:1.25;text-wrap:pretty}
.cf-quiz-start-3 .qs3-detail{display:block;margin-top:4px;font-size:0.9375rem;font-weight:500;line-height:1.4;color:var(--qs3-soft);text-wrap:pretty}
.cf-quiz-start-3 .qs3-row.is-picked .qs3-detail{color:color-mix(in oklab,var(--qs3-fill-ink) 84%,var(--qs3-fill))}
.cf-quiz-start-3 .qs3-tag{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:oklch(from var(--band-ink) l c h / 0.12);color:var(--band-ink);font-size:0.875rem;font-weight:800;line-height:1.2;white-space:nowrap}
.cf-quiz-start-3 .qs3-row.is-picked .qs3-tag{background:oklch(from var(--qs3-fill-ink) l c h / 0.16);color:var(--qs3-fill-ink)}
.cf-quiz-start-3.is-off .qs3-row{cursor:not-allowed;background:oklch(from var(--band-ink) l c h / 0.04);transform:none}
.cf-quiz-start-3.is-off .qs3-label{color:var(--qs3-soft)}
.cf-quiz-start-3 .qs3-err{margin:16px 0 0;padding:10px 14px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:0.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty}
.cf-quiz-start-3 .qs3-ico{display:inline-block;vertical-align:-0.2em;margin-inline-end:0.4em}
.cf-quiz-start-3 .qs3-act{margin-top:32px}
.cf-quiz-start-3 .qs3-btn{appearance:none;position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;margin:0;padding:0 28px;border:0;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;text-align:center;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + 0.04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--qs3-shadow) l c h / 0.4),0 8px 16px -6px oklch(from var(--qs3-shadow) l c h / 0.45));cursor:pointer;transition:background .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-quiz-start-3 .qs3-btn:not(:disabled):not([aria-disabled='true']):hover{background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - 0.01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.1) c h / 0.7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.2) c h),0 1px 2px oklch(from var(--qs3-shadow) l c h / 0.45),0 10px 18px -6px oklch(from var(--qs3-shadow) l c h / 0.55))}
.cf-quiz-start-3 .qs3-btn:not(:disabled):not([aria-disabled='true']):active,.cf-quiz-start-3 .qs3-btn.is-press{transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - 0.22) c h / 0.55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--qs3-shadow) l c h / 0.35)}
.cf-quiz-start-3 .qs3-btn:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-quiz-start-3 .qs3-btn[aria-disabled='true'],.cf-quiz-start-3 .qs3-btn:disabled{background:oklch(from var(--band-ink) l c h / 0.12);color:var(--qs3-soft);box-shadow:inset 0 0 0 1px oklch(from var(--band-ink) l c h / 0.2);text-shadow:none;cursor:not-allowed;transform:none}
.cf-quiz-start-3[aria-busy='true'] .qs3-btn{cursor:progress}
.cf-quiz-start-3 .qs3-loading{display:inline-flex;align-items:center;justify-content:center;gap:10px}
.cf-quiz-start-3 .qs3-spin{animation:qs3-spin .8s linear infinite}
.cf-quiz-start-3 .qs3-note{margin:12px 0 0;font-size:0.9375rem;font-weight:500;line-height:1.4;color:var(--qs3-soft);text-wrap:pretty}
.cf-quiz-start-3 .qs3-report{position:relative;min-width:0;background:var(--surface);color:var(--ink)}
.cf-quiz-start-3 .qs3-report-in{position:relative;z-index:1;width:100%;max-width:608px;margin-right:auto;padding:var(--qs3-pad-t) var(--qs3-gutter) var(--qs3-pad-b) var(--qs3-split)}
.cf-quiz-start-3 .qs3-strip{display:none}
.cf-quiz-start-3 .qs3-rhead{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:24px;margin-bottom:24px}
.cf-quiz-start-3 .qs3-rtitle{margin:8px 0 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:-0.01em;color:var(--accent);text-wrap:balance}
.cf-quiz-start-3 .qs3-img{display:block;width:clamp(112px,10vw,148px);height:auto;aspect-ratio:1;object-fit:contain;margin:-12px -8px -8px 0;filter:drop-shadow(0 2px 3px oklch(from var(--qs3-shadow) l c h / 0.3)) drop-shadow(0 12px 14px oklch(from var(--qs3-shadow) l c h / 0.2))}
.cf-quiz-start-3 .qs3-areas{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.cf-quiz-start-3 .qs3-area{display:grid;grid-template-columns:clamp(2.75rem,4.4vw,4rem) minmax(0,1fr);align-items:center;gap:16px;padding:16px 20px;border-radius:var(--card-radius,var(--radius,14px));border:1px solid transparent;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease;animation:qs3-rise .45s cubic-bezier(.2,.7,.2,1) backwards;animation-delay:min(calc(var(--i,0) * 0.07s),0.28s)}
.cf-quiz-start-3 .qs3-area.is-preview{background:color-mix(in oklch,var(--accent) 8%,var(--surface));border-color:oklch(from var(--accent) l c h / 0.22)}
.cf-quiz-start-3 .qs3-area.is-picked{background:color-mix(in oklch,var(--accent) 10%,var(--card));border-color:oklch(from var(--accent) l c h / 0.4);box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--qs3-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--qs3-shadow) l c h / 0.32))}
.cf-quiz-start-3 .qs3-num{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;text-align:center;color:var(--accent)}
.cf-quiz-start-3 .qs3-area-body{display:block;min-width:0}
.cf-quiz-start-3 .qs3-name{display:block;font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;color:var(--ink);text-wrap:balance}
.cf-quiz-start-3 .qs3-flag{display:inline-flex;align-items:center;gap:6px;min-height:28px;margin-top:8px;padding:4px 12px;border-radius:999px;background:var(--qs3-fill);color:var(--qs3-fill-ink);font-size:0.875rem;font-weight:800;line-height:1.2;animation:qs3-pop .3s ease-out both}
.cf-quiz-start-3 .qs3-rnote{margin:24px 0 0;padding-inline:20px;max-width:60ch;color:var(--muted);text-wrap:pretty}
.cf-quiz-start-3 .qs3-strip-t{margin:0;min-width:0;font-size:0.9375rem;font-weight:700;line-height:1.3;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cf-quiz-start-3 .qs3-pips{display:flex;flex:none;gap:6px;margin:0;padding:0;list-style:none}
.cf-quiz-start-3 .qs3-pip{position:relative;display:grid;place-items:center;width:28px;height:28px;border-radius:999px;background:color-mix(in oklch,var(--ink) 7%,var(--surface));color:var(--ink);font-family:var(--font-display);font-size:0.875rem;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;transition:background-color .2s ease,color .2s ease}
.cf-quiz-start-3 .qs3-pip.is-preview{background:color-mix(in oklch,var(--accent) 16%,var(--surface))}
.cf-quiz-start-3 .qs3-pip.is-picked{background:var(--qs3-fill);color:var(--qs3-fill-ink);animation:qs3-pop .3s ease-out both}
@keyframes qs3-rise{from{opacity:.82;transform:translateY(8px)}}
@keyframes qs3-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@keyframes qs3-spin{to{transform:rotate(360deg)}}
@media (max-width:1023px){.cf-quiz-start-3 .qs3-img{display:none}.cf-quiz-start-3 .qs3-rhead{grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px){
.cf-quiz-start-3{grid-template-columns:minmax(0,1fr)}
.cf-quiz-start-3 .qs3-report{order:-1}
.cf-quiz-start-3 .qs3-report-in{max-width:none;margin:0;padding:14px var(--qs3-gutter)}
.cf-quiz-start-3 .qs3-strip{display:flex;align-items:center;justify-content:space-between;gap:12px}
.cf-quiz-start-3 .qs3-full{display:none}
.cf-quiz-start-3 .qs3-ask-in{max-width:none;margin:0;padding:48px var(--qs3-gutter) var(--qs3-pad-b)}
}
@media (max-width:420px){.cf-quiz-start-3 .qs3-row{grid-template-columns:24px minmax(0,1fr) auto;gap:12px;padding:14px 16px}.cf-quiz-start-3 .qs3-dot{width:24px;height:24px}}
@media (prefers-reduced-motion:reduce){
.cf-quiz-start-3 .qs3-row,.cf-quiz-start-3 .qs3-area,.cf-quiz-start-3 .qs3-flag,.cf-quiz-start-3 .qs3-pip,.cf-quiz-start-3 .qs3-btn,.cf-quiz-start-3 .qs3-spin{animation:none;transition:none}
.cf-quiz-start-3 .qs3-row:hover,.cf-quiz-start-3 .qs3-row.is-hover,.cf-quiz-start-3 .qs3-row:active,.cf-quiz-start-3 .qs3-btn:not(:disabled):not([aria-disabled='true']):active,.cf-quiz-start-3 .qs3-btn.is-press{transform:none}
}
`
pieces/forms/quiz-start-3/specimen.tsx 35 lines
import __studioImageb9a681d0 from "../assets/9c81079f973d6304.webp";
import { QuizStart3, type QuizStart3State } from '../quiz-start-3'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function QuizStart3Specimen({ state = 'default' }: { state?: QuizStart3State }) {
return (
<QuizStart3
state={state}
headline='Find the cash-flow leak costing your agency the most'
highlight='costing your agency the most'
lead='Ledgerline’s Cash-Flow Leak Audit checks the four places agency cash slips out. It starts with one question.'
questionCount={4}
question='When does cash feel tightest at your agency?'
choices={[
{ value: 'late-pay', label: 'Waiting on clients to pay', detail: 'Invoices go out. The money lands weeks later.', area: 0 },
{ value: 'scope', label: 'Scope keeps growing', detail: 'Extra work ships without an extra invoice.', area: 1 },
{ value: 'overhead', label: 'Tools and contractors pile up', detail: 'Subscriptions and freelancers renew quietly.', area: 2 },
{ value: 'pricing', label: 'Projects run past the fee', detail: 'The hours outgrow what the project pays.', area: 3 },
]}
areas={[
{ title: 'Slow-paying clients' },
{ title: 'Unbilled scope creep' },
{ title: 'Quiet overhead' },
{ title: 'Underpriced projects' },
]}
reportTitle='Your Leak Report covers the 4 places agency cash slips out'
reportNote='Each answer points your report at one leak, so you see which one to plug first.'
reportImage={slot('product', __studioImageb9a681d0)}
reportImageAlt='Ledgerline Cash-Flow Leak Report on a clipboard'
ctaLabel='Send Me My Leak Report'
/>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalQuizStart3 |
Partial<QuizStart3Copy> |
|
headline OptionalQuizStart3 |
string |
Default 'Find the funnel leak that costs you the most sales'
|
highlight OptionalQuizStart3 |
string |
Default 'costs you the most sales'
|
lead OptionalQuizStart3 |
string |
Default 'Answer a few quick questions and your report shows which leak to fix first.'
|
questionCount OptionalQuizStart3 |
number |
Default 4
|
question OptionalQuizStart3 |
string |
Default 'Where do most of your visitors drop off?'
|
choices OptionalQuizStart3 |
QuizStart3Choice[] |
Default DEFAULT_CHOICES
|
areas OptionalQuizStart3 |
QuizStart3Area[] |
Default DEFAULT_AREAS
|
reportTitle OptionalQuizStart3 |
string |
|
reportNote OptionalQuizStart3 |
string |
Default 'Every answer points your report at one of these areas.'
|
reportImage OptionalQuizStart3 |
string |
|
reportImageAlt OptionalQuizStart3 |
string |
Default ''
|
ctaLabel OptionalQuizStart3 |
string |
Default 'Send Me My Report'
|
loadingLabel OptionalQuizStart3 |
string |
Default 'One moment…'
|
reassurance OptionalQuizStart3 |
string |
|
errorText OptionalQuizStart3 |
string |
Default 'Pick the answer that fits you best to start.'
|
disabled OptionalQuizStart3 |
boolean |
Default false
|
disabledText OptionalQuizStart3 |
string |
Default 'This quiz isn’t open right now.'
|
state OptionalQuizStart3 |
QuizStart3State |
Default 'default'
|
onSubmit OptionalQuizStart3 |
(answer: string) => void | Promise<void> |
|
onAction OptionalQuizStart3 |
(answer: string) => void |
|
className OptionalQuizStart3 |
string |
Default ''
|
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- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
-
9c81079f973d6304.webp
image/webp · 144 KB