Waitlist Opt-in 2
Waitlist hero built on the new-opportunity split: the old way in muted type, the new way on the coloured field, and a waitlist receipt across the seam whose one-tap wish travels with the email, so every signup also segments the list.
Use it in a prompt
Use hero/waitlist-optin-2 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/hero/waitlist-optin-2.tsx. - Import it and pass your copy and images (Props tab):
import { WaitlistOptin2 } from "@/components/funneldna/hero/waitlist-optin-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/waitlist-optin-2/component.tsx 526 lines
// layout: ledger-receipt
// Waitlist hero built on the new-opportunity split: the old way in muted type, the new way on the coloured field, and a waitlist receipt across the seam whose one-tap wish travels with the email, so every signup also segments the list.
import * as React from 'react'
import { Check, CircleAlert, Loader2, LockKeyhole, Mail } from 'lucide-react'
import { FX_HOST, Pattern } from '../fx/fx'
export type WaitlistOptin2Row = {
label: React.ReactNode // a string may use {product}
value: React.ReactNode
}
export type WaitlistOptin2Point = {
lead: string // bold lead-in phrase
text: React.ReactNode // a string may use {product}
}
export type WaitlistOptin2State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type WaitlistOptin2Values = { email: string; wish?: string }
export type WaitlistOptin2Props = {
productName?: string
headline?: string // the one promise
highlight?: string // phrase inside the headline that gets the marker stroke
points?: WaitlistOptin2Point[] // short paragraphs under the headline, each with a bold lead-in
oldLabel?: string // accessible name of the old-way column
oldTitle?: React.ReactNode
oldRows?: WaitlistOptin2Row[] // the old way as a ledger; values are struck through
ask?: string // the wish question above the chips
askHint?: string
wishes?: string[] // up to three one-tap choices; an empty list hides the chip row
defaultWish?: string
perks?: WaitlistOptin2Row[] // what members get
launchPriceLabel?: string
launchPrice?: string // shown only when supplied; never invented
launchPriceNote?: string // one short line under the price label, only if true
wishRowLabel?: string
wishRowEmpty?: string // ledger value before a wish is picked
totalLabel?: string
totalValue?: string
emailLabel?: string
emailPlaceholder?: string
label?: string // button label
loadingLabel?: string // button label while onSubmit's promise is pending
note?: string // one reassurance line under the button
invalidEmail?: string
submitError?: string // shown when onSubmit's promise rejects
validLabel?: string // accessible name of the valid-email badge
phoneImage?: string // slot product: phone mockup of the app, transparent background
phoneImageAlt?: string // a string may use {product}
caption?: React.ReactNode
defaultEmail?: string
onSubmit?: (values: WaitlistOptin2Values) => void | Promise<void>
state?: WaitlistOptin2State
className?: string
}
export function WaitlistOptin2(props: WaitlistOptin2Props) {
const {
productName = 'Tallywise',
headline = 'Finally know what’s safe to spend.',
highlight = 'safe to spend',
points = DEFAULT_POINTS,
oldLabel = 'The old way',
oldTitle = 'Spreadsheets on Sunday. Guesswork all month.',
oldRows = DEFAULT_OLD_ROWS,
ask = 'What do you want most?',
askHint = 'Optional. One tap tells us what to show you first.',
wishes = DEFAULT_WISHES,
defaultWish = '',
perks = DEFAULT_PERKS,
launchPriceLabel = 'Founding price',
launchPrice,
launchPriceNote,
wishRowLabel = 'We’ll show you first',
wishRowEmpty = 'Tap a wish above',
totalLabel = 'Your cost to join',
totalValue = 'Free',
emailLabel = 'Email address',
emailPlaceholder = 'you@example.com',
label = 'Save my early spot',
loadingLabel = 'Saving your spot…',
note = 'Free to join · Unsubscribe anytime',
invalidEmail = 'Enter a valid email, like you@example.com.',
submitError = 'We couldn’t save your spot just now. Please try again.',
validLabel = 'Email looks good',
phoneImage,
phoneImageAlt = '{product} app open on a phone',
caption,
defaultEmail = '',
onSubmit,
state = 'default',
className,
} = props
const uid = React.useId()
const titleId = `${uid}-title`
const askId = `${uid}-ask`
const hintId = `${uid}-hint`
const inputId = `${uid}-email`
const msgId = `${uid}-msg`
const noteId = `${uid}-note`
const inputRef = React.useRef<HTMLInputElement>(null)
const mounted = React.useRef(true)
const [email, setEmail] = React.useState(defaultEmail)
const [wish, setWish] = React.useState(defaultWish)
const [touched, setTouched] = React.useState(state === 'error')
const [busy, setBusy] = React.useState(false)
const [failed, setFailed] = React.useState(false)
React.useEffect(() => {
mounted.current = true
return () => {
mounted.current = false
}
}, [])
React.useEffect(() => {
setEmail(defaultEmail)
setWish(defaultWish)
setTouched(state === 'error')
setFailed(false)
}, [state, defaultEmail, defaultWish])
const product = { product: productName }
const disabled = state === 'disabled'
const value = email.trim()
const isValid = EMAIL_PATTERN.test(value)
const showError = touched && !isValid
const blocked = !disabled && showError
const message = showError ? invalidEmail : failed ? submitError : ''
const choices = wishes.filter(Boolean).slice(0, 3)
function handleBlur() {
if (value) setTouched(true)
}
function toggleWish(next: string) {
if (disabled) return
setWish((current) => (current === next ? '' : next))
}
function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
if (disabled || busy) return
setTouched(true)
setFailed(false)
if (!isValid) {
inputRef.current?.focus()
return
}
const result = onSubmit?.({ email: value, wish: wish || undefined })
if (result && typeof (result as Promise<void>).then === 'function') {
setBusy(true)
;(result as Promise<void>).then(
() => {
if (mounted.current) setBusy(false)
},
() => {
if (mounted.current) {
setBusy(false)
setFailed(true)
}
},
)
}
}
const rootClass = ['cf-waitlist-optin-2', phoneImage ? '' : 'is-noimage', className].filter(Boolean).join(' ')
const buttonClass = [
'wo2-btn',
state === 'hover' ? 'is-hover' : '',
state === 'active' ? 'is-active' : '',
blocked ? 'is-blocked' : '',
busy ? 'is-busy' : '',
]
.filter(Boolean)
.join(' ')
const fieldClass = ['wo2-field', showError ? 'is-error' : '', isValid ? 'is-valid' : ''].filter(Boolean).join(' ')
const describedBy = [message ? msgId : '', note ? noteId : ''].filter(Boolean).join(' ') || undefined
return (
<section className={rootClass} style={FX_HOST} aria-labelledby={titleId} data-state={state}>
<style>{CSS}</style>
<div className='wo2-layer wo2-gridfx' aria-hidden='true'>
<Pattern name='grid' fade='edges' />
</div>
<div className='wo2-layer wo2-colour' aria-hidden='true' />
<div className='wo2-layer wo2-seam' aria-hidden='true' />
<div className='wo2-inner'>
<header className='wo2-new'>
<h1 id={titleId} className='wo2-h1 wo2-rise'>
{withMark(headline, highlight)}
</h1>
{points.length > 0 && (
<div className='wo2-points'>
{points.map((point, index) => (
<p key={`${point.lead}-${index}`} className='wo2-rise' style={{ '--i': Math.min(index + 1, 4) } as React.CSSProperties}>
<strong>{point.lead}</strong> {fillNode(point.text, product)}
</p>
))}
</div>
)}
</header>
{(oldTitle || oldRows.length > 0) && (
<aside className='wo2-old wo2-rise' aria-label={oldLabel} style={{ '--i': 1 } as React.CSSProperties}>
{oldTitle && <p className='wo2-old-title'>{oldTitle}</p>}
{oldRows.length > 0 && (
<dl className='wo2-rows'>
{oldRows.map((row, index) => (
<div className='wo2-row' key={index}>
<dt>{fillNode(row.label, product)}</dt>
<span className='wo2-leader' aria-hidden='true' />
<dd>{row.value}</dd>
</div>
))}
</dl>
)}
</aside>
)}
<form className='wo2-card wo2-rise' noValidate onSubmit={handleSubmit} style={{ '--i': 3 } as React.CSSProperties}>
{choices.length > 0 && (
<div className='wo2-wish' role='group' aria-labelledby={askId} aria-describedby={askHint ? hintId : undefined}>
<h2 id={askId} className='wo2-ask'>
{ask}
</h2>
{askHint && (
<p id={hintId} className='wo2-hint'>
{askHint}
</p>
)}
<div className='wo2-chips'>
{choices.map((choice) => {
const on = wish === choice
return (
<button
key={choice}
type='button'
className='wo2-chip'
aria-pressed={on}
disabled={disabled}
onClick={() => toggleWish(choice)}
>
<span className='wo2-dot' aria-hidden='true'>
{on && <Check size={16} strokeWidth={3} />}
</span>
{choice}
</button>
)
})}
</div>
</div>
)}
<dl className='wo2-rows wo2-ledger'>
{perks.map((row, index) => (
<div className='wo2-row' key={index}>
<dt>{fillNode(row.label, product)}</dt>
<span className='wo2-leader' aria-hidden='true' />
<dd>{row.value}</dd>
</div>
))}
{launchPrice && (
<div className='wo2-row'>
<dt>
{launchPriceLabel}
{launchPriceNote && <span className='wo2-dt-note'>{launchPriceNote}</span>}
</dt>
<span className='wo2-leader' aria-hidden='true' />
<dd className='wo2-price'>{launchPrice}</dd>
</div>
)}
{choices.length > 0 && (
<div className='wo2-row'>
<dt>{wishRowLabel}</dt>
<span className='wo2-leader' aria-hidden='true' />
<dd className={wish ? 'wo2-wish-value' : 'wo2-wish-value is-empty'} aria-live='polite'>
<span key={wish || 'none'} className='wo2-swap'>
{wish || wishRowEmpty}
</span>
</dd>
</div>
)}
<div className='wo2-row wo2-total'>
<dt>{totalLabel}</dt>
<span className='wo2-leader' aria-hidden='true' />
<dd>{totalValue}</dd>
</div>
</dl>
<div className='wo2-action'>
<label className='wo2-label' htmlFor={inputId}>
{emailLabel}
</label>
<div className='wo2-form-row'>
<div className={fieldClass}>
<Mail className='wo2-field-icon' size={20} strokeWidth={2.5} aria-hidden='true' />
<input
ref={inputRef}
id={inputId}
className='wo2-input'
type='email'
name='email'
autoComplete='email'
inputMode='email'
placeholder={emailPlaceholder}
value={email}
disabled={disabled}
aria-invalid={showError || undefined}
aria-describedby={describedBy}
onChange={(event) => {
setEmail(event.target.value)
if (failed) setFailed(false)
}}
onBlur={handleBlur}
/>
{isValid && (
<span className='wo2-valid' role='img' aria-label={validLabel}>
<Check size={16} strokeWidth={3} aria-hidden='true' />
</span>
)}
</div>
<button type='submit' className={buttonClass} disabled={disabled} aria-disabled={blocked || busy ? true : undefined}>
{busy && <Loader2 className='wo2-spin' size={20} strokeWidth={2.5} aria-hidden='true' />}
<span>{busy ? loadingLabel : label}</span>
</button>
</div>
{message && (
<p id={msgId} className='wo2-msg' role='alert'>
<CircleAlert className='wo2-inline-icon' size={18} strokeWidth={2.5} aria-hidden='true' />
{message}
</p>
)}
{note && (
<p id={noteId} className='wo2-note'>
<LockKeyhole className='wo2-inline-icon' size={16} strokeWidth={2.5} aria-hidden='true' />
{note}
</p>
)}
</div>
</form>
{phoneImage && (
<figure className='wo2-phone wo2-rise' style={{ '--i': 4 } as React.CSSProperties}>
<img src={phoneImage} alt={fill(phoneImageAlt, product)} width={640} height={640} decoding='async' />
{caption && <figcaption>{caption}</figcaption>}
</figure>
)}
</div>
</section>
)
}
export default WaitlistOptin2
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/
const DEFAULT_POINTS: WaitlistOptin2Point[] = [
{
lead: 'One number, every morning.',
text: '{product} counts what’s come in, what’s due and what tax needs, then shows what’s left to spend.',
},
{ lead: 'Made for lumpy income.', text: 'Big month or slow month, you get the same clear answer.' },
]
const DEFAULT_OLD_ROWS: WaitlistOptin2Row[] = [
{ label: 'What you can spend this week', value: 'a guess' },
{ label: 'Tax money to set aside', value: 'whatever’s left' },
{ label: 'Your Sunday night', value: 'the spreadsheet' },
]
const DEFAULT_WISHES = ['Know my tax set-aside', 'Smooth out slow months', 'Ditch the spreadsheet']
const DEFAULT_PERKS: WaitlistOptin2Row[] = [
{ label: 'Early access to {product}', value: 'Included' },
{ label: 'Launch news before anyone else', value: 'By email' },
]
function fill(template: string, values: Record<string, string>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => (key in values ? values[key] : match))
}
function fillNode(node: React.ReactNode, values: Record<string, string>) {
return typeof node === 'string' ? fill(node, values) : node
}
function withMark(text: string, phrase?: string) {
if (!phrase) return text
const at = text.indexOf(phrase)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className='wo2-mark'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
const CSS = `
.cf-waitlist-optin-2 {
--wo2-gutter: clamp(16px, 5vw, 48px);
--wo2-pad-top: clamp(56px, 8vw, 112px);
--wo2-pad-bottom: clamp(64px, 8.5vw, 120px);
--wo2-cx: max(var(--wo2-gutter), calc((100% - 1120px) / 2));
--wo2-colour: color-mix(in oklab, var(--band) 90%, var(--accent-fill, var(--accent)));
--wo2-hair: oklch(from var(--ink) l c h / 0.14);
--wo2-shadow: var(--shadow, oklch(0.22 0.03 260));
--wo2-btn-bg: var(--button-bg, var(--cta));
--wo2-btn-bg-2: var(--button-bg-2, var(--cta-2));
position: relative;
isolation: isolate;
overflow: hidden;
padding: var(--wo2-pad-top) 0 var(--wo2-pad-bottom);
background: var(--surface);
color: var(--ink);
font-family: var(--font-body);
}
.cf-waitlist-optin-2 *, .cf-waitlist-optin-2 *::before, .cf-waitlist-optin-2 *::after { box-sizing: border-box; }
.cf-waitlist-optin-2 .wo2-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; display: none; }
.cf-waitlist-optin-2 .wo2-gridfx { clip-path: polygon(0 0, calc(var(--wo2-cx) + 392px) 0, calc(var(--wo2-cx) + 237px) 100%, 0 100%); }
.cf-waitlist-optin-2 .wo2-colour { background: var(--wo2-colour); clip-path: polygon(calc(var(--wo2-cx) + 404px) 0, 100% 0, 100% 100%, calc(var(--wo2-cx) + 249px) 100%); }
.cf-waitlist-optin-2 .wo2-seam { background: var(--accent-fill, var(--accent)); clip-path: polygon(calc(var(--wo2-cx) + 391px) 0, calc(var(--wo2-cx) + 405px) 0, calc(var(--wo2-cx) + 250px) 100%, calc(var(--wo2-cx) + 236px) 100%); }
.cf-waitlist-optin-2 .wo2-inner { position: relative; z-index: 1; width: min(1120px, calc(100% - 2 * var(--wo2-gutter))); margin-inline: auto; display: flex; flex-direction: column; gap: 40px; }
.cf-waitlist-optin-2 .wo2-new { position: relative; isolation: isolate; padding-bottom: 76px; color: var(--band-ink); background-color: var(--wo2-colour); background-clip: content-box; }
.cf-waitlist-optin-2 .wo2-new::before { content: ''; position: absolute; z-index: -1; top: calc(-1 * var(--wo2-pad-top)); bottom: 0; left: calc(-1 * var(--wo2-gutter)); right: calc(-1 * var(--wo2-gutter)); background: var(--wo2-colour); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 44px), 0 100%); }
.cf-waitlist-optin-2 .wo2-new::after { content: ''; position: absolute; z-index: -1; left: calc(-1 * var(--wo2-gutter)); right: calc(-1 * var(--wo2-gutter)); bottom: -12px; height: 56px; background: var(--accent-fill, var(--accent)); clip-path: polygon(0 44px, 100% 0, 100% 12px, 0 56px); }
.cf-waitlist-optin-2 .wo2-h1 { margin: 0; color: var(--band-ink); 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, 5.4vw, 4.875rem); line-height: 1.04; text-wrap: balance; }
.cf-waitlist-optin-2 .wo2-mark { padding: 0 0.06em; border-radius: 0.08em; background-image: linear-gradient(to bottom, transparent 70%, var(--marker, #fae37c) 70%, var(--marker, #fae37c) 92%, transparent 92%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cf-waitlist-optin-2 .wo2-points { display: grid; gap: 16px; max-width: 36rem; margin-top: 24px; }
.cf-waitlist-optin-2 .wo2-points p { margin: 0; font-size: clamp(1.125rem, 1.5vw, 1.375rem); line-height: 1.4; font-weight: 500; text-wrap: pretty; }
.cf-waitlist-optin-2 .wo2-points strong { font-weight: 800; }
.cf-waitlist-optin-2 .wo2-old-title { margin: 0 0 16px; color: var(--muted); font-family: var(--font-display); font-weight: var(--display-weight, 800); letter-spacing: -0.01em; font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1.15; text-wrap: balance; }
.cf-waitlist-optin-2 .wo2-rows { margin: 0; display: grid; gap: 12px; }
.cf-waitlist-optin-2 .wo2-row { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.4; }
.cf-waitlist-optin-2 .wo2-row dt { flex: 0 1 auto; min-width: 0; text-wrap: pretty; }
.cf-waitlist-optin-2 .wo2-row dd { flex: 0 1 auto; min-width: 0; max-width: 55%; margin: 0; text-align: right; text-wrap: balance; }
.cf-waitlist-optin-2 .wo2-leader { flex: 1 1 16px; min-width: 16px; height: 1px; background: var(--wo2-hair); align-self: baseline; transform: translateY(-0.28em); }
.cf-waitlist-optin-2 .wo2-old .wo2-row dt, .cf-waitlist-optin-2 .wo2-old .wo2-row dd { color: var(--muted); }
.cf-waitlist-optin-2 .wo2-old .wo2-row dd { text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 2px; }
.cf-waitlist-optin-2 .wo2-card { position: relative; display: grid; gap: 24px; width: 100%; 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))); }
.cf-waitlist-optin-2 .wo2-ask { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight, 800); letter-spacing: -0.01em; font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1.15; text-wrap: balance; }
.cf-waitlist-optin-2 .wo2-hint { margin: 8px 0 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.4; font-weight: 500; text-wrap: pretty; }
.cf-waitlist-optin-2 .wo2-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cf-waitlist-optin-2 .wo2-chip { appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0 16px 0 12px; border: 1px solid oklch(from var(--ink) l c h / 0.16); border-radius: 999px; background: color-mix(in oklch, var(--ink) 5%, var(--card)); color: var(--ink); font-family: var(--font-body); font-size: 1rem; font-weight: 700; line-height: 1.2; text-align: left; cursor: pointer; transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease; }
.cf-waitlist-optin-2 .wo2-chip:hover:not(:disabled) { border-color: oklch(from var(--ink) l c h / 0.34); background: color-mix(in oklch, var(--ink) 8%, var(--card)); }
.cf-waitlist-optin-2 .wo2-chip:active:not(:disabled) { transform: translateY(1px); }
.cf-waitlist-optin-2 .wo2-chip:focus-visible { outline: 3px solid oklch(from var(--field-focus, var(--accent)) l c h / 0.55); outline-offset: 2px; }
.cf-waitlist-optin-2 .wo2-chip[aria-pressed='true'] { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 12%, var(--card)); box-shadow: var(--shadow-sm, 0 1px 3px oklch(0.22 0.03 260 / 0.18)); }
.cf-waitlist-optin-2 .wo2-chip:disabled { cursor: not-allowed; }
.cf-waitlist-optin-2 .wo2-dot { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border: 2px solid oklch(from var(--ink) l c h / 0.32); border-radius: 999px; background: var(--card); color: var(--accent-fill-ink, var(--card)); }
.cf-waitlist-optin-2 .wo2-chip[aria-pressed='true'] .wo2-dot { border-color: transparent; background: var(--accent-fill, var(--accent)); animation: wo2-pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cf-waitlist-optin-2 .wo2-ledger .wo2-row dt { color: var(--ink); font-weight: 500; }
.cf-waitlist-optin-2 .wo2-ledger .wo2-row dd { color: var(--ink); font-weight: 700; }
.cf-waitlist-optin-2 .wo2-dt-note { display: block; margin-top: 2px; color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.cf-waitlist-optin-2 .wo2-ledger .wo2-price { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.cf-waitlist-optin-2 .wo2-ledger .wo2-wish-value.is-empty { color: var(--muted); font-weight: 500; }
.cf-waitlist-optin-2 .wo2-swap { display: inline-block; animation: wo2-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cf-waitlist-optin-2 .wo2-ledger .wo2-total { margin-top: 4px; font-size: clamp(1.125rem, 1.5vw, 1.375rem); }
.cf-waitlist-optin-2 .wo2-ledger .wo2-total dt { font-weight: 800; }
.cf-waitlist-optin-2 .wo2-ledger .wo2-total .wo2-leader { height: 2px; background: oklch(from var(--ink) l c h / 0.22); }
.cf-waitlist-optin-2 .wo2-ledger .wo2-total dd { color: var(--success); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; font-size: clamp(1.3125rem, 1.8vw, 1.625rem); line-height: 1.15; }
.cf-waitlist-optin-2 .wo2-action { display: grid; gap: 8px; }
.cf-waitlist-optin-2 .wo2-label { color: var(--label-ink, var(--ink)); font-size: 1rem; font-weight: 700; line-height: 1.3; }
.cf-waitlist-optin-2 .wo2-form-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.cf-waitlist-optin-2 .wo2-field { position: relative; }
.cf-waitlist-optin-2 .wo2-field-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: color-mix(in oklch, var(--field-ink) 60%, var(--field)); pointer-events: none; }
.cf-waitlist-optin-2 .wo2-input { display: block; width: 100%; height: 56px; margin: 0; padding: 0 52px 0 48px; border: 1px solid var(--field-border, color-mix(in oklch, var(--ink) 22%, transparent)); border-radius: var(--field-radius, var(--radius, 12px)); background: var(--field); color: var(--field-ink); font-family: var(--font-body); font-size: 1.0625rem; font-weight: 500; line-height: 1.2; box-shadow: inset 0 1px 2px oklch(from var(--wo2-shadow) l c h / 0.12); transition: border-color 0.16s ease, box-shadow 0.16s ease; }
.cf-waitlist-optin-2 .wo2-input::placeholder { color: color-mix(in oklch, var(--field-ink) 65%, var(--field)); opacity: 1; }
.cf-waitlist-optin-2 .wo2-input: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 / 0.35); }
.cf-waitlist-optin-2 .wo2-field.is-error .wo2-input { border-color: var(--danger); }
.cf-waitlist-optin-2 .wo2-field.is-error .wo2-input:focus { box-shadow: 0 0 0 3px oklch(from var(--danger) l c h / 0.3); }
.cf-waitlist-optin-2 .wo2-input:disabled { cursor: not-allowed; background: color-mix(in oklch, var(--field-ink) 5%, var(--field)); }
.cf-waitlist-optin-2 .wo2-valid { position: absolute; right: 14px; top: 50%; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--success); color: var(--success-ink, #fff); transform: translateY(-50%); animation: wo2-pop 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.cf-waitlist-optin-2 .wo2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; margin: 0; padding: 0 28px; border: 0; border-radius: var(--button-radius, var(--radius, 12px)); background: linear-gradient(oklch(from var(--wo2-btn-bg) calc(l + 0.04) c h), oklch(from var(--wo2-btn-bg-2) calc(l - 0.02) c h)); color: var(--button-ink, var(--cta-ink)); 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; white-space: nowrap; text-shadow: var(--button-text-shadow, none); cursor: pointer; box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--wo2-btn-bg) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--wo2-btn-bg) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--wo2-shadow) l c h / 0.3), 0 8px 16px -6px oklch(from var(--wo2-shadow) l c h / 0.45)); transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease; }
.cf-waitlist-optin-2 .wo2-btn:hover:not(:disabled):not(.is-blocked), .cf-waitlist-optin-2 .wo2-btn.is-hover { background: linear-gradient(oklch(from var(--wo2-btn-bg) calc(l - 0.01) c h), oklch(from var(--wo2-btn-bg-2) calc(l - 0.07) c h)); box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--wo2-btn-bg) calc(l + 0.12) c h / 0.7), inset 0 -3px 0 oklch(from var(--wo2-btn-bg) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--wo2-shadow) l c h / 0.34), 0 10px 18px -6px oklch(from var(--wo2-shadow) l c h / 0.55)); }
.cf-waitlist-optin-2 .wo2-btn:active:not(:disabled):not(.is-blocked), .cf-waitlist-optin-2 .wo2-btn.is-active { transform: translateY(1px); background: linear-gradient(oklch(from var(--wo2-btn-bg) calc(l - 0.06) c h), oklch(from var(--wo2-btn-bg-2) calc(l - 0.08) c h)); box-shadow: inset 0 2px 4px oklch(from var(--wo2-btn-bg) calc(l - 0.24) c h / 0.55), inset 0 -2px 0 oklch(from var(--wo2-btn-bg) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--wo2-shadow) l c h / 0.3); }
.cf-waitlist-optin-2 .wo2-btn:focus-visible { outline: 3px solid var(--field-focus, var(--accent)); outline-offset: 3px; }
.cf-waitlist-optin-2 .wo2-btn.is-blocked, .cf-waitlist-optin-2 .wo2-btn:disabled { transform: none; background: var(--button-2-bg, var(--secondary)); color: var(--button-2-ink, var(--secondary-ink)); text-shadow: none; box-shadow: none; cursor: not-allowed; }
.cf-waitlist-optin-2 .wo2-btn.is-busy { cursor: progress; }
.cf-waitlist-optin-2 .wo2-spin { animation: wo2-spin 0.8s linear infinite; }
.cf-waitlist-optin-2 .wo2-msg { margin: 0; color: var(--danger); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; text-wrap: pretty; }
.cf-waitlist-optin-2 .wo2-note { margin: 4px 0 0; color: var(--muted); font-size: 0.9375rem; font-weight: 500; line-height: 1.4; text-wrap: pretty; }
.cf-waitlist-optin-2 .wo2-inline-icon { display: inline-block; vertical-align: -0.15em; margin-inline-end: 0.4em; }
.cf-waitlist-optin-2 .wo2-phone { display: grid; justify-items: center; gap: 12px; width: min(100%, 320px); margin: 0 auto; }
.cf-waitlist-optin-2 .wo2-phone img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 0; filter: drop-shadow(0 2px 3px oklch(from var(--wo2-shadow) l c h / 0.4)) drop-shadow(0 18px 22px oklch(from var(--wo2-shadow) l c h / 0.32)); }
.cf-waitlist-optin-2 .wo2-phone figcaption { color: var(--muted); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; text-align: center; text-wrap: pretty; }
.cf-waitlist-optin-2 .wo2-rise { animation: wo2-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 0.07s); }
@keyframes wo2-rise { from { opacity: 0.82; transform: translateY(8px); } }
@keyframes wo2-pop { from { transform: scale(0.9); } }
@keyframes wo2-spin { to { transform: rotate(360deg); } }
@media (max-width: 559px) {
.cf-waitlist-optin-2 .wo2-form-row { grid-template-columns: minmax(0, 1fr); }
.cf-waitlist-optin-2 .wo2-btn { width: 100%; }
}
@media (min-width: 1080px) {
.cf-waitlist-optin-2 .wo2-layer { display: block; }
.cf-waitlist-optin-2 .wo2-inner { display: grid; grid-template-columns: 300px 140px minmax(0, 1fr) 320px; grid-template-areas: 'old . new new' 'card card card phone'; row-gap: 56px; align-items: start; }
.cf-waitlist-optin-2 .wo2-new { grid-area: new; padding-bottom: 0; }
.cf-waitlist-optin-2 .wo2-new::before, .cf-waitlist-optin-2 .wo2-new::after { display: none; }
.cf-waitlist-optin-2 .wo2-old { grid-area: old; padding-top: 12px; }
.cf-waitlist-optin-2 .wo2-card { grid-area: card; width: auto; margin-right: 40px; }
.cf-waitlist-optin-2 .wo2-phone { grid-area: phone; align-self: center; width: 100%; background-color: var(--wo2-colour); }
.cf-waitlist-optin-2 .wo2-phone figcaption { color: var(--band-ink); }
}
@media (prefers-reduced-motion: reduce) {
/* !important so every reveal, pop, swap and spinner sits still regardless of the selector that set it */
.cf-waitlist-optin-2 *, .cf-waitlist-optin-2 *::before, .cf-waitlist-optin-2 *::after { animation: none !important; transition: none !important; }
}
`
pieces/hero/waitlist-optin-2/specimen.tsx 48 lines
import __studioImage35e8db18 from "../assets/67b5c74e660a6f92.webp";
import WaitlistOptin2, { type WaitlistOptin2State } from '../waitlist-optin-2'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function WaitlistOptin2Specimen({ state = 'default' }: { state?: WaitlistOptin2State }) {
const email = state === 'hover' || state === 'active' ? 'maya@example.com' : state === 'error' ? 'maya@example' : ''
return (
<WaitlistOptin2
state={state}
productName='Tallywise'
headline='Finally know what’s safe to spend.'
highlight='safe to spend'
points={[
{
lead: 'One number, every morning.',
text: 'Tallywise counts what’s come in, what’s due and what tax needs, then shows what’s left to spend.',
},
{ lead: 'Made for lumpy income.', text: 'Big month or slow month, you get the same clear answer.' },
]}
oldTitle='Spreadsheets on Sunday. Guesswork all month.'
oldRows={[
{ label: 'What you can spend this week', value: 'a guess' },
{ label: 'Tax money to set aside', value: 'whatever’s left' },
{ label: 'Your Sunday night', value: 'the spreadsheet' },
]}
ask='What do you want most?'
askHint='Optional. One tap tells us what to show you first.'
wishes={['Know my tax set-aside', 'Smooth out slow months', 'Ditch the spreadsheet']}
defaultWish='Smooth out slow months'
perks={[
{ label: 'Early access to Tallywise', value: 'Included' },
{ label: 'Launch news before anyone else', value: 'By email' },
]}
label='Save my early spot'
note={defaults.sample.registration.privacy}
phoneImage={slot(
'product',
__studioImage35e8db18,
)}
phoneImageAlt='Tallywise budgeting app open on a phone'
caption='Your safe-to-spend number, the first thing you see each morning.'
defaultEmail={email}
/>
)
}
| Name | Type | Details |
|---|---|---|
productName OptionalWaitlistOptin2 |
string |
|
headline OptionalWaitlistOptin2 |
string |
|
highlight OptionalWaitlistOptin2 |
string |
|
points OptionalWaitlistOptin2 |
WaitlistOptin2Point[] |
|
oldLabel OptionalWaitlistOptin2 |
string |
|
oldTitle OptionalWaitlistOptin2 |
React.ReactNode |
|
oldRows OptionalWaitlistOptin2 |
WaitlistOptin2Row[] |
|
ask OptionalWaitlistOptin2 |
string |
|
askHint OptionalWaitlistOptin2 |
string |
|
wishes OptionalWaitlistOptin2 |
string[] |
|
defaultWish OptionalWaitlistOptin2 |
string |
|
perks OptionalWaitlistOptin2 |
WaitlistOptin2Row[] |
|
launchPriceLabel OptionalWaitlistOptin2 |
string |
|
launchPrice OptionalWaitlistOptin2 |
string |
|
launchPriceNote OptionalWaitlistOptin2 |
string |
|
wishRowLabel OptionalWaitlistOptin2 |
string |
|
wishRowEmpty OptionalWaitlistOptin2 |
string |
|
totalLabel OptionalWaitlistOptin2 |
string |
|
totalValue OptionalWaitlistOptin2 |
string |
|
emailLabel OptionalWaitlistOptin2 |
string |
|
emailPlaceholder OptionalWaitlistOptin2 |
string |
|
label OptionalWaitlistOptin2 |
string |
|
loadingLabel OptionalWaitlistOptin2 |
string |
|
note OptionalWaitlistOptin2 |
string |
|
invalidEmail OptionalWaitlistOptin2 |
string |
|
submitError OptionalWaitlistOptin2 |
string |
|
validLabel OptionalWaitlistOptin2 |
string |
|
phoneImage OptionalWaitlistOptin2 |
string |
|
phoneImageAlt OptionalWaitlistOptin2 |
string |
|
caption OptionalWaitlistOptin2 |
React.ReactNode |
|
defaultEmail OptionalWaitlistOptin2 |
string |
|
onSubmit OptionalWaitlistOptin2 |
(values: WaitlistOptin2Values) => void | Promise<void> |
|
state OptionalWaitlistOptin2 |
WaitlistOptin2State |
|
className OptionalWaitlistOptin2 |
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- 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.
product- The main product shot or cover (ebook, kit, bottle).
-
67b5c74e660a6f92.webp
image/webp · 39 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB