Results Gate 6
Shows what the visitor's quiz report holds and collects their name and email to get it.
Use it in a prompt
Use forms/results-gate-6 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/results-gate-6.tsx. - Import it and pass your copy and images (Props tab):
import { ResultsGate6 } from "@/components/funneldna/forms/results-gate-6"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/forms/results-gate-6/component.tsx 301 lines
// Shows what the visitor's quiz report holds and collects their name and email to get it.
import * as React from 'react'
import { AlertCircle, Loader2, Lock, Mail, User } from 'lucide-react'
export type ResultsGate6Props = {
headline?: string
highlight?: string
lead?: string
statementTitle?: string
statementNote?: string
lines?: ResultsLedgerLine[]
sealedLabel?: string
sealedHint?: string
/** @deprecated No longer rendered: the builder wires what happens after submit. */
unlockedLabel?: string
statusLabel?: string
statusValue?: string
/** @deprecated No longer rendered: the builder wires what happens after submit. */
statusSuccess?: string
totalLabel?: string
totalValue?: string
firstNameLabel?: string
firstNamePlaceholder?: string
emailLabel?: string
emailPlaceholder?: string
label?: string
loadingLabel?: string
privacy?: string
nameError?: string
emailError?: string
error?: string
/** @deprecated No longer rendered: the builder wires what happens after submit. */
greetingTemplate?: string
/** @deprecated No longer rendered: the builder wires what happens after submit. */
successTitle?: string
/** @deprecated No longer rendered: the builder wires what happens after submit. */
success?: string
/** @deprecated No longer rendered: the builder wires what happens after submit. */
resultsLabel?: string
/** @deprecated No longer rendered: the builder wires what happens after submit. */
href?: string
/** @deprecated No longer rendered: the builder wires what happens after submit. */
resultsHref?: string
/** Retained for compatibility; decorative textures are no longer rendered. */
paper?: string
/** Retained for compatibility; decorative stamps are no longer rendered. */
stamp?: string
headingLevel?: 'h2' | 'h3'
/** "success" is accepted for older callers and renders as default. */
state?: ResultsGate6State
/** Receives validated values. A returned promise shows the loading label; a rejection shows the error banner. */
onSubmit?: (values: ResultsLedgerValues) => void | Promise<void>
className?: string
style?: React.CSSProperties
}
export function ResultsGate6({
headline = 'Your results are ready',
highlight = 'results are ready',
lead = 'Enter your details to see your result and what to do next.',
statementTitle = 'Your results summary',
statementNote = 'Based on your quiz answers',
lines = DEFAULT_LINES,
sealedLabel = 'Locked',
sealedHint = 'until you enter your details',
statusLabel = 'Status',
statusValue = 'Ready to unlock',
totalLabel = 'Report access',
totalValue = 'Free',
firstNameLabel = 'First name',
firstNamePlaceholder = 'Your first name',
emailLabel = 'Email address',
emailPlaceholder = 'you@example.com',
label = 'See My Results',
loadingLabel = 'Unlocking…',
privacy = 'Get your results plus helpful emails. Unsubscribe anytime.',
nameError = 'Please enter your first name.',
emailError = 'Please enter a valid email address.',
error = 'We couldn’t unlock your results. Please try again.',
headingLevel = 'h2',
state = 'default',
onSubmit,
className,
style,
}: ResultsGate6Props) {
const uid = React.useId()
const ids = {
title: `${uid}-title`, ledger: `${uid}-ledger`, name: `${uid}-name`,
email: `${uid}-email`, nameErr: `${uid}-name-error`, emailErr: `${uid}-email-error`,
privacy: `${uid}-privacy`,
}
const [values, setValues] = React.useState<ResultsLedgerValues>({ firstName: '', email: '' })
const [errors, setErrors] = React.useState<Partial<Record<keyof ResultsLedgerValues, string>>>({})
const [dirty, setDirty] = React.useState(false)
const [phase, setPhase] = React.useState<'idle' | 'loading'>('idle')
const [failed, setFailed] = React.useState(false)
const submitting = React.useRef(false)
const nameRef = React.useRef<HTMLInputElement>(null)
const emailRef = React.useRef<HTMLInputElement>(null)
const disabled = state === 'disabled'
const loading = phase === 'loading'
const forcedError = state === 'error' && !dirty
const nameErr = errors.firstName ?? (forcedError ? nameError : undefined)
const emailErr = errors.email ?? (forcedError ? emailError : undefined)
const force = !loading && (state === 'hover' || state === 'active') ? state : undefined
const H = headingLevel
const update = (key: keyof ResultsLedgerValues) => (event: React.ChangeEvent<HTMLInputElement>) => {
const value = event.target.value
setDirty(true)
setFailed(false)
setValues(previous => ({ ...previous, [key]: value }))
setErrors(previous => ({ ...previous, [key]: undefined }))
}
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
if (disabled || submitting.current) return
setDirty(true)
const next: Partial<Record<keyof ResultsLedgerValues, string>> = {}
if (!values.firstName.trim()) next.firstName = nameError
if (!EMAIL.test(values.email.trim())) next.email = emailError
setErrors(next)
setFailed(false)
if (next.firstName) { nameRef.current?.focus(); return }
if (next.email) { emailRef.current?.focus(); return }
submitting.current = true
try {
const result = onSubmit?.({ firstName: values.firstName.trim(), email: values.email.trim() })
if (result) {
setPhase('loading')
await result
}
} catch {
setFailed(true)
} finally {
submitting.current = false
setPhase('idle')
}
}
return (
<div className={['cf-results-gate-6', className].filter(Boolean).join(' ')} style={style}>
<style>{CSS}</style>
<div className='rgl-card'>
<header className='rgl-head'>
<H id={ids.title} className='rgl-title'>{emphasized(headline, highlight)}</H>
{lead ? <p className='rgl-lead'>{lead}</p> : null}
</header>
<div className='rgl-body'>
<div className='rgl-ledger' role='group' aria-labelledby={ids.ledger}>
<div className='rgl-lhead'>
<p id={ids.ledger} className='rgl-ltitle'>{statementTitle}</p>
{statementNote ? <p className='rgl-lnote'>{statementNote}</p> : null}
</div>
<ul className='rgl-lines'>
{lines.map((line, index) => (
<li key={`${line.label}-${index}`} className='rgl-line'>
<span className='rgl-lname'>{line.label}</span>
{line.sealed ? (
<span className='rgl-line-state'>
<Lock aria-hidden='true' />
<span>{sealedLabel}<span className='rgl-sr'> {sealedHint}</span></span>
</span>
) : line.value ? <span className='rgl-line-state'>{line.value}</span> : null}
</li>
))}
</ul>
{(statusLabel || totalLabel || totalValue) ? (
<div className='rgl-ledger-foot'>
{statusLabel ? <p className='rgl-sub'><span>{statusLabel}</span><strong>{statusValue}</strong></p> : null}
{(totalLabel || totalValue) ? <p className='rgl-total'><span>{totalLabel}</span><strong>{totalValue}</strong></p> : null}
</div>
) : null}
</div>
<div className='rgl-reply'>
<>
<form className='rgl-form' noValidate onSubmit={handleSubmit} aria-labelledby={ids.title} aria-describedby={privacy ? ids.privacy : undefined} aria-busy={loading || undefined}>
<fieldset className='rgl-fs' disabled={disabled}>
<legend className='rgl-sr'>{headline}</legend>
{failed ? <p className='rgl-banner' role='alert'><AlertCircle aria-hidden='true' /><span>{error}</span></p> : null}
<div className='rgl-field'>
<label htmlFor={ids.name}>{firstNameLabel}</label>
<div className='rgl-iw'>
<User aria-hidden='true' />
<input ref={nameRef} id={ids.name} name='firstName' type='text' required autoComplete='given-name' className='rgl-input' placeholder={firstNamePlaceholder} value={values.firstName} onChange={update('firstName')} readOnly={loading} aria-invalid={nameErr ? true : undefined} aria-describedby={nameErr ? ids.nameErr : undefined} />
</div>
{nameErr ? <p id={ids.nameErr} className='rgl-ferr' role='alert'><AlertCircle aria-hidden='true' /><span>{nameErr}</span></p> : null}
</div>
<div className='rgl-field'>
<label htmlFor={ids.email}>{emailLabel}</label>
<div className='rgl-iw'>
<Mail aria-hidden='true' />
<input ref={emailRef} id={ids.email} name='email' type='email' required inputMode='email' autoComplete='email' autoCapitalize='none' spellCheck={false} className='rgl-input' placeholder={emailPlaceholder} value={values.email} onChange={update('email')} readOnly={loading} aria-invalid={emailErr ? true : undefined} aria-describedby={emailErr ? ids.emailErr : undefined} />
</div>
{emailErr ? <p id={ids.emailErr} className='rgl-ferr' role='alert'><AlertCircle aria-hidden='true' /><span>{emailErr}</span></p> : null}
</div>
<button type='submit' className='rgl-btn' data-force={force} disabled={disabled || loading} aria-busy={loading || undefined}>
{loading ? <Loader2 className='rgl-spin' aria-hidden='true' /> : null}
<span>{loading ? loadingLabel : label}</span>
</button>
</fieldset>
</form>
{privacy ? <p id={ids.privacy} className='rgl-privacy'>{privacy}</p> : null}
</>
</div>
</div>
</div>
</div>
)
}
export default ResultsGate6
/** "success" is accepted for older callers and renders as default. */
export type ResultsGate6State = 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
export type ResultsLedgerValues = { firstName: string; email: string }
export type ResultsLedgerLine = { label: string; value?: string; sealed?: boolean }
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/
const DEFAULT_LINES: ResultsLedgerLine[] = [
{ label: 'Quiz answers', value: 'Received' },
{ label: 'Your result', sealed: true },
{ label: 'What it means for you', sealed: true },
{ label: 'Your next steps', sealed: true },
]
const CSS = `
.cf-results-gate-6{--rgl-cta:var(--cta,#d92d20);--rgl-cta2:var(--cta-2,#b42318);--rgl-cta-ink:var(--cta-ink,#fff);--rgl-ink:var(--ink,#101828);--rgl-muted:var(--muted,#4a5565);--rgl-accent:var(--accent,#0f5fc2);--rgl-card:var(--card,#fff);--rgl-field:var(--field,#fff);--rgl-field-ink:var(--field-ink,#101828);--rgl-line:oklch(from var(--ink) l c h / 0.15);--rgl-accent-ink:color-mix(in oklch,var(--rgl-ink) 75%,var(--rgl-accent));position:relative;container:rgl / inline-size;width:100%;max-width:1000px;margin-inline:auto;color:var(--rgl-ink);font-family:var(--font-body,Arial,sans-serif);line-height:1.5;-webkit-font-smoothing:antialiased;--rgl-radius:var(--card-radius,var(--radius));--rgl-soft:var(--card);}
.cf-results-gate-6 *,.cf-results-gate-6 *::before,.cf-results-gate-6 *::after{box-sizing:border-box}
:where(.cf-results-gate-6) .rgl-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);border:0;white-space:normal;}
:where(.cf-results-gate-6) .rgl-card{padding:clamp(24px,4.5vw,48px);border:1px solid var(--rgl-line);background:var(--card);border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius));box-shadow:var(--card-shadow, var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));}
:where(.cf-results-gate-6) .rgl-head{margin-bottom:36px;text-align:center}
:where(.cf-results-gate-6) .rgl-title{margin:0 auto;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(2.25rem,5.2vw,3.65rem);line-height:1.08;text-wrap:balance;overflow-wrap:anywhere;color:var(--rgl-ink);font-weight:var(--display-weight,900);letter-spacing:var(--display-tracking,-.04em);text-transform:var(--display-case,none);}
:where(.cf-results-gate-6) .rgl-emphasis{color:var(--rgl-accent-ink)}
:where(.cf-results-gate-6) .rgl-lead{max-width:48ch;margin:20px auto 0;font-size:19px;font-weight:500;line-height:1.55;color:var(--rgl-muted);text-wrap:pretty}
:where(.cf-results-gate-6) .rgl-body{display:grid;grid-template-columns:minmax(0,.96fr) minmax(0,1fr);gap:36px;align-items:start}
:where(.cf-results-gate-6) .rgl-ledger{min-width:0;border:1px solid var(--rgl-line);background:var(--card);border-color:var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius));}
:where(.cf-results-gate-6) .rgl-lhead{padding:23px 22px 21px;background:var(--rgl-soft);border-bottom:1px solid var(--rgl-line);border-radius:11px 11px 0 0}
:where(.cf-results-gate-6) .rgl-ltitle{margin:0;font-family:var(--font-display,Arial,sans-serif);font-size:25px;line-height:1.2;color:var(--rgl-ink);text-wrap:balance;overflow-wrap:anywhere;font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);}
:where(.cf-results-gate-6) .rgl-lnote{margin:12px 0 0;font-size:16px;font-weight:500;line-height:1.5;color:var(--rgl-muted);text-wrap:pretty}
:where(.cf-results-gate-6) .rgl-lines{list-style:none;margin:0;padding:0 22px}
:where(.cf-results-gate-6) .rgl-line{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 14px;padding:18px 0;border-bottom:1px solid oklch(from var(--ink) l c h / 0.14)}
:where(.cf-results-gate-6) .rgl-line:last-child{border-bottom:0}
:where(.cf-results-gate-6) .rgl-lname{flex:1 1 145px;min-width:0;font-size:17px;font-weight:700;line-height:1.4;color:var(--rgl-ink);text-wrap:pretty;overflow-wrap:anywhere}
:where(.cf-results-gate-6) .rgl-line-state{display:inline-flex;align-items:center;gap:6px;max-width:100%;font-size:14px;font-weight:600;line-height:1.45;color:var(--rgl-muted);overflow-wrap:anywhere}
:where(.cf-results-gate-6) .rgl-line-state svg{width:14px;height:14px;flex:none}
:where(.cf-results-gate-6) .rgl-ledger-foot{margin:5px 10px 10px;padding:16px 12px;border:1px solid oklch(from var(--ink) l c h / 0.08);background:color-mix(in oklch,var(--ink) 4%,var(--card));border-radius:var(--card-radius,var(--radius));}
:where(.cf-results-gate-6) .rgl-sub,:where(.cf-results-gate-6) .rgl-total{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 16px;margin:0;font-size:14px;line-height:1.5;color:var(--rgl-muted)}
:where(.cf-results-gate-6) .rgl-sub strong{font-weight:700;color:var(--rgl-ink);text-wrap:pretty}
:where(.cf-results-gate-6) .rgl-total{margin-top:12px;font-size:16px;color:var(--rgl-accent-ink)}
:where(.cf-results-gate-6) .rgl-total strong{font-family:var(--font-display,Arial,sans-serif);font-size:23px;font-weight:800;line-height:1.2;letter-spacing:-.02em;overflow-wrap:anywhere}
:where(.cf-results-gate-6) .rgl-reply,:where(.cf-results-gate-6) .rgl-field{min-width:0}
:where(.cf-results-gate-6) .rgl-form{margin:0}
:where(.cf-results-gate-6) .rgl-fs{display:grid;gap:22px;min-width:0;margin:0;padding:0;border:0}
:where(.cf-results-gate-6) .rgl-field>label{display:block;margin-bottom:10px;font-size:20px;font-weight:800;line-height:1.3;color:var(--label-ink,var(--ink));}
:where(.cf-results-gate-6) .rgl-iw{position:relative}
:where(.cf-results-gate-6) .rgl-iw>svg{position:absolute;left:17px;top:50%;width:20px;height:20px;transform:translateY(-50%);color:color-mix(in oklch,var(--rgl-field-ink) 70%,var(--rgl-field));pointer-events:none}
:where(.cf-results-gate-6) .rgl-input{display:block;width:100%;min-width:0;min-height:62px;margin:0;padding:16px 16px 16px 49px;font:inherit;font-size:18px;font-weight:500;line-height:1.4;color:var(--rgl-field-ink);background:var(--rgl-field);border:1.5px solid oklch(from var(--field-ink,var(--ink)) l c h / 0.38);transition:border-color .16s ease,box-shadow .16s ease;appearance:none;border-color:var(--field-border,oklch(from var(--ink) l c h / 0.22));border-radius:var(--field-radius,var(--radius));box-shadow:inset 0 2px 3px oklch(from var(--card) calc(l - 0.12) c h / 0.35);}
:where(.cf-results-gate-6) .rgl-input::placeholder{color:color-mix(in oklch, var(--field-ink) 65%, var(--field));opacity:1}
:where(.cf-results-gate-6) .rgl-input:hover:not(:disabled){border-color:oklch(from var(--field-ink,var(--ink)) l c h / 0.6)}
:where(.cf-results-gate-6) .rgl-input:focus{outline-offset:3px;outline:2px solid var(--field-focus,var(--accent));border-color:var(--field-focus,var(--accent));}
:where(.cf-results-gate-6) .rgl-input[aria-invalid=true],:where(.cf-results-gate-6) .rgl-input[aria-invalid=true]:hover{border-color:var(--danger)}
:where(.cf-results-gate-6) .rgl-input[aria-invalid=true]:focus{outline-color:var(--danger)}
:where(.cf-results-gate-6) .rgl-input:disabled{cursor:not-allowed;background:var(--field);}
:where(.cf-results-gate-6) .rgl-ferr{display:flex;align-items:flex-start;gap:7px;margin:9px 0 0;font-size:15px;font-weight:600;line-height:1.45;text-wrap:pretty;color:var(--danger);}
:where(.cf-results-gate-6) .rgl-ferr svg{width:17px;height:17px;flex:none;margin-top:2px}
:where(.cf-results-gate-6) .rgl-banner{display:flex;align-items:flex-start;gap:10px;margin:0;padding:14px 16px;font-size:16px;font-weight:600;line-height:1.5;border:1px solid var(--danger);text-wrap:pretty;background:var(--danger-soft);border-color:var(--danger);border-radius:var(--card-radius,var(--radius));color:var(--danger);}
:where(.cf-results-gate-6) .rgl-banner svg{width:20px;height:20px;flex:none;margin-top:2px}
:where(.cf-results-gate-6) .rgl-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:68px;margin:4px 0 0;padding:17px 16px;letter-spacing:-.02em;text-decoration:none;text-align:center;text-shadow:var(--button-text-shadow, 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h / 0.75));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease;background:linear-gradient(180deg in oklch,var(--button-bg,var(--cta)),var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h)));color:var(--button-ink,var(--cta-ink));border-color:var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h));border-radius:var(--button-radius,var(--radius));font:var(--button-weight,800) 24px/1.25 var(--button-font,var(--font-body));text-transform:var(--button-case,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),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)));border:1px solid var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h));}
:where(.cf-results-gate-6) .rgl-btn>span{min-width:0;overflow-wrap:anywhere;text-wrap:balance}
:where(.cf-results-gate-6) .rgl-btn:not(:disabled):hover,:where(.cf-results-gate-6) .rgl-btn[data-force=hover]{transform:translateY(-2px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));}
:where(.cf-results-gate-6) .rgl-btn:not(:disabled):active,:where(.cf-results-gate-6) .rgl-btn[data-force=active]{transform:translateY(3px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));}
:where(.cf-results-gate-6) .rgl-btn:focus-visible{outline:3px solid var(--rgl-accent);outline-offset:5px}
:where(.cf-results-gate-6) .rgl-btn:disabled{cursor:not-allowed;transform:none;text-shadow:none;background:var(--button-2-bg,var(--card));color:var(--button-2-ink,var(--ink));border-color:var(--button-2-border,oklch(from var(--ink) l c h / 0.22));border-radius:var(--button-radius,var(--radius));box-shadow:var(--button-shadow,none);}
:where(.cf-results-gate-6) .rgl-btn[aria-busy=true]:disabled{cursor:progress;background:linear-gradient(180deg in oklch,var(--button-bg,var(--cta)),var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h)));color:var(--button-ink,var(--cta-ink));border-color:var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));}
:where(.cf-results-gate-6) .rgl-spin{width:22px;height:22px;flex:none;animation:rgl-spin .8s linear infinite}
:where(.cf-results-gate-6) .rgl-privacy{margin:22px auto 0;max-width:43ch;font-size:14px;font-weight:500;line-height:1.6;color:var(--rgl-muted);text-align:center;text-wrap:pretty;overflow-wrap:anywhere}
@keyframes rgl-spin{to{transform:rotate(360deg)}}
@container rgl (max-width:720px){:where(.cf-results-gate-6) .rgl-card{padding:30px 24px}:where(.cf-results-gate-6) .rgl-body{grid-template-columns:minmax(0,1fr);gap:28px}:where(.cf-results-gate-6) .rgl-head{margin-bottom:28px}:where(.cf-results-gate-6) .rgl-title{font-size:clamp(2.125rem,7.6cqi,3.3rem)}:where(.cf-results-gate-6) .rgl-ledger{max-width:100%}:where(.cf-results-gate-6) .rgl-lead{font-size:18px;margin-top:18px}}
@container rgl (max-width:430px){:where(.cf-results-gate-6) .rgl-card{padding:26px 18px}:where(.cf-results-gate-6) .rgl-lhead{padding:20px 16px}:where(.cf-results-gate-6) .rgl-ltitle{font-size:23px}:where(.cf-results-gate-6) .rgl-lines{padding-inline:16px}:where(.cf-results-gate-6) .rgl-line{padding-block:15px;gap:8px 12px}:where(.cf-results-gate-6) .rgl-lname{font-size:16px;flex-basis:130px}:where(.cf-results-gate-6) .rgl-ledger-foot{padding:14px 12px}:where(.cf-results-gate-6) .rgl-btn{font-size:22px;min-height:64px}:where(.cf-results-gate-6) .rgl-fs{gap:20px}}
@media(max-width:760px){:where(.cf-results-gate-6) .rgl-body{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){.cf-results-gate-6 *,.cf-results-gate-6 *::before,.cf-results-gate-6 *::after{animation:none!important;transition:none!important}:where(.cf-results-gate-6) .rgl-btn:not(:disabled):hover,:where(.cf-results-gate-6) .rgl-btn[data-force=hover],:where(.cf-results-gate-6) .rgl-btn:not(:disabled):active,:where(.cf-results-gate-6) .rgl-btn[data-force=active]{transform:none!important}}
`
function emphasized(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text
const index = text.indexOf(phrase)
if (index < 0) return text
return <>{text.slice(0, index)}<span className='rgl-emphasis'>{phrase}</span>{text.slice(index + phrase.length)}</>
}
export { ResultsGate6 as ResultsLedgerGate }
export type ResultsLedgerGateProps = ResultsGate6Props
export type ResultsLedgerState = ResultsGate6State
pieces/forms/results-gate-6/specimen.tsx 23 lines
import * as React from 'react'
import ResultsGate6, { type ResultsGate6State } from '../results-gate-6'
import defaults from '../../studio-defaults.json'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function ResultsGate6Specimen({ state = 'default' }: { state?: ResultsGate6State }) {
const sample = defaults.sample
return (
<ResultsGate6
key={state}
state={state}
headline='Your results are ready'
lead='Enter your details to see your result and what to do next.'
statementTitle='Your funnel results'
statementNote='Based on your quiz answers'
totalLabel='Report access'
totalValue='Free'
label='See My Results'
privacy={`Get your results and emails about ${sample.name}. ${sample.registration.privacy}`}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalResultsGate6 |
string |
Default 'Your results are ready'
|
highlight OptionalResultsGate6 |
string |
Default 'results are ready'
|
lead OptionalResultsGate6 |
string |
Default 'Enter your details to see your result and what to do next.'
|
statementTitle OptionalResultsGate6 |
string |
Default 'Your results summary'
|
statementNote OptionalResultsGate6 |
string |
Default 'Based on your quiz answers'
|
lines OptionalResultsGate6 |
ResultsLedgerLine[] |
Default DEFAULT_LINES
|
sealedLabel OptionalResultsGate6 |
string |
Default 'Locked'
|
sealedHint OptionalResultsGate6 |
string |
Default 'until you enter your details'
|
unlockedLabel OptionalResultsGate6 |
string |
|
statusLabel OptionalResultsGate6 |
string |
Default 'Status'
|
statusValue OptionalResultsGate6 |
string |
Default 'Ready to unlock'
|
statusSuccess OptionalResultsGate6 |
string |
|
totalLabel OptionalResultsGate6 |
string |
Default 'Report access'
|
totalValue OptionalResultsGate6 |
string |
Default 'Free'
|
firstNameLabel OptionalResultsGate6 |
string |
Default 'First name'
|
firstNamePlaceholder OptionalResultsGate6 |
string |
Default 'Your first name'
|
emailLabel OptionalResultsGate6 |
string |
Default 'Email address'
|
emailPlaceholder OptionalResultsGate6 |
string |
Default 'you@example.com'
|
label OptionalResultsGate6 |
string |
Default 'See My Results'
|
loadingLabel OptionalResultsGate6 |
string |
Default 'Unlocking…'
|
privacy OptionalResultsGate6 |
string |
Default 'Get your results plus helpful emails. Unsubscribe anytime.'
|
nameError OptionalResultsGate6 |
string |
Default 'Please enter your first name.'
|
emailError OptionalResultsGate6 |
string |
Default 'Please enter a valid email address.'
|
error OptionalResultsGate6 |
string |
Default 'We couldn’t unlock your results. Please try again.'
|
greetingTemplate OptionalResultsGate6 |
string |
|
successTitle OptionalResultsGate6 |
string |
|
success OptionalResultsGate6 |
string |
|
resultsLabel OptionalResultsGate6 |
string |
|
href OptionalResultsGate6 |
string |
|
resultsHref OptionalResultsGate6 |
string |
|
paper OptionalResultsGate6 |
string |
|
stamp OptionalResultsGate6 |
string |
|
headingLevel OptionalResultsGate6 |
'h2' | 'h3' |
Default 'h2'
|
state OptionalResultsGate6 |
ResultsGate6State |
Default 'default'
|
onSubmit OptionalResultsGate6 |
(values: ResultsLedgerValues) => void | Promise<void> |
|
className OptionalResultsGate6 |
string |
|
style OptionalResultsGate6 |
React.CSSProperties |
|
headline OptionalResultsLedgerGate |
string |
|
highlight OptionalResultsLedgerGate |
string |
|
lead OptionalResultsLedgerGate |
string |
|
statementTitle OptionalResultsLedgerGate |
string |
|
statementNote OptionalResultsLedgerGate |
string |
|
lines OptionalResultsLedgerGate |
ResultsLedgerLine[] |
|
sealedLabel OptionalResultsLedgerGate |
string |
|
sealedHint OptionalResultsLedgerGate |
string |
|
unlockedLabel OptionalResultsLedgerGate |
string |
|
statusLabel OptionalResultsLedgerGate |
string |
|
statusValue OptionalResultsLedgerGate |
string |
|
statusSuccess OptionalResultsLedgerGate |
string |
|
totalLabel OptionalResultsLedgerGate |
string |
|
totalValue OptionalResultsLedgerGate |
string |
|
firstNameLabel OptionalResultsLedgerGate |
string |
|
firstNamePlaceholder OptionalResultsLedgerGate |
string |
|
emailLabel OptionalResultsLedgerGate |
string |
|
emailPlaceholder OptionalResultsLedgerGate |
string |
|
label OptionalResultsLedgerGate |
string |
|
loadingLabel OptionalResultsLedgerGate |
string |
|
privacy OptionalResultsLedgerGate |
string |
|
nameError OptionalResultsLedgerGate |
string |
|
emailError OptionalResultsLedgerGate |
string |
|
error OptionalResultsLedgerGate |
string |
|
greetingTemplate OptionalResultsLedgerGate |
string |
|
successTitle OptionalResultsLedgerGate |
string |
|
success OptionalResultsLedgerGate |
string |
|
resultsLabel OptionalResultsLedgerGate |
string |
|
href OptionalResultsLedgerGate |
string |
|
resultsHref OptionalResultsLedgerGate |
string |
|
paper OptionalResultsLedgerGate |
string |
|
stamp OptionalResultsLedgerGate |
string |
|
headingLevel OptionalResultsLedgerGate |
'h2' | 'h3' |
|
state OptionalResultsLedgerGate |
ResultsGate6State |
|
onSubmit OptionalResultsLedgerGate |
(values: ResultsLedgerValues) => void | Promise<void> |
|
className OptionalResultsLedgerGate |
string |
|
style OptionalResultsLedgerGate |
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.
--button-2-bg--button-2-border--button-2-ink- 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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB