Thankyou Block 2
Waitlist welcome: shows the visitor's place in line, the launch window and what happens next, then asks one small optional question so the lead says a second yes and stays warm until launch.
Use it in a prompt
Use checkout/thankyou-block-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/checkout/thankyou-block-2.tsx. - Import it and pass your copy and images (Props tab):
import { ThankyouBlock2 } from "@/components/funneldna/checkout/thankyou-block-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/thankyou-block-2/component.tsx 585 lines
// layout: classic-centred-stack
// Waitlist welcome: shows the visitor's place in line, the launch window and what happens next, then asks one small optional question so the lead says a second yes and stays warm until launch.
import * as React from "react"
import { AlertCircle, CalendarDays, Check, Clock3, Loader2, MailCheck } from "lucide-react"
import { FX_HOST, Pattern, Spot } from "../fx/fx"
export type ThankyouBlock2Step = {
title: React.ReactNode
detail?: React.ReactNode
/** Imported fx spot asset (e.g. import gift from "../fx/spots/gift"). Without one the stop shows its number. */
spot?: string
}
export type ThankyouBlock2Option = { value: string; label: string }
export type ThankyouBlock2Copy = {
/** Caption under the numeral. */
placeLabel: string
/** Screen-reader text for the numeral; {position} is replaced as text. */
placeSr: string
/** Words before the launch date. */
launchLabel: string
/** Accessible name of the next-steps list. */
stepsLabel: string
sendLabel: string
sending: string
/** Line under the button once an answer is chosen. */
sendNote: string
/** Line under the button while nothing is chosen. */
chooseHint: string
error: string
}
const COPY: ThankyouBlock2Copy = {
placeLabel: "Your place in line",
placeSr: "Your place in line: {position}",
launchLabel: "Doors open",
stepsLabel: "What happens next",
sendLabel: "Send my answer",
sending: "Sending…",
sendNote: "Optional. Takes one tap.",
chooseHint: "Choose an answer above to send it.",
error: "We couldn't send your answer. Please try again.",
}
export type ThankyouBlock2Values = { answer: string; label: string }
export type ThankyouBlock2Props = {
/** The visitor's supplied place in line. The numeral hides when it is missing. */
position?: number
positionPrefix?: string
locale?: string
/** Count the numeral up once when it scrolls into view (skipped under reduced motion). */
animateCount?: boolean
headline?: React.ReactNode
/** Key phrase after the headline, drawn with one marker stroke. */
highlight?: React.ReactNode
lead?: React.ReactNode
/** Italic aside in the founder's voice, after the lead. */
aside?: React.ReactNode
/** The supplied launch date or window. Hidden when missing. */
launchDate?: React.ReactNode
/** What happens next: the launch email, the supplied perk, choosing a plan. Only what is passed shows. */
steps?: ThankyouBlock2Step[]
question?: React.ReactNode
questionLead?: React.ReactNode
/** Answer chips. The question card hides when empty. */
options?: ThankyouBlock2Option[]
/** Radio group name sent with the form. */
name?: string
defaultAnswer?: string
/** Receives the chosen answer. Return a promise to show the sending state; a rejection shows the inline error. */
onSubmit?: (values: ThankyouBlock2Values, event: React.FormEvent<HTMLFormElement>) => void | Promise<unknown>
disabled?: boolean
privacy?: React.ReactNode
copy?: Partial<ThankyouBlock2Copy>
/** 1 when this block opens the page (default), 2 when it sits under another h1. */
headingLevel?: 1 | 2
state?: "default" | "hover" | "active" | "disabled" | "error"
className?: string
id?: string
}
export function ThankyouBlock2({
position,
positionPrefix = "#",
locale = "en-US",
animateCount = true,
headline = "You're on the list.",
highlight,
lead = "Watch your inbox. Here's what happens between now and launch.",
aside,
launchDate,
steps = [],
question = "What will you use it for first?",
questionLead = "Your answer helps decide what gets built first. Pick one, then click the button below to send it.",
options = [],
name,
defaultAnswer,
onSubmit,
disabled = false,
privacy,
copy: copyOverrides,
headingLevel = 1,
state,
className,
id,
}: ThankyouBlock2Props) {
const copy: ThankyouBlock2Copy = { ...COPY, ...pickDefined(copyOverrides) }
const uid = React.useId()
const headingId = `${uid}-heading`
const leadId = `${uid}-qlead`
const noteId = `${uid}-note`
const groupName = name ?? `${uid}-answer`
const pos = typeof position === "number" && Number.isFinite(position) && position > 0 ? Math.round(position) : null
const fmt = React.useMemo(() => new Intl.NumberFormat(locale), [locale])
const finalText = pos !== null ? fmt.format(pos) : ""
const chars = finalText.length + (positionPrefix ? 0.5 : 0)
const count = useCountUp(pos, animateCount && (state === undefined || state === "default"))
const [answer, setAnswer] = React.useState<string>(defaultAnswer ?? "")
React.useEffect(() => {
setAnswer(defaultAnswer ?? "")
}, [defaultAnswer])
const [busy, setBusy] = React.useState(false)
const [failed, setFailed] = React.useState(false)
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
const locked = disabled || state === "disabled"
const showError = failed || state === "error"
const canSend = !!answer && !locked
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault()
if (!canSend || busy) return
const option = options.find((o) => o.value === answer)
setFailed(false)
const result = onSubmit?.({ answer, label: option?.label ?? answer }, event)
if (result && typeof (result as Promise<unknown>).then === "function") {
setBusy(true)
;(result as Promise<unknown>).then(
() => {
if (alive.current) setBusy(false)
},
() => {
if (alive.current) {
setBusy(false)
setFailed(true)
}
},
)
}
}
const H = (headingLevel === 2 ? "h2" : "h1") as "h1" | "h2"
const Sub = (headingLevel === 2 ? "h3" : "h2") as "h2" | "h3"
const prefix = positionPrefix ? <span className="tb2-hash">{positionPrefix}</span> : null
return (
<section
id={id}
className={["cf-thankyou-block-2", className].filter(Boolean).join(" ")}
data-state={state}
aria-labelledby={headingId}
style={FX_HOST}
>
<style>{CSS}</style>
<Pattern name="rings" fade="edges" />
<div className="tb2-inner">
{pos !== null && (
<p className="tb2-place tb2-rise" style={rise(0)}>
<span className="tb2-sr">{formatCopy(copy.placeSr, { position: `${positionPrefix}${finalText}` })}</span>
<span
className="tb2-num"
aria-hidden="true"
ref={count.ref}
style={{ ["--tb2-chars" as string]: String(chars) } as React.CSSProperties}
>
<span className="tb2-num-ghost">
{prefix}
{finalText}
</span>
<span className="tb2-num-live">
{prefix}
{fmt.format(count.shown ?? pos)}
</span>
</span>
<span className="tb2-place-label" aria-hidden="true">
{copy.placeLabel}
</span>
</p>
)}
<H id={headingId} className="tb2-h1 tb2-rise" data-solo={pos === null ? "" : undefined} style={rise(1)}>
{headline}
{highlight && (
<>
{" "}
<span className="tb2-mark">{highlight}</span>
</>
)}
</H>
{(lead || aside) && (
<p className="tb2-lead tb2-rise" style={rise(2)}>
{lead}
{lead && aside ? " " : null}
{aside && <em className="tb2-aside">{aside}</em>}
</p>
)}
{launchDate && (
<p className="tb2-launch tb2-rise" style={rise(2)}>
<CalendarDays className="tb2-ico tb2-ico-accent" size={18} strokeWidth={2.5} aria-hidden="true" />
{copy.launchLabel} <strong>{launchDate}</strong>
</p>
)}
{steps.length > 0 && (
<ol
className="tb2-steps tb2-rise"
aria-label={copy.stepsLabel}
style={{ ...rise(3), ["--tb2-cols" as string]: String(Math.min(steps.length, 4)) } as React.CSSProperties}
>
{steps.map((step, i) => (
<li className="tb2-stop" key={i}>
<span className="tb2-spot">
{step.spot ? (
<Spot src={step.spot} size={72} />
) : (
<span className="tb2-stop-num" aria-hidden="true">
{i + 1}
</span>
)}
</span>
<Sub className="tb2-stop-title">{step.title}</Sub>
{step.detail && <p className="tb2-stop-detail">{step.detail}</p>}
</li>
))}
</ol>
)}
{options.length > 0 && (
<form className="tb2-card tb2-rise" style={rise(4)} onSubmit={handleSubmit} noValidate aria-busy={busy || undefined}>
<fieldset className="tb2-fieldset" disabled={locked} aria-describedby={questionLead ? leadId : undefined}>
<legend className="tb2-legend">
<Sub className="tb2-q">{question}</Sub>
</legend>
{questionLead && (
<p id={leadId} className="tb2-q-lead">
{questionLead}
</p>
)}
<div
className="tb2-options"
style={
{
["--tb2-opt-cols" as string]: String(Math.min(options.length, 4)),
["--tb2-opt-cols-m" as string]: String(Math.min(options.length, 2)),
} as React.CSSProperties
}
>
{options.map((option, i) => {
const optionId = `${uid}-opt-${i}`
return (
<label key={option.value} className="tb2-chip" htmlFor={optionId}>
<input
id={optionId}
className="tb2-radio"
type="radio"
name={groupName}
value={option.value}
checked={answer === option.value}
onChange={() => {
setAnswer(option.value)
setFailed(false)
}}
/>
<span className="tb2-tile">
<span className="tb2-dot" aria-hidden="true">
<Check size={16} strokeWidth={3} />
</span>
<span className="tb2-tile-label">{option.label}</span>
</span>
</label>
)
})}
</div>
</fieldset>
{showError && (
<p className="tb2-error" role="alert">
<AlertCircle className="tb2-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{copy.error}
</p>
)}
<div className="tb2-action">
<button
type="submit"
className="tb2-send"
disabled={!canSend}
aria-disabled={busy || undefined}
aria-describedby={noteId}
data-busy={busy ? "" : undefined}
>
{busy && <Loader2 className="tb2-spin" size={20} strokeWidth={2.5} aria-hidden="true" />}
<span>{busy ? copy.sending : copy.sendLabel}</span>
</button>
<p id={noteId} className="tb2-note" aria-live="polite">
{answer || locked ? (
<>
<Clock3 className="tb2-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{copy.sendNote}
</>
) : (
copy.chooseHint
)}
</p>
</div>
</form>
)}
{privacy && (
<p className="tb2-privacy tb2-rise" style={rise(4)}>
<MailCheck className="tb2-ico" size={16} strokeWidth={2.5} aria-hidden="true" />
{privacy}
</p>
)}
</div>
</section>
)
}
export default ThankyouBlock2
const useIsoLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect
/** Shows the real value first; when motion is allowed, counts up once from zero as the numeral enters view. */
function useCountUp(target: number | null, enabled: boolean) {
const [shown, setShown] = React.useState<number | null>(target)
const ref = React.useRef<HTMLSpanElement | null>(null)
const played = React.useRef(false)
useIsoLayoutEffect(() => {
setShown(target)
if (target === null || !enabled || played.current) return
const el = ref.current
if (!el || typeof IntersectionObserver === "undefined" || typeof window.matchMedia !== "function") return
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return
let raf = 0
setShown(0)
const io = new IntersectionObserver(
(entries) => {
if (!entries.some((entry) => entry.isIntersecting)) return
io.disconnect()
const start = performance.now()
const duration = Math.min(1600, 900 + Math.log10(target + 1) * 160)
const tick = (now: number) => {
const t = Math.min(1, (now - start) / duration)
setShown(Math.round(target * (1 - Math.pow(1 - t, 3))))
if (t < 1) raf = requestAnimationFrame(tick)
else played.current = true
}
raf = requestAnimationFrame(tick)
},
{ threshold: 0.35 },
)
io.observe(el)
return () => {
io.disconnect()
cancelAnimationFrame(raf)
setShown(target)
}
}, [target, enabled])
return { ref, shown }
}
function rise(index: number): React.CSSProperties {
return { ["--tb2-i" as string]: String(Math.min(index, 4)) } as React.CSSProperties
}
function formatCopy(text: string, values: Record<string, string>) {
return Object.keys(values).reduce((out, key) => out.split("{" + key + "}").join(values[key]), text)
}
function pickDefined<T extends object>(value: Partial<T> | undefined): Partial<T> {
if (!value) return {}
return Object.fromEntries(Object.entries(value).filter(([, v]) => v !== undefined)) as Partial<T>
}
const CSS = `
.cf-thankyou-block-2{
--tb2-gutter:clamp(16px,5vw,48px);
--tb2-gap:32px;
--tb2-ease:cubic-bezier(.2,.7,.2,1);
--tb2-shadow:var(--shadow,oklch(0.22 0.03 260));
--tb2-hair:oklch(from var(--ink) l c h / .14);
--tb2-focus:var(--field-focus,var(--accent));
--tb2-marker:color-mix(in oklch,var(--marker,#fae37c) 55%,transparent);
position:relative;isolation:isolate;overflow:hidden;
background:var(--surface);color:var(--ink);font-family:var(--font-body);
padding:clamp(56px,8vw,112px) var(--tb2-gutter) clamp(64px,8.5vw,120px);
}
.cf-thankyou-block-2 *,.cf-thankyou-block-2 *::before,.cf-thankyou-block-2 *::after{box-sizing:border-box}
.cf-thankyou-block-2 .tb2-inner{position:relative;z-index:1;max-width:1120px;margin:0 auto;display:flex;flex-direction:column;align-items:center;text-align:center}
.cf-thankyou-block-2 .tb2-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-thankyou-block-2 .tb2-ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em;flex:none}
.cf-thankyou-block-2 .tb2-ico-accent{color:var(--accent)}
/* the numeral */
.cf-thankyou-block-2 .tb2-place{margin:0;width:100%;max-width:46rem;container-type:inline-size;display:flex;flex-direction:column;align-items:center}
.cf-thankyou-block-2 .tb2-num{
display:inline-grid;
font-family:var(--font-display);font-weight:var(--display-weight,800);
letter-spacing:-.045em;line-height:.92;color:var(--ink);
font-variant-numeric:tabular-nums lining-nums;white-space:nowrap;
font-size:clamp(4.875rem,11vw,10rem);
font-size:min(clamp(4.875rem,11vw,10rem),calc(100cqi / (var(--tb2-chars,6) * .62)));
}
.cf-thankyou-block-2 .tb2-num>span{grid-area:1/1}
.cf-thankyou-block-2 .tb2-num-ghost{visibility:hidden}
.cf-thankyou-block-2 .tb2-hash{position:relative;top:-.85em;font-size:.46em;letter-spacing:0;margin-inline-end:.08em;color:var(--accent)}
.cf-thankyou-block-2 .tb2-place-label{margin-top:16px;font-size:.9375rem;line-height:1.4;font-weight:700;letter-spacing:.02em;color:var(--muted)}
/* headline and lead */
.cf-thankyou-block-2 .tb2-h1{
margin:32px 0 0;
font-family:var(--font-display);font-weight:var(--display-weight,800);
letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);
font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--ink);text-wrap:balance;
}
.cf-thankyou-block-2 .tb2-h1[data-solo]{margin-top:0}
.cf-thankyou-block-2 .tb2-mark{
background:linear-gradient(transparent 38%,var(--tb2-marker) 38%,var(--tb2-marker) 92%,transparent 92%);
-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .08em;border-radius:.1em;
}
.cf-thankyou-block-2 .tb2-lead{margin:16px 0 0;max-width:38rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-thankyou-block-2 .tb2-aside{font-style:italic;font-weight:500;color:var(--ink)}
.cf-thankyou-block-2 .tb2-launch{
margin:24px 0 0;display:inline-block;max-width:100%;padding:8px 18px;border-radius:20px;
background:color-mix(in oklch,var(--ink) 6%,var(--surface));color:var(--ink);
font-size:1.0625rem;line-height:1.4;font-weight:600;text-wrap:pretty;
}
.cf-thankyou-block-2 .tb2-launch strong{font-weight:800}
/* what happens next */
.cf-thankyou-block-2 .tb2-steps{
list-style:none;margin:clamp(48px,6vw,64px) 0 0;padding:0;width:100%;max-width:64rem;
display:grid;grid-template-columns:repeat(var(--tb2-cols,3),minmax(0,1fr));gap:var(--tb2-gap);
}
.cf-thankyou-block-2 .tb2-stop{position:relative;display:flex;flex-direction:column;align-items:center;min-width:0}
.cf-thankyou-block-2 .tb2-stop:not(:last-child)::after{
content:"";position:absolute;top:35px;left:calc(50% + 48px);width:calc(100% + var(--tb2-gap) - 96px);height:2px;border-radius:2px;
background:oklch(from var(--accent-fill,var(--accent)) l c h / .4);
}
.cf-thankyou-block-2 .tb2-spot{width:72px;height:72px;display:grid;place-items:center;flex:none}
.cf-thankyou-block-2 .tb2-stop-num{font-family:var(--font-display);font-weight:800;font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--accent)}
.cf-thankyou-block-2 .tb2-stop-title{margin:16px 0 0;font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;color:var(--ink);text-wrap:balance}
.cf-thankyou-block-2 .tb2-stop-detail{margin:8px 0 0;max-width:30ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
/* the second yes */
.cf-thankyou-block-2 .tb2-card{
margin:clamp(48px,6vw,64px) 0 0;width:100%;max-width:56rem;
background:var(--card);color:var(--ink);
border:1px solid color-mix(in oklch,var(--accent) 24%,var(--card));
border-radius:var(--card-radius,var(--radius,14px));
box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--tb2-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--tb2-shadow) l c h / .32)));
padding:clamp(24px,3vw,32px) clamp(20px,4vw,40px);text-align:center;
}
.cf-thankyou-block-2 .tb2-fieldset{border:0;margin:0;padding:0;min-width:0}
.cf-thankyou-block-2 .tb2-legend{display:block;width:100%;padding:0;margin:0}
.cf-thankyou-block-2 .tb2-q{margin:0;font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-.01em;color:var(--ink);text-wrap:balance}
.cf-thankyou-block-2 .tb2-q-lead{margin:12px auto 0;max-width:36rem;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
.cf-thankyou-block-2 .tb2-options{margin:24px 0 0;display:grid;grid-template-columns:repeat(var(--tb2-opt-cols,4),minmax(0,1fr));gap:12px}
.cf-thankyou-block-2 .tb2-chip{position:relative;display:block;min-width:0;cursor:pointer}
.cf-thankyou-block-2 .tb2-radio{position:absolute;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.cf-thankyou-block-2 .tb2-tile{
display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;height:100%;min-height:104px;padding:16px 12px;
border-radius:var(--field-radius,var(--radius,12px));
background:color-mix(in oklch,var(--ink) 4%,var(--card));border:1px solid var(--tb2-hair);color:var(--ink);
font-size:1.0625rem;line-height:1.25;font-weight:700;text-wrap:balance;
transition:transform .16s ease,background .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.cf-thankyou-block-2 .tb2-dot{
display:grid;place-items:center;width:24px;height:24px;border-radius:999px;flex:none;
border:2px solid oklch(from var(--ink) l c h / .32);background:var(--card);color:var(--accent-fill-ink,var(--card));
transition:background .16s ease,border-color .16s ease;
}
.cf-thankyou-block-2 .tb2-dot svg{opacity:0;transform:scale(.6);transition:opacity .16s ease,transform .16s ease}
.cf-thankyou-block-2 .tb2-radio:checked+.tb2-tile{
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-sm,0 1px 2px oklch(from var(--tb2-shadow) l c h / .2));transform:translateY(-1px);
}
.cf-thankyou-block-2 .tb2-radio:checked+.tb2-tile .tb2-dot{background:var(--accent-fill,var(--accent));border-color:var(--accent-fill,var(--accent))}
.cf-thankyou-block-2 .tb2-radio:checked+.tb2-tile .tb2-dot svg{opacity:1;transform:scale(1)}
.cf-thankyou-block-2 .tb2-radio:focus-visible+.tb2-tile{outline:3px solid var(--tb2-focus);outline-offset:2px}
.cf-thankyou-block-2 .tb2-radio:disabled+.tb2-tile{opacity:.6;cursor:not-allowed;transform:none}
.cf-thankyou-block-2 .tb2-fieldset:disabled .tb2-chip{cursor:not-allowed}
.cf-thankyou-block-2 .tb2-error{
margin:16px auto 0;max-width:36rem;padding:10px 14px;border-radius:10px;
background:var(--danger-soft);color:var(--danger);font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty;
}
.cf-thankyou-block-2 .tb2-action{margin-top:24px;display:flex;flex-direction:column;align-items:center;gap:12px}
.cf-thankyou-block-2 .tb2-send{
--tb2-b:var(--button-bg,var(--cta));
--tb2-b2:var(--button-bg-2,var(--cta-2));
display:inline-flex;align-items:center;justify-content:center;gap:10px;
min-height:56px;min-width:15rem;padding:0 28px;border:0;cursor:pointer;
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;white-space:nowrap;
color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);
background:linear-gradient(oklch(from var(--tb2-b) calc(l + .04) c h),oklch(from var(--tb2-b2) calc(l - .02) c h));
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--tb2-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--tb2-b) calc(l - .16) c h),0 1px 2px oklch(from var(--tb2-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--tb2-shadow) l c h / .45));
transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.cf-thankyou-block-2[data-state="hover"] .tb2-send:not(:disabled){
background:linear-gradient(oklch(from var(--tb2-b) calc(l - .01) c h),oklch(from var(--tb2-b2) calc(l - .07) c h));
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--tb2-b) calc(l + .12) c h / .6),inset 0 -3px 0 oklch(from var(--tb2-b) calc(l - .2) c h),0 1px 2px oklch(from var(--tb2-shadow) l c h / .32),0 10px 18px -6px oklch(from var(--tb2-shadow) l c h / .55));
}
.cf-thankyou-block-2 .tb2-send:not(:disabled):active,.cf-thankyou-block-2[data-state="active"] .tb2-send:not(:disabled){
transform:translateY(1px);
background:linear-gradient(oklch(from var(--tb2-b) calc(l - .06) c h),oklch(from var(--tb2-b2) calc(l - .08) c h));
box-shadow:var(--button-shadow,inset 0 2px 4px oklch(from var(--tb2-b) calc(l - .24) c h / .5),inset 0 -2px 0 oklch(from var(--tb2-b) calc(l - .2) c h),0 1px 1px oklch(from var(--tb2-shadow) l c h / .3));
}
.cf-thankyou-block-2 .tb2-send:focus-visible{outline:3px solid var(--tb2-focus);outline-offset:3px}
.cf-thankyou-block-2 .tb2-send:disabled{
cursor:not-allowed;transform:none;text-shadow:none;
background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));
box-shadow:inset 0 0 0 1px var(--button-2-border,transparent);
}
.cf-thankyou-block-2 .tb2-send[data-busy]{pointer-events:none}
.cf-thankyou-block-2 .tb2-spin{animation:tb2-spin .8s linear infinite}
.cf-thankyou-block-2 .tb2-note{margin:0;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-thankyou-block-2 .tb2-privacy{margin:24px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
@media (hover:hover) and (pointer:fine){
.cf-thankyou-block-2 .tb2-chip:hover .tb2-radio:not(:disabled):not(:checked)+.tb2-tile{
background:color-mix(in oklch,var(--ink) 7%,var(--card));border-color:oklch(from var(--ink) l c h / .28);transform:translateY(-1px);
}
.cf-thankyou-block-2 .tb2-send:not(:disabled):hover{
background:linear-gradient(oklch(from var(--tb2-b) calc(l - .01) c h),oklch(from var(--tb2-b2) calc(l - .07) c h));
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--tb2-b) calc(l + .12) c h / .6),inset 0 -3px 0 oklch(from var(--tb2-b) calc(l - .2) c h),0 1px 2px oklch(from var(--tb2-shadow) l c h / .32),0 10px 18px -6px oklch(from var(--tb2-shadow) l c h / .55));
}
.cf-thankyou-block-2 .tb2-send:not(:disabled):hover:active{
transform:translateY(1px);
background:linear-gradient(oklch(from var(--tb2-b) calc(l - .06) c h),oklch(from var(--tb2-b2) calc(l - .08) c h));
box-shadow:var(--button-shadow,inset 0 2px 4px oklch(from var(--tb2-b) calc(l - .24) c h / .5),inset 0 -2px 0 oklch(from var(--tb2-b) calc(l - .2) c h),0 1px 1px oklch(from var(--tb2-shadow) l c h / .3));
}
}
.cf-thankyou-block-2 .tb2-rise{animation:tb2-rise .45s var(--tb2-ease) both;animation-delay:calc(var(--tb2-i,0) * .07s)}
@keyframes tb2-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes tb2-spin{to{transform:rotate(360deg)}}
@media (max-width:720px){
.cf-thankyou-block-2{--tb2-gap:48px}
.cf-thankyou-block-2 .tb2-h1{margin-top:24px}
.cf-thankyou-block-2 .tb2-steps{grid-template-columns:minmax(0,1fr)}
.cf-thankyou-block-2 .tb2-stop:not(:last-child)::after{top:calc(100% + 10px);left:calc(50% - 1px);width:2px;height:calc(var(--tb2-gap) - 20px)}
.cf-thankyou-block-2 .tb2-options{grid-template-columns:repeat(var(--tb2-opt-cols-m,2),minmax(0,1fr))}
.cf-thankyou-block-2 .tb2-tile{min-height:92px;padding:14px 10px}
.cf-thankyou-block-2 .tb2-action{align-items:stretch}
.cf-thankyou-block-2 .tb2-send{width:100%;min-width:0}
}
@media (prefers-reduced-motion:reduce){
.cf-thankyou-block-2 .tb2-rise,.cf-thankyou-block-2 .tb2-spin{animation:none}
.cf-thankyou-block-2 .tb2-tile,.cf-thankyou-block-2 .tb2-dot,.cf-thankyou-block-2 .tb2-dot svg,.cf-thankyou-block-2 .tb2-send{transition:none}
.cf-thankyou-block-2 .tb2-send:not(:disabled):active,.cf-thankyou-block-2[data-state="active"] .tb2-send:not(:disabled){transform:none}
.cf-thankyou-block-2 .tb2-radio:checked+.tb2-tile{transform:none}
}
`
pieces/checkout/thankyou-block-2/specimen.tsx 57 lines
import * as React from "react"
import defaults from "../../studio-defaults.json"
import gift from "../../fx/spots/gift"
import rocket from "../../fx/spots/rocket"
import savings from "../../fx/spots/savings"
import { ThankyouBlock2 } from "../thankyou-block-2"
export const states = ["default", "hover", "active", "disabled", "error"] as const
type SpecimenState = (typeof states)[number]
const OPTIONS = [
{ value: "groceries", label: "Track groceries" },
{ value: "bills", label: "Plan monthly bills" },
{ value: "goal", label: "Save for a goal" },
{ value: "allowance", label: "Kids' allowance" },
]
export default function ThankyouBlock2Specimen({ state = "default" }: { state?: SpecimenState }) {
const picked = state === "hover" || state === "active" || state === "error" ? "bills" : undefined
return (
<ThankyouBlock2
state={state}
position={2417}
headline="You're in."
highlight="Your Pocketbook spot is saved."
lead="Watch your inbox. Here's exactly what happens between now and launch day."
aside="(I know. Waiting is the hard part.)"
launchDate="the week of March 8, 2027"
steps={[
{
spot: rocket,
title: "Your invite lands on launch day",
detail: "One email with your private sign-up link. Nothing else in between.",
},
{
spot: gift,
title: "60 days free for early members",
detail: "Your waitlist perk is added to your account the day you join.",
},
{
spot: savings,
title: "Choose the plan that fits",
detail: "Try it with your family first, then pick monthly or yearly.",
},
]}
question="What will you use Pocketbook for first?"
questionLead="Your answer decides what we polish first. Pick one, then click the button below to send it."
options={OPTIONS}
defaultAnswer={picked}
privacy={defaults.sample.registration.privacy}
onSubmit={() => {}}
/>
)
}
| Name | Type | Details |
|---|---|---|
position OptionalThankyouBlock2 |
number |
|
positionPrefix OptionalThankyouBlock2 |
string |
Default "#"
|
locale OptionalThankyouBlock2 |
string |
Default "en-US"
|
animateCount OptionalThankyouBlock2 |
boolean |
Default true
|
headline OptionalThankyouBlock2 |
React.ReactNode |
Default "You're on the list."
|
highlight OptionalThankyouBlock2 |
React.ReactNode |
|
lead OptionalThankyouBlock2 |
React.ReactNode |
Default "Watch your inbox. Here's what happens between now and launch."
|
aside OptionalThankyouBlock2 |
React.ReactNode |
|
launchDate OptionalThankyouBlock2 |
React.ReactNode |
|
steps OptionalThankyouBlock2 |
ThankyouBlock2Step[] |
Default []
|
question OptionalThankyouBlock2 |
React.ReactNode |
Default "What will you use it for first?"
|
questionLead OptionalThankyouBlock2 |
React.ReactNode |
Default "Your answer helps decide what gets built first. Pick one, then click the button below to send it."
|
options OptionalThankyouBlock2 |
ThankyouBlock2Option[] |
Default []
|
name OptionalThankyouBlock2 |
string |
|
defaultAnswer OptionalThankyouBlock2 |
string |
|
onSubmit OptionalThankyouBlock2 |
(values: ThankyouBlock2Values, event: React.FormEvent<HTMLFormElement>) => void | Promise<unknown> |
|
disabled OptionalThankyouBlock2 |
boolean |
Default false
|
privacy OptionalThankyouBlock2 |
React.ReactNode |
|
copy OptionalThankyouBlock2 |
Partial<ThankyouBlock2Copy> |
|
headingLevel OptionalThankyouBlock2 |
1 | 2 |
Default 1
|
state OptionalThankyouBlock2 |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalThankyouBlock2 |
string |
|
id OptionalThankyouBlock2 |
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-border--button-2-ink- Secondary button.
--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--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.
This piece reads no image slots.
-
63571cb07acc4626.webp
image/webp · 17.3 KB
-
87170e25e6a4d825.webp
image/webp · 18.7 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
d7814fce240ddf0e.webp
image/webp · 17.6 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB