Stepped Checkout Rail 1
Stepped checkout rail: a one-page, three-step order form (package, details, extras) with a sticky progress rail
Use it in a prompt
Use checkout/stepped-checkout-rail 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/stepped-checkout-rail.tsx. - Import it and pass your copy and images (Props tab):
import { SteppedCheckoutRail } from "@/components/funneldna/checkout/stepped-checkout-rail"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/stepped-checkout-rail/component.tsx 833 lines
// layout: segmented-stepper
// Stepped checkout rail: a one-page, three-step order form (package, details, extras) with a sticky progress rail
// and a running total, so the buyer always knows where they are and exactly what they pay before the final click.
import React, { useEffect, useId, useRef, useState } from 'react';
import { AlertCircle, Check, ChevronDown, Lock, ShieldCheck } from 'lucide-react';
import { FX_HOST, Pattern, Spot } from '../fx/fx';
import truck from '../fx/spots/truck';
export type CheckoutPackage = {
id: string;
name: string;
/** Price as a number, formatted with `currency`. */
price: number;
/** The value said in words beside the price (“less than one client call”). */
priceNote?: string;
includes?: string[];
/** Item thumbnails (slots item-1 … item-n). */
images?: { src: string; alt?: string }[];
/** Short solid flag above the name. */
flag?: string;
};
export type CheckoutBump = {
id: string;
name: string;
price: number;
headline: string;
/** Short paragraphs, each opening with a bold lead-in. */
copy?: { lead: string; text: string }[];
image?: string;
imageAlt?: string;
};
export type CheckoutField = {
name: string;
label: string;
type?: 'text' | 'email' | 'tel' | 'select';
autoComplete?: string;
inputMode?: 'text' | 'email' | 'tel' | 'numeric';
placeholder?: string;
required?: boolean;
/** Half width beside another half field (two columns from 480px). */
half?: boolean;
options?: string[];
/** Shown in the rail and in the finished step's summary line. */
summary?: boolean;
};
export type CheckoutStep = { title: string; short: string; hint?: string };
export type SteppedCheckoutRailValues = {
packageId: string;
bumpIds: string[];
fields: Record<string, string>;
total: number;
};
export type SteppedCheckoutRailCopy = typeof DEFAULT_COPY;
export type SteppedCheckoutRailProps = {
headline?: string;
/** Phrase inside the headline set in the accent colour. */
headlineEmphasis?: string;
lead?: React.ReactNode;
/** Three steps: package, details, extras. */
steps?: CheckoutStep[];
packages?: CheckoutPackage[];
defaultPackageId?: string;
contactTitle?: string;
contactFields?: CheckoutField[];
shippingTitle?: string;
shippingFields?: CheckoutField[];
/** fx Spot beside the shipping heading (an imported spot asset); null hides it. */
shippingSpot?: string | null;
/** Optional add-ons; they always start unchecked. */
bumps?: CheckoutBump[];
/** The question the button answers. */
closeQuestion?: string;
submitLabel?: string;
reassurance?: string[];
guarantee?: string;
currency?: string;
defaultValues?: Record<string, string>;
initialStep?: 0 | 1 | 2;
copy?: Partial<SteppedCheckoutRailCopy>;
state?: 'default' | 'error' | 'disabled';
/** Called with validated values; the page wires what happens next. */
onSubmit?: (values: SteppedCheckoutRailValues) => void;
className?: string;
};
export function SteppedCheckoutRail(props: SteppedCheckoutRailProps) {
const {
headline = 'Complete your order in three quick steps',
headlineEmphasis = 'three quick steps',
lead = 'Choose your package, tell us where to send it, then check out.',
steps = DEFAULT_STEPS,
packages = DEFAULT_PACKAGES,
defaultPackageId,
contactTitle = 'Who is this order for?',
contactFields = DEFAULT_CONTACT,
shippingTitle = 'Where should we ship it?',
shippingFields = DEFAULT_SHIPPING,
shippingSpot = truck,
bumps = [],
closeQuestion = 'Ready to place your order?',
submitLabel = 'Yes, complete my order',
reassurance = [],
guarantee = '',
currency = '$',
defaultValues,
initialStep = 0,
copy: copyProp,
state = 'default',
onSubmit,
className,
} = props;
const copy: SteppedCheckoutRailCopy = { ...DEFAULT_COPY, ...copyProp };
const disabled = state === 'disabled';
const uid = useId().replace(/:/g, '');
const rootRef = useRef<HTMLElement>(null);
const firstStep: number = state === 'error' ? 1 : initialStep;
const [step, setStep] = useState<number>(firstStep);
const [maxReached, setMaxReached] = useState<number>(firstStep);
const [packageId, setPackageId] = useState<string>(defaultPackageId ?? packages[0]?.id ?? '');
const [bumpIds, setBumpIds] = useState<string[]>([]);
const [values, setValues] = useState<Record<string, string>>(() => ({ ...defaultValues }));
const [touched, setTouched] = useState<Record<string, boolean>>({});
const [showErrors, setShowErrors] = useState(state === 'error');
const [focusTick, setFocusTick] = useState(0);
const focusWant = useRef<'heading' | 'error' | null>(null);
const list = steps.slice(0, 3);
const fields = [...contactFields, ...shippingFields];
const errors = validate(fields, values, copy);
const errorCount = Object.keys(errors).length;
const pkg = packages.find((p) => p.id === packageId) ?? packages[0];
const chosen = bumps.filter((b) => bumpIds.includes(b.id));
const total = (pkg?.price ?? 0) + chosen.reduce((sum, b) => sum + b.price, 0);
const money = (n: number) => currency + (Number.isInteger(n) ? String(n) : n.toFixed(2));
useEffect(() => {
const want = focusWant.current;
focusWant.current = null;
const root = rootRef.current;
if (!want || !root) return;
const smooth = !window.matchMedia('(prefers-reduced-motion: reduce)').matches;
const target =
want === 'error'
? root.querySelector<HTMLElement>('[aria-invalid=true]')
: root.querySelector<HTMLElement>(`[data-step-heading=s${step}]`);
if (!target) return;
target.focus({ preventScroll: true });
const scrollTo: Element = want === 'error' ? target : target.closest('section') ?? target;
scrollTo.scrollIntoView({ block: want === 'error' ? 'center' : 'start', behavior: smooth ? 'smooth' : 'auto' });
}, [step, focusTick]);
const requestFocus = (want: 'heading' | 'error') => {
focusWant.current = want;
setFocusTick((t) => t + 1);
};
const goTo = (n: number) => {
setStep(n);
setMaxReached((m) => Math.max(m, n));
requestFocus('heading');
};
const continueDetails = () => {
if (errorCount) {
setShowErrors(true);
requestFocus('error');
return;
}
setShowErrors(false);
goTo(2);
};
const submitOrder = () => {
if (errorCount) {
setShowErrors(true);
setStep(1);
requestFocus('error');
return;
}
onSubmit?.({ packageId: pkg?.id ?? '', bumpIds: chosen.map((b) => b.id), fields: { ...values }, total });
};
const handleForm = (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (disabled) return;
if (step === 0) goTo(1);
else if (step === 1) continueDetails();
else submitOrder();
};
const setField = (name: string, v: string) => setValues((cur) => ({ ...cur, [name]: v }));
const touch = (name: string) => setTouched((t) => ({ ...t, [name]: true }));
const toggleBump = (id: string) =>
setBumpIds((ids) => (ids.includes(id) ? ids.filter((x) => x !== id) : [...ids, id]));
const fieldError = (name: string) => {
const e = errors[name];
if (!e) return undefined;
if (showErrors) return e;
return touched[name] && (values[name] ?? '').trim() ? e : undefined;
};
const status = (i: number) => (i === step ? 'active' : i < maxReached ? 'done' : i <= maxReached ? 'open' : 'todo');
const detailsSummary = fields
.filter((f) => f.summary && (values[f.name] ?? '').trim())
.map((f) => (values[f.name] ?? '').trim())
.join(', ');
const summaryFor = (i: number) => {
if (i === 0) return pkg ? `${pkg.name} · ${money(pkg.price)}` : '';
if (i === 1) return detailsSummary || copy.railPending;
if (chosen.length === 0) return copy.railExtrasNone;
return chosen.length === 1 ? copy.railExtrasOne : fill(copy.railExtrasMany, { count: chosen.length });
};
const subFor = (i: number) => (status(i) === 'todo' ? list[i]?.hint ?? '' : summaryFor(i));
const stepOf = fill(copy.stepOf, { current: step + 1, count: list.length });
const at = headlineEmphasis ? headline.indexOf(headlineEmphasis) : -1;
const title =
at < 0 ? (
headline
) : (
<>
{headline.slice(0, at)}
<span className='scr-em'>{headlineEmphasis}</span>
{headline.slice(at + headlineEmphasis.length)}
</>
);
const segments = (slim?: boolean) => (
<span className={`scr-seg${slim ? ' scr-seg--slim' : ''}`} aria-hidden='true'>
{list.map((s, i) => {
const st = status(i);
return <span key={i} className={st === 'done' ? 'is-done' : st === 'active' ? 'is-active' : undefined} />;
})}
</span>
);
const tick = (
<span className='scr-tick'>
<Check size={16} strokeWidth={3} />
</span>
);
const renderField = (f: CheckoutField) => {
const id = `${uid}-${f.name}`;
const err = fieldError(f.name);
const errId = `${id}-err`;
const value = values[f.name] ?? '';
return (
<div key={f.name} className={`scr-field${f.half ? ' is-half' : ''}`}>
<label htmlFor={id}>
{f.label}
{!f.required && <span className='scr-opt'>{copy.optional}</span>}
</label>
{f.type === 'select' ? (
<div className='scr-select'>
<select
id={id}
name={f.name}
autoComplete={f.autoComplete}
required={f.required}
value={value}
className={`scr-input${value ? '' : ' is-empty'}`}
aria-invalid={err ? true : undefined}
aria-describedby={err ? errId : undefined}
onChange={(e) => setField(f.name, e.target.value)}
onBlur={() => touch(f.name)}
>
<option value='' disabled>
{f.placeholder ?? fill(copy.selectPlaceholder, { label: f.label.toLowerCase() })}
</option>
{(f.options ?? []).map((o) => (
<option key={o} value={o}>
{o}
</option>
))}
</select>
<ChevronDown className='scr-chev' size={20} strokeWidth={2.5} aria-hidden='true' />
</div>
) : (
<input
id={id}
name={f.name}
type={f.type ?? 'text'}
inputMode={f.inputMode}
autoComplete={f.autoComplete}
required={f.required}
placeholder={f.placeholder}
value={value}
className='scr-input'
aria-invalid={err ? true : undefined}
aria-describedby={err ? errId : undefined}
onChange={(e) => setField(f.name, e.target.value)}
onBlur={() => touch(f.name)}
/>
)}
{err && (
<p id={errId} className='scr-err'>
<AlertCircle className='scr-ic' size={16} strokeWidth={2.5} aria-hidden='true' />
{err}
</p>
)}
</div>
);
};
const totals = (rail?: boolean) => (
<>
{pkg && (
<div className='scr-row'>
<span>{pkg.name}</span>
<span className='scr-num'>{money(pkg.price)}</span>
</div>
)}
{chosen.map((b) => (
<div key={b.id} className='scr-row scr-rise'>
<span>{b.name}</span>
<span className='scr-num'>{money(b.price)}</span>
</div>
))}
<div className='scr-total' aria-live={rail ? undefined : 'polite'}>
<span className='scr-total-l'>{copy.totalLabel}</span>
<span key={total} className='scr-total-num scr-rise'>
{money(total)}
</span>
</div>
</>
);
const body = (i: number) => {
if (i === 0)
return (
<>
<fieldset className='scr-pkgs'>
<legend className='scr-sr'>{copy.packageLegend}</legend>
{packages.map((p) => {
const on = p.id === pkg?.id;
return (
<label key={p.id} className={`scr-pkg${on ? ' is-on' : ''}`}>
<input
type='radio'
className='scr-sr-input'
name={`${uid}-package`}
value={p.id}
checked={on}
onChange={() => setPackageId(p.id)}
/>
<span className='scr-radio' aria-hidden='true' />
<span className='scr-pkg-body'>
{p.flag && <span className='scr-flag'>{p.flag}</span>}
<span className='scr-pkg-top'>
<span className='scr-pkg-name'>{p.name}</span>
<span className='scr-pkg-price'>
<strong>{fill(copy.justPrice, { price: money(p.price) })}</strong>
{p.priceNote && <span>{p.priceNote}</span>}
</span>
</span>
{p.includes && p.includes.length > 0 && (
<span className='scr-inc-list'>
{p.includes.map((t) => (
<span key={t} className='scr-inc'>
<Check size={18} strokeWidth={2.5} aria-hidden='true' />
{t}
</span>
))}
</span>
)}
{p.images && p.images.length > 0 && (
<span className='scr-thumbs'>
{p.images.map((im, k) => (
<img key={k} src={im.src} alt={im.alt ?? ''} width={64} height={64} loading='lazy' />
))}
</span>
)}
</span>
</label>
);
})}
</fieldset>
<div className='scr-next'>
<button type='button' className='scr-btn' onClick={() => goTo(1)}>
{copy.continueToDetails}
</button>
</div>
</>
);
if (i === 1)
return (
<>
{showErrors && errorCount > 0 && (
<p className='scr-alert' role='alert'>
<AlertCircle className='scr-ic' size={18} strokeWidth={2.5} aria-hidden='true' />
{copy.errorSummary}
</p>
)}
{contactFields.length > 0 && (
<div className='scr-group'>
<h4 className='scr-group-h'>{contactTitle}</h4>
<div className='scr-fields'>{contactFields.map(renderField)}</div>
</div>
)}
{shippingFields.length > 0 && (
<div className='scr-group'>
<h4 className='scr-group-h'>
{shippingSpot && (
<span className='scr-spot'>
<Spot src={shippingSpot} size={48} />
</span>
)}
{shippingTitle}
</h4>
<div className='scr-fields'>{shippingFields.map(renderField)}</div>
</div>
)}
<div className='scr-next'>
<button type='button' className='scr-btn' onClick={continueDetails}>
{copy.continueToExtras}
</button>
</div>
</>
);
return (
<>
{bumps.length > 0 && (
<div className='scr-bumps'>
{bumps.map((b) => {
const on = bumpIds.includes(b.id);
const id = `${uid}-bump-${b.id}`;
return (
<div key={b.id} className={`scr-bump${on ? ' is-on' : ''}`}>
<label className='scr-bump-strip' htmlFor={id}>
<input id={id} type='checkbox' className='scr-sr-input' checked={on} onChange={() => toggleBump(b.id)} />
<span className='scr-chk' aria-hidden='true'>
<Check size={18} strokeWidth={3} />
</span>
<span className='scr-bump-yes'>{fill(copy.bumpCheck, { name: b.name, price: money(b.price) })}</span>
</label>
<div className={`scr-bump-body${b.image ? '' : ' no-img'}`}>
{b.image && (
<img className='scr-bump-img' src={b.image} alt={b.imageAlt ?? b.name} width={96} height={96} loading='lazy' />
)}
<div>
<p className='scr-bump-h'>{b.headline}</p>
{b.copy?.map((c) => (
<p key={c.lead} className='scr-bump-p'>
<strong>{c.lead}</strong> {c.text}
</p>
))}
</div>
</div>
</div>
);
})}
</div>
)}
<div className='scr-summary'>{totals()}</div>
{closeQuestion && <p className='scr-q'>{closeQuestion}</p>}
<button type='submit' className='scr-btn scr-btn--xl'>
{submitLabel}
</button>
{reassurance.length > 0 && (
<ul className='scr-reassure'>
{reassurance.map((r, k) => (
<li key={r}>
{k === 0 ? (
<Lock className='scr-ic' size={16} strokeWidth={2.5} aria-hidden='true' />
) : (
<Check className='scr-ic' size={16} strokeWidth={2.5} aria-hidden='true' />
)}
{r}
</li>
))}
</ul>
)}
</>
);
};
return (
<section
ref={rootRef}
className={['cf-stepped-checkout-rail', className].filter(Boolean).join(' ')}
aria-labelledby={`${uid}-h`}
>
<style>{CSS}</style>
<div className='scr-fx' aria-hidden='true'>
<div style={{ ...FX_HOST, position: 'absolute', inset: 0 }}>
<Pattern name='grid' fade='edges' />
</div>
</div>
<div className='scr-wrap'>
<header className='scr-head'>
<h2 id={`${uid}-h`} className='scr-h'>
{title}
</h2>
{lead && <p className='scr-lead'>{lead}</p>}
</header>
<form noValidate onSubmit={handleForm}>
<fieldset className='scr-lock' disabled={disabled}>
<div className='scr-grid'>
<div className='scr-main'>
<div className='scr-phonebar'>
<div className='scr-phonebar-row'>
<span className='scr-phonebar-step'>
{stepOf} · {list[step]?.short}
</span>
<span className='scr-phonebar-total'>
<span className='scr-sr'>{copy.totalLabel} </span>
{money(total)}
</span>
</div>
{segments(true)}
</div>
<div className='scr-steps'>
{list.map((s, i) => {
const st = status(i);
const sub = st === 'active' ? '' : subFor(i);
return (
<section key={i} className={`scr-step ${st === 'active' ? 'is-active' : 'is-idle'}`} aria-labelledby={`${uid}-s${i}`}>
<div className='scr-step-head'>
<span className='scr-step-mark' aria-hidden='true'>
{st === 'done' ? tick : i + 1}
</span>
<div className='scr-step-titles'>
<h3 id={`${uid}-s${i}`} className='scr-step-t' tabIndex={-1} data-step-heading={`s${i}`}>
{s.title}
</h3>
{sub && <p className='scr-step-sub'>{sub}</p>}
</div>
{(st === 'done' || st === 'open') && (
<button
type='button'
className='scr-btn2'
onClick={() => goTo(i)}
aria-label={fill(copy.changeAria, { step: s.title })}
>
{copy.changeLabel}
</button>
)}
</div>
{st === 'active' && <div className='scr-panel'>{body(i)}</div>}
</section>
);
})}
</div>
</div>
<aside className='scr-rail' aria-label={copy.railAria}>
<div className='scr-rail-card'>
{segments()}
<p className='scr-rail-count'>{stepOf}</p>
<ol className='scr-rail-steps'>
{list.map((s, i) => {
const st = status(i);
const sub = subFor(i);
return (
<li key={i}>
<button
type='button'
className={`scr-rail-step${st === 'active' ? ' is-active' : ''}`}
disabled={st === 'todo'}
aria-current={st === 'active' ? 'step' : undefined}
onClick={() => {
if (st !== 'active') goTo(i);
}}
>
<span className='scr-rail-mark' aria-hidden='true'>
{st === 'done' ? tick : i + 1}
</span>
<span className='scr-rail-text'>
<span className='scr-rail-t'>{s.short}</span>
{sub && <span className='scr-rail-s'>{sub}</span>}
</span>
</button>
</li>
);
})}
</ol>
<div className='scr-rail-sum'>{totals(true)}</div>
{guarantee && (
<p className='scr-rail-g'>
<ShieldCheck className='scr-ic' size={18} strokeWidth={2.5} aria-hidden='true' />
{guarantee}
</p>
)}
</div>
</aside>
</div>
</fieldset>
</form>
</div>
</section>
);
}
export default SteppedCheckoutRail;
const DEFAULT_COPY = {
packageLegend: 'Choose your package',
justPrice: 'Just {price}',
continueToDetails: 'Continue to your details',
continueToExtras: 'Continue to extras',
changeLabel: 'Change',
changeAria: 'Change: {step}',
stepOf: 'Step {current} of {count}',
totalLabel: 'Today’s total',
optional: '(optional)',
required: 'Please enter your {label}.',
chooseOption: 'Please choose your {label}.',
invalidEmail: 'That email doesn’t look right. Try you@example.com.',
errorSummary: 'A few details need a fix before you continue.',
selectPlaceholder: 'Choose your {label}…',
bumpCheck: 'Yes! Add the {name} for {price}',
railAria: 'Checkout progress and total',
railPending: 'Not filled in yet',
railExtrasNone: 'No extras added',
railExtrasOne: '1 extra added',
railExtrasMany: '{count} extras added',
};
const DEFAULT_STEPS: CheckoutStep[] = [
{ title: 'Pick the package that fits you', short: 'Your package', hint: 'Choose one to start' },
{ title: 'Tell us where to send your order', short: 'Your details', hint: 'Takes about a minute' },
{ title: 'Add the finishing touches', short: 'Extras & total', hint: 'Optional add-ons, then your total' },
];
const DEFAULT_PACKAGES: CheckoutPackage[] = [
{
id: 'complete',
name: 'Complete package',
price: 97,
priceNote: 'everything in one order',
includes: ['The main product', 'Every add-on module', 'A printed copy shipped to you'],
flag: 'Most complete',
},
{ id: 'core', name: 'Core package', price: 47, priceNote: 'the essentials', includes: ['The main product', 'Every add-on module'] },
{ id: 'starter', name: 'Starter package', price: 27, priceNote: 'start small', includes: ['The main product'] },
];
const DEFAULT_CONTACT: CheckoutField[] = [
{ name: 'fullName', label: 'Full name', autoComplete: 'name', placeholder: 'Jane Smith', required: true, summary: true },
{ name: 'email', label: 'Email address', type: 'email', inputMode: 'email', autoComplete: 'email', placeholder: 'you@example.com', required: true, half: true },
{ name: 'phone', label: 'Phone number', type: 'tel', inputMode: 'tel', autoComplete: 'tel', placeholder: '(555) 123-4567', half: true },
];
const DEFAULT_SHIPPING: CheckoutField[] = [
{ name: 'address', label: 'Street address', autoComplete: 'shipping address-line1', placeholder: '123 Main Street', required: true },
{ name: 'city', label: 'City', autoComplete: 'shipping address-level2', placeholder: 'Austin', required: true, half: true, summary: true },
{ name: 'region', label: 'State / Province', autoComplete: 'shipping address-level1', placeholder: 'Texas', required: true, half: true },
{ name: 'postal', label: 'ZIP / Postal code', autoComplete: 'shipping postal-code', placeholder: '78701', required: true, half: true },
{
name: 'country',
label: 'Country',
type: 'select',
autoComplete: 'shipping country-name',
placeholder: 'Choose your country…',
required: true,
half: true,
options: ['United States', 'Canada', 'United Kingdom', 'Australia', 'New Zealand', 'Ireland'],
},
];
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
function fill(template: string, map: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (m, k: string) => (k in map ? String(map[k]) : m));
}
function validate(fields: CheckoutField[], values: Record<string, string>, copy: SteppedCheckoutRailCopy) {
const out: Record<string, string> = {};
for (const f of fields) {
const v = (values[f.name] ?? '').trim();
const label = f.label.toLowerCase();
if (f.required && !v) out[f.name] = fill(f.type === 'select' ? copy.chooseOption : copy.required, { label });
else if (f.type === 'email' && v && !EMAIL.test(v)) out[f.name] = copy.invalidEmail;
}
return out;
}
const R = '.cf-stepped-checkout-rail';
const SH = 'var(--shadow, oklch(0.22 0.03 260))';
const CTA = 'var(--button-bg, var(--cta, oklch(0.58 0.21 29)))';
const CTA2 = 'var(--button-bg-2, var(--cta-2, oklch(0.51 0.21 29)))';
const FOCUS = 'oklch(from var(--field-focus, var(--accent)) l c h / .55)';
const CSS = `
${R}{--scr-gutter:clamp(16px,5vw,48px);--scr-well:color-mix(in oklch,var(--ink) 4%,var(--card));--scr-sh:var(--shadow,oklch(0.22 0.03 260));position:relative;isolation:isolate;background:var(--surface);color:var(--ink);font-family:var(--font-body,system-ui,sans-serif);padding:clamp(56px,8vw,112px) 0 clamp(64px,8.5vw,120px)}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} .scr-fx{position:absolute;top:0;right:0;width:min(56%,760px);height:min(620px,75%);overflow:hidden;pointer-events:none;z-index:0}
${R} .scr-wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto;padding:0 var(--scr-gutter)}
${R} .scr-head{max-width:46rem;margin:0 0 clamp(32px,4vw,48px)}
${R} .scr-h{margin:0 0 16px;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink)}
${R} .scr-em{color:var(--accent)}
${R} .scr-lead{margin:0;max-width:64ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
${R} .scr-lock{border:0;margin:0;padding:0;min-width:0}
${R} .scr-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:clamp(32px,4vw,56px);align-items:start}
${R} .scr-main{min-width:0}
${R} .scr-steps{display:grid;gap:16px}
${R} .scr-step{border-radius:var(--card-radius,var(--radius,14px));scroll-margin-top:96px}
${R} .scr-step.is-idle{background:color-mix(in oklch,var(--ink) 4%,var(--surface));padding:18px clamp(20px,3vw,32px)}
${R} .scr-step.is-active{background:var(--card);border:1px solid oklch(from var(--accent) l c h / .35);box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32));padding:clamp(20px,3vw,32px)}
${R} .scr-step-head{display:flex;align-items:flex-start;gap:14px}
${R} .scr-step-mark{flex:0 0 auto;min-width:28px;text-align:center;font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-variant-numeric:tabular-nums;color:var(--accent)}
${R} .scr-step-titles{flex:1;min-width:0}
${R} .scr-step-t{margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:-0.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;color:var(--ink)}
${R} .scr-step-t:focus{outline:none}
${R} .is-idle .scr-step-mark,${R} .is-idle .scr-step-t{font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.3}
${R} .is-idle .scr-step-mark{color:var(--muted)}
${R} .scr-step-sub{margin:4px 0 0;font-size:15px;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty;overflow-wrap:anywhere}
${R} .scr-tick{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;background:var(--success);color:var(--scr-badge-ink,#fff);vertical-align:middle}
${R} .scr-panel{margin-top:24px;animation:scr-rise .45s cubic-bezier(.2,.7,.2,1) both}
${R} .scr-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:56px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from ${CTA} calc(l + .04) c h),oklch(from ${CTA2} calc(l - .02) c h));color:var(--button-ink,var(--cta-ink,#fff));text-shadow:var(--button-text-shadow,none);font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from ${CTA} calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from ${CTA} calc(l - .16) c h),0 1px 2px oklch(from ${SH} l c h / .3),0 8px 16px -6px oklch(from ${SH} l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
${R} .scr-btn:hover:not(:disabled){background:linear-gradient(oklch(from ${CTA} calc(l - .01) c h),oklch(from ${CTA2} calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from ${CTA} calc(l + .1) c h / .6),inset 0 -3px 0 oklch(from ${CTA} calc(l - .2) c h),0 1px 2px oklch(from ${SH} l c h / .32),0 10px 18px -6px oklch(from ${SH} l c h / .55))}
${R} .scr-btn:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--scr-sh) l c h / .35),inset 0 -2px 0 oklch(from ${CTA} calc(l - .16) c h),0 1px 1px oklch(from var(--scr-sh) l c h / .3)}
${R} .scr-btn:focus-visible{outline:3px solid ${FOCUS};outline-offset:3px}
${R} .scr-btn:disabled{cursor:not-allowed;background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm))}
${R} .scr-btn--xl{width:100%;min-height:72px}
${R} .scr-btn2{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:15px;line-height:1.2;cursor:pointer;transition:background .16s ease,transform .16s ease}
${R} .scr-btn2:hover:not(:disabled){background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
${R} .scr-btn2:active:not(:disabled){transform:translateY(1px)}
${R} .scr-btn2:focus-visible{outline:3px solid ${FOCUS};outline-offset:2px}
${R} .scr-btn2:disabled{cursor:not-allowed;box-shadow:none}
${R} .scr-next{display:flex;justify-content:flex-end;margin-top:24px}
${R} .scr-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
${R} .scr-sr-input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
${R} .scr-ic{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
${R} .scr-pkgs{border:0;margin:0;padding:0;min-width:0;display:grid;gap:12px}
${R} .scr-pkg{position:relative;display:grid;grid-template-columns:24px minmax(0,1fr);gap:16px;padding:20px;border:2px solid transparent;border-radius:12px;background:var(--scr-well);cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
${R} .scr-pkg:not(.is-on):hover{border-color:oklch(from var(--ink) l c h / .2)}
${R} .scr-pkg.is-on{background:color-mix(in oklch,var(--accent) 8%,var(--card));border-color:var(--accent);box-shadow:var(--shadow-md)}
${R} .scr-pkg:has(input:focus-visible){outline:3px solid ${FOCUS};outline-offset:2px}
${R} .scr-radio{width:24px;height:24px;margin-top:2px;border-radius:999px;border:2px solid oklch(from var(--ink) l c h / .35);background:var(--field);display:grid;place-items:center}
${R} .scr-radio::after{content:'';width:12px;height:12px;border-radius:999px;background:var(--accent-fill,var(--accent));transform:scale(0);transition:transform .16s ease}
${R} .is-on .scr-radio{border-color:var(--accent-fill,var(--accent))}
${R} .is-on .scr-radio::after{transform:scale(1)}
${R} .scr-pkg-body{display:block;min-width:0}
${R} .scr-flag{display:inline-flex;align-items:center;min-height:28px;margin-bottom:10px;padding:4px 12px;border-radius:999px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));font-size:14px;font-weight:800;line-height:1.2}
${R} .scr-pkg-top{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 16px}
${R} .scr-pkg-name{font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;color:var(--ink);text-wrap:balance}
${R} .scr-pkg-price{display:flex;flex-direction:column;align-items:flex-end;text-align:right}
${R} .scr-pkg-price strong{font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
${R} .scr-pkg-price span{font-size:15px;font-weight:500;line-height:1.4;color:var(--muted)}
${R} .scr-inc-list{display:grid;gap:8px;margin-top:14px}
${R} .scr-inc{display:flex;gap:10px;align-items:flex-start;font-size:16px;line-height:1.45;color:var(--ink);text-wrap:pretty}
${R} .scr-inc svg{flex:0 0 auto;margin-top:.15em;color:var(--success)}
${R} .scr-thumbs{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
${R} .scr-thumbs img{display:block;width:64px;height:64px;border-radius:8px;object-fit:cover}
${R} .scr-alert{margin:0 0 20px;padding:12px 16px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:15px;font-weight:600;line-height:1.4}
${R} .scr-group+.scr-group{margin-top:28px}
${R} .scr-group-h{display:flex;align-items:center;gap:12px;margin:0 0 16px;font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;text-wrap:balance;color:var(--ink)}
${R} .scr-spot{display:inline-flex;flex:0 0 auto}
${R} .scr-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
${R} .scr-field{grid-column:1 / -1;min-width:0}
${R} .scr-field.is-half{grid-column:span 1}
${R} .scr-field label{display:block;margin-bottom:8px;font-size:16px;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
${R} .scr-opt{margin-left:6px;font-weight:500;color:var(--muted)}
${R} .scr-input{display:block;width:100%;height:56px;padding:0 16px;font-family:inherit;font-size:17px;color:var(--field-ink);background:var(--field);border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));appearance:none;transition:border-color .16s ease,box-shadow .16s ease}
${R} .scr-input::placeholder{color:color-mix(in oklch,var(--field-ink) 65%,var(--field));opacity:1}
${R} .scr-input:hover:not(:disabled){border-color:color-mix(in oklch,var(--ink) 40%,transparent)}
${R} .scr-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 / .35)}
${R} .scr-input[aria-invalid=true]{border-color:var(--danger)}
${R} .scr-input[aria-invalid=true]:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / .3)}
${R} .scr-input:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--ink) 4%,var(--field))}
${R} .scr-select{position:relative}
${R} .scr-select .scr-input{padding-right:48px;cursor:pointer}
${R} .scr-select .scr-input.is-empty{color:color-mix(in oklch,var(--field-ink) 65%,var(--field))}
${R} .scr-select option{color:var(--field-ink);background:var(--field)}
${R} .scr-chev{position:absolute;right:16px;top:50%;transform:translateY(-50%);pointer-events:none;color:var(--field-ink)}
${R} .scr-err{margin:8px 0 0;font-size:15px;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
${R} .scr-bumps{display:grid;gap:16px}
${R} .scr-bump{overflow:hidden;border-radius:14px;background:var(--bump);color:var(--bump-ink);border:2px solid oklch(from var(--bump-strip) calc(l - .22) c h / .45);transition:border-color .16s ease,box-shadow .16s ease}
${R} .scr-bump.is-on{border-color:oklch(from var(--bump-strip) calc(l - .38) c h);box-shadow:var(--shadow-md)}
${R} .scr-bump-strip{position:relative;display:flex;align-items:center;gap:14px;padding:14px 20px;background:var(--bump-strip);cursor:pointer;transition:background .16s ease}
${R} .scr-bump-strip:hover{background:oklch(from var(--bump-strip) calc(l - .03) c h)}
${R} .scr-bump-strip:has(input:focus-visible){outline:3px solid ${FOCUS};outline-offset:-3px}
${R} .scr-chk{flex:0 0 auto;display:grid;place-items:center;width:28px;height:28px;border-radius:8px;border:2px solid oklch(from var(--bump-ink) l c h / .55);background:var(--field);color:transparent;transition:background .16s ease,border-color .16s ease}
${R} .is-on .scr-chk{background:var(--success);border-color:var(--success);color:var(--scr-badge-ink,#fff)}
${R} .scr-bump-yes{font-family:var(--font-display,inherit);font-weight:800;font-size:18px;line-height:1.3;color:var(--bump-ink);text-wrap:pretty}
${R} .scr-bump-body{display:grid;grid-template-columns:96px minmax(0,1fr);gap:20px;align-items:start;padding:20px}
${R} .scr-bump-body.no-img{grid-template-columns:minmax(0,1fr)}
${R} .scr-bump-img{display:block;width:96px;height:96px;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--scr-sh) l c h / .3)) drop-shadow(0 10px 12px oklch(from var(--scr-sh) l c h / .2))}
${R} .scr-bump-h{margin:0 0 8px;font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;color:var(--bump-ink);text-wrap:balance}
${R} .scr-bump-p{margin:0;font-size:16px;line-height:1.5;color:var(--bump-ink);text-wrap:pretty}
${R} .scr-bump-p+.scr-bump-p{margin-top:8px}
${R} .scr-summary{margin-top:24px;padding:20px;border-radius:10px;background:var(--scr-well)}
${R} .scr-row{display:flex;justify-content:space-between;gap:16px;font-size:16px;line-height:1.4;color:var(--ink);text-wrap:pretty}
${R} .scr-row>span:first-child{min-width:0}
${R} .scr-row+.scr-row{margin-top:10px}
${R} .scr-num{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
${R} .scr-total{display:flex;justify-content:space-between;align-items:baseline;gap:16px;margin-top:16px}
${R} .scr-total-l{font-family:var(--font-display,inherit);font-weight:800;font-size:18px;line-height:1.2;color:var(--ink)}
${R} .scr-total-num{display:inline-block;font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
${R} .scr-q{margin:28px 0 16px;font-family:var(--font-display,inherit);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-align:center;text-wrap:balance;color:var(--ink)}
${R} .scr-summary+.scr-btn{margin-top:24px}
${R} .scr-reassure{list-style:none;margin:16px 0 0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;gap:8px 20px;font-size:15px;font-weight:600;line-height:1.4;color:var(--muted);text-align:center}
${R} .scr-reassure svg{color:var(--success)}
${R} .scr-rail{position:sticky;top:24px}
${R} .scr-rail-card{background:var(--card);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md));padding:28px}
${R} .scr-seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:6px}
${R} .scr-seg span{height:6px;border-radius:999px;background:oklch(from var(--ink) l c h / .12);transition:background .3s ease}
${R} .scr-seg--slim span{height:4px}
${R} .scr-seg .is-active{background:var(--accent-fill,var(--accent))}
${R} .scr-seg .is-done{background:var(--success)}
${R} .scr-rail-count{margin:12px 0 0;font-size:14px;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
${R} .scr-rail-steps{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:4px}
${R} .scr-rail-step{display:flex;align-items:flex-start;gap:12px;width:100%;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:background .16s ease}
${R} .scr-rail-step:hover:not(:disabled):not(.is-active){background:color-mix(in oklch,var(--ink) 5%,var(--card))}
${R} .scr-rail-step.is-active{background:color-mix(in oklch,var(--accent) 10%,var(--card));cursor:default}
${R} .scr-rail-step:disabled{cursor:default}
${R} .scr-rail-step:focus-visible{outline:3px solid ${FOCUS};outline-offset:2px}
${R} .scr-rail-mark{flex:0 0 28px;height:28px;display:grid;place-items:center;font-family:var(--font-display,inherit);font-weight:800;font-size:18px;font-variant-numeric:tabular-nums;color:var(--muted)}
${R} .is-active .scr-rail-mark{color:var(--accent)}
${R} .scr-rail-text{min-width:0}
${R} .scr-rail-t{display:block;font-size:16px;font-weight:700;line-height:1.3;color:var(--ink)}
${R} .scr-rail-s{display:block;margin-top:2px;font-size:15px;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty;overflow-wrap:anywhere}
${R} .scr-rail-sum{margin-top:20px;padding:16px;border-radius:10px;background:var(--scr-well)}
${R} .scr-rail-sum .scr-row{font-size:15px}
${R} .scr-rail-sum .scr-total{margin-top:12px}
${R} .scr-rail-sum .scr-total-l{font-size:16px}
${R} .scr-rail-sum .scr-total-num{font-size:2.5rem}
${R} .scr-rail-g{margin:16px 0 0;font-size:15px;font-weight:600;line-height:1.4;color:var(--ink);text-wrap:pretty}
${R} .scr-rail-g svg{color:var(--success)}
${R} .scr-phonebar{display:none}
${R} .scr-phonebar-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:10px}
${R} .scr-phonebar-step{min-width:0;font-size:14px;font-weight:800;line-height:1.3;color:var(--ink)}
${R} .scr-phonebar-total{font-family:var(--font-display,inherit);font-weight:800;font-size:18px;line-height:1.2;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--ink)}
${R} .scr-lock:disabled .scr-pkg,${R} .scr-lock:disabled .scr-bump-strip{cursor:not-allowed}
${R} .scr-rise{animation:scr-rise .45s cubic-bezier(.2,.7,.2,1) both}
@keyframes scr-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:959px){${R} .scr-fx{display:none}${R} .scr-grid{grid-template-columns:minmax(0,1fr)}${R} .scr-rail{display:none}${R} .scr-phonebar{display:block;position:sticky;top:0;z-index:3;margin:0 calc(-1 * var(--scr-gutter)) 16px;padding:12px var(--scr-gutter);background:var(--surface);border-bottom:1px solid oklch(from var(--ink) l c h / .1);box-shadow:var(--shadow-sm)}}
@media (max-width:559px){${R} .scr-next .scr-btn{width:100%;padding:0 20px}${R} .scr-pkg{gap:12px;padding:16px}${R} .scr-pkg-price{align-items:flex-start;text-align:left}${R} .scr-thumbs{gap:8px}${R} .scr-thumbs img{width:56px;height:56px}}
@media (max-width:479px){${R} .scr-field.is-half{grid-column:1 / -1}${R} .scr-bump-body{grid-template-columns:64px minmax(0,1fr);gap:14px;padding:16px}${R} .scr-bump-img{width:64px;height:64px}${R} .scr-bump-strip{padding:14px 16px}${R} .scr-step-head{gap:10px}}
@media (prefers-reduced-motion:reduce){${R} .scr-panel,${R} .scr-rise{animation:none}${R} .scr-btn,${R} .scr-btn2,${R} .scr-pkg,${R} .scr-radio::after,${R} .scr-input,${R} .scr-bump,${R} .scr-bump-strip,${R} .scr-chk,${R} .scr-seg span,${R} .scr-rail-step{transition:none}${R} .scr-btn:active:not(:disabled),${R} .scr-btn2:active:not(:disabled){transform:none}}
`;
pieces/checkout/stepped-checkout-rail/specimen.tsx 88 lines
import __studioImage66e7596a from "../assets/99e8e5b3f6151964.webp";
import __studioImage2eda14c6 from "../assets/3025e61ca3b40635.webp";
import React from 'react';
import SteppedCheckoutRail from '../stepped-checkout-rail';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'error', 'disabled'];
export default function SteppedCheckoutRailSpecimen({ state = 'default' }: { state?: 'default' | 'error' | 'disabled' }) {
const s = defaults.sample;
const [guide, workbook, checklist] = s.items;
const price = Number(s.price.replace(/[^0-9.]/g, ''));
const guideImg = { src: slot('item-1', guide.image), alt: guide.imageAlt };
const workbookImg = { src: slot('item-2', workbook.image), alt: workbook.imageAlt };
const checklistImg = { src: slot('item-3', checklist.image), alt: checklist.imageAlt };
return (
<SteppedCheckoutRail
state={state}
headline={`Your ${s.name.replace(/^The /, '')} is three quick steps away`}
headlineEmphasis='three quick steps'
lead='Pick your kit, tell us where to ship the printed guide, then check out. Your digital files are an instant download.'
steps={[
{ title: 'Choose the kit that fits your launch', short: 'Your kit', hint: 'Three ways to start' },
{ title: 'Tell us where to send your printed guide', short: 'Your details', hint: 'Takes about a minute' },
{ title: 'Add the finishing touches', short: 'Extras & total', hint: 'Optional extras, then your total' },
]}
packages={[
{
id: 'complete',
name: 'The complete kit',
price,
priceNote: 'less than one client call',
includes: [guide.name, workbook.name, checklist.name],
images: [guideImg, workbookImg, checklistImg],
flag: 'Everything included',
},
{
id: 'plan-copy',
name: 'Guide + Workbook',
price: 37,
priceNote: 'the plan and your page copy',
includes: [guide.name, workbook.name],
images: [guideImg, workbookImg],
},
{
id: 'guide',
name: 'Guide only',
price: 27,
priceNote: 'start with the plan',
includes: [guide.name],
images: [guideImg],
},
]}
defaultPackageId='complete'
contactTitle='Where should we send your receipt and downloads?'
shippingTitle='Where should we ship your printed guide?'
bumps={[
{
id: 'emails',
name: 'Follow-Up Email Swipe File',
price: 19,
headline: 'Write your first week of follow-up emails tonight',
copy: [
{ lead: 'Seven emails, ready to edit.', text: 'Swap in your offer and your sequence is ready the day your funnel goes live.' },
{ lead: 'Built to match your workbook.', text: 'Each email picks up the headline and offer you draft in the Page Copy Workbook.' },
],
image: slot('item-4', __studioImage66e7596a),
imageAlt: 'Follow-Up Email Swipe File booklet',
},
{
id: 'cards',
name: 'Launch Day Planner Cards',
price: 12,
headline: 'Walk into launch morning knowing what to check first',
copy: [{ lead: 'Twelve pocket cards.', text: 'One task per card, in the order you will need them on launch day.' }],
image: slot('item-5', __studioImage2eda14c6),
imageAlt: 'Launch Day Planner Cards held by a binder clip',
},
]}
closeQuestion='Ready to map your first funnel?'
submitLabel='I’m ready, send my kit'
reassurance={['Secure checkout', ...s.reassurance]}
guarantee={s.guarantee}
defaultValues={state === 'error' ? { fullName: 'Dana Reyes', email: 'dana@example', city: 'Austin' } : undefined}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalSteppedCheckoutRail |
string |
|
headlineEmphasis OptionalSteppedCheckoutRail |
string |
|
lead OptionalSteppedCheckoutRail |
React.ReactNode |
|
steps OptionalSteppedCheckoutRail |
CheckoutStep[] |
|
packages OptionalSteppedCheckoutRail |
CheckoutPackage[] |
|
defaultPackageId OptionalSteppedCheckoutRail |
string |
|
contactTitle OptionalSteppedCheckoutRail |
string |
|
contactFields OptionalSteppedCheckoutRail |
CheckoutField[] |
|
shippingTitle OptionalSteppedCheckoutRail |
string |
|
shippingFields OptionalSteppedCheckoutRail |
CheckoutField[] |
|
shippingSpot OptionalSteppedCheckoutRail |
string | null |
|
bumps OptionalSteppedCheckoutRail |
CheckoutBump[] |
|
closeQuestion OptionalSteppedCheckoutRail |
string |
|
submitLabel OptionalSteppedCheckoutRail |
string |
|
reassurance OptionalSteppedCheckoutRail |
string[] |
|
guarantee OptionalSteppedCheckoutRail |
string |
|
currency OptionalSteppedCheckoutRail |
string |
|
defaultValues OptionalSteppedCheckoutRail |
Record<string, string> |
|
initialStep OptionalSteppedCheckoutRail |
0 | 1 | 2 |
|
copy OptionalSteppedCheckoutRail |
Partial<SteppedCheckoutRailCopy> |
|
state OptionalSteppedCheckoutRail |
'default' | 'error' | 'disabled' |
|
onSubmit OptionalSteppedCheckoutRail |
(values: SteppedCheckoutRailValues) => void |
|
className OptionalSteppedCheckoutRail |
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--button-2-shadow- 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.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-3- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-4- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-5- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
3025e61ca3b40635.webp
image/webp · 120 KB
-
75ba15955a7397f6.webp
image/webp · 18.6 KB
-
99e8e5b3f6151964.webp
image/webp · 206 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB