Two Step Order 5
Sells seats to a live event in two steps on a dark stage. The lanyard pass hangs large in the spotlight beside an order card whose oversized step numerals run down a left rail. The seat count drives one name field per pass and the live total.
Use it in a prompt
Use checkout/two-step-order-5 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/two-step-order-5.tsx. - Import it and pass your copy and images (Props tab):
import { TwoStepOrder5 } from "@/components/funneldna/checkout/two-step-order-5"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/two-step-order-5/component.tsx 956 lines
// layout: number-rail
// Sells seats to a live event in two steps on a dark stage. The lanyard pass hangs large in the spotlight beside an order card whose oversized step numerals run down a left rail. The seat count drives one name field per pass and the live total.
// Theme notes: official payment-network SVG marks keep their brand colours (theme-contract mark exception). Solid status ticks draw a white glyph through --status-glyph. The add-on box reads --bump, --bump-strip and --bump-ink. The guarantee swipe reads --marker. The stage photo is the fx stage backdrop, replaced by the page's scene slot.
'use client'
import * as React from 'react'
import { AlertCircle, CalendarDays, Check, Clock, CreditCard, Loader2, Lock, Mail, MapPin, Minus, Plus, ShieldCheck, User, type LucideIcon } from 'lucide-react'
import { AmericanExpress, Discover, Mastercard, Visa } from 'react-svg-credit-card-payment-icons/icons/flat-rounded'
import { Backdrop, FX_HOST } from '../fx/fx'
import stage from '../fx/backdrops/stage'
export type EventPassBump = {
/** Add-on name, read inside copy.bumpLabel ("Yes! Add the {title} for {price}"). */
title: string
/** Supplied add-on price, added to the total only when ticked. */
price: string
body?: string
/** Line in the total breakdown when ticked. Defaults to the title. */
summaryLabel?: string
/** Add-on cut-out on a transparent background (slot: item-1). */
image?: string
imageAlt?: string
}
export type CardMark = 'visa' | 'mastercard' | 'amex' | 'discover'
/** What onSubmit receives. The piece never sends data or charges money. */
export type EventPassOrder = {
quantity: number
/** One name per pass, in seat order. */
attendees: string[]
email: string
cardNumber: string
cardExpiry: string
cardCvc: string
bumpSelected: boolean
/** Total in currency units: seats plus the add-on when ticked. */
total: number
}
export type TwoStepOrder5State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
const COPY = {
/** {event} is replaced with the event name. */
cardHeading: 'Save your seats at {event}',
totalLabel: 'Total today',
totalNote: 'one-time payment',
/** {seats} and {price} are replaced. */
lineSeats: '{seats} × {price}',
/** {label} and {price} are replaced. */
lineBump: '+ {label} {price}',
stepsLabel: 'Order steps',
/** {n} is replaced with the step number (read by screen readers). */
stepNumber: 'Step {n} of 2: ',
step1Title: 'Choose your seats',
step1Done: 'Seats chosen',
step2Title: 'Pay and get your passes',
step2Locked: 'Opens as soon as your seats are set.',
seatsLabel: 'How many seats?',
/** {price} is replaced with the seat price. */
seatEach: '{price} per seat',
/** {max} is replaced with the most seats per order. */
seatsHint: 'Up to {max} seats per order.',
seatsAtMax: 'That’s the most seats in one order.',
removeSeat: 'Remove a seat',
addSeat: 'Add a seat',
seatOne: '1 seat',
/** {count} is replaced. */
seatMany: '{count} seats',
attendeesLegend: 'Who’s coming?',
/** {n} is replaced with the pass number. */
attendeeLabel: 'Name on pass {n}',
attendeePlaceholders: ['Jane Smith', 'Alex Rivera', 'Priya Patel', 'Marcus Lee', 'Sofia Garcia', 'Daniel Kim', 'Grace Chen', 'Omar Haddad', 'Emma Brooks', 'Leo Martins'],
emailLabel: 'Email for your passes',
emailPlaceholder: 'you@example.com',
nextLabel: 'Continue to Payment',
nextNote: 'Payment is the last step.',
changeLabel: 'Change',
changeAria: 'Change seats and names (back to step 1)',
weAccept: 'We accept',
cardNames: { visa: 'Visa', mastercard: 'Mastercard', amex: 'American Express', discover: 'Discover' } as Record<CardMark, string>,
cardNumberLabel: 'Card number',
cardNumberPlaceholder: '1234 5678 9012 3456',
expiryLabel: 'Expiry',
expiryPlaceholder: 'MM / YY',
cvcLabel: 'CVC',
cvcPlaceholder: '123',
/** {title} and {price} are replaced. */
bumpLabel: 'Yes! Add the {title} for {price}',
riskLead: 'Book risk-free:',
/** {total} is replaced with the live total. */
orderOne: 'Reserve My Seat · {total}',
/** {count} and {total} are replaced. */
orderMany: 'Reserve My {count} Seats · {total}',
loading: 'Processing your order…',
orderNote: 'Secure checkout · One payment',
/** {count} and {fields} are replaced. */
alert: 'Please fix {count} {fields} to continue.',
fieldWord: 'field',
fieldsWord: 'fields',
/** {n} is replaced with the pass number. */
nameRequired: 'Enter the name for pass {n}.',
emailInvalid: 'Enter a valid email address, like you@example.com.',
cardInvalid: 'Enter the full number on your card.',
expiryInvalid: 'Enter the expiry as MM / YY.',
cvcInvalid: 'Enter the 3 or 4 digit code on your card.',
submitError: 'We couldn’t complete your order. Please try again.',
/** Screen-reader update when seats or the add-on change; {seats} and {total} are replaced. */
live: '{seats}. Total today {total}.',
}
export type TwoStepOrder5Copy = typeof COPY
export type TwoStepOrder5Props = {
/** Used in the card heading. */
eventName?: string
/** Stage headline. */
headline?: React.ReactNode
lead?: string
/** Supplied event date; hidden when empty. */
date?: string
/** Supplied doors / session time; hidden when empty. */
time?: string
/** Supplied venue and city; hidden when empty. */
venue?: string
/** Lanyard pass cut-out on a transparent background (slot: product). */
passImage?: string
passImageAlt?: string
/** fx backdrop asset behind the stage; the page's scene image replaces it automatically. */
backdropImage?: string
/** Supplied price per seat, used for the live total. */
ticketPrice?: string
/** Most seats in one order. */
maxTickets?: number
initialQuantity?: number
/** Optional add-on, unchecked at first. Supply it only with a real price. */
bump?: EventPassBump | null
/** Risk reversal that leads the order button. Null hides it. */
guarantee?: string | null
acceptedCards?: CardMark[]
/** ISO currency code used to format totals. */
currency?: string
/** Interface copy. Templates replace {event}, {seats}, {price}, {label}, {n}, {max}, {count}, {total}, {title} and {fields} as text. */
copy?: Partial<TwoStepOrder5Copy>
/** active opens step 2 (payment); hover previews the button hover; error shows step 1 with inline errors; disabled locks every control. */
state?: TwoStepOrder5State
initialStep?: 1 | 2
/** Prefilled values keyed by attendee-1 … attendee-n, email, cardNumber, cardExpiry, cardCvc. */
defaultValues?: Record<string, string>
/** Locks every control, same as state disabled. */
disabled?: boolean
/** Called with the validated seats, names and email when the buyer moves to payment. */
onContinue?: (details: { quantity: number; attendees: string[]; email: string }) => void
/** Receives the validated order. A returned promise shows the processing label; a rejection shows copy.submitError. */
onSubmit?: (order: EventPassOrder) => void | Promise<void>
className?: string
}
export function TwoStepOrder5({
eventName = 'the workshop',
headline = 'Save your seat for the live workshop',
lead = 'Spend the day working through your offer, your page copy and your next steps, in the room.',
date,
time,
venue,
passImage,
passImageAlt = 'Event pass on a lanyard',
backdropImage = stage,
ticketPrice = '$197',
maxTickets = 5,
initialQuantity = 1,
bump = null,
guarantee = '30-day money-back guarantee',
acceptedCards = ALL_CARDS,
currency = 'USD',
copy: copyOverrides,
state,
initialStep = 1,
defaultValues,
disabled: disabledProp = false,
onContinue,
onSubmit,
className = '',
}: TwoStepOrder5Props) {
const copy: TwoStepOrder5Copy = { ...COPY, ...defined<TwoStepOrder5Copy>(copyOverrides) }
const uid = 'tso5' + React.useId().replace(/[^a-zA-Z0-9]/g, '')
const max = Math.max(1, Math.floor(maxTickets) || 1)
const startQty = clamp(Math.floor(initialQuantity) || 1, 1, max)
const disabled = state === 'disabled' || disabledProp
const [step, setStep] = React.useState<1 | 2>(state === 'active' ? 2 : state === 'error' ? 1 : initialStep)
const [qty, setQty] = React.useState(startQty)
const [values, setValues] = React.useState<Record<string, string>>(() => ({ ...(defaultValues ?? {}) }))
const [errors, setErrors] = React.useState<Record<string, string>>(() => (state === 'error' ? checkSeats(startQty, defaultValues ?? {}, copy) : {}))
const [showAlert, setShowAlert] = React.useState(state === 'error')
const [bumpOn, setBumpOn] = React.useState(false)
const [loading, setLoading] = React.useState(false)
const [failed, setFailed] = React.useState(false)
const alive = React.useRef(true)
const frame = React.useRef<number | undefined>(undefined)
const moved = React.useRef(false)
const formRef = React.useRef<HTMLFormElement>(null)
const title1 = React.useRef<HTMLHeadingElement>(null)
const title2 = React.useRef<HTMLHeadingElement>(null)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
if (frame.current !== undefined) cancelAnimationFrame(frame.current)
}
}, [])
React.useEffect(() => {
if (!moved.current) return
moved.current = false
;(step === 1 ? title1 : title2).current?.focus()
}, [step])
const locked = disabled || loading
const seatPrice = toNumber(ticketPrice)
const bumpPrice = bump ? toNumber(bump.price) : 0
const total = Math.round((seatPrice * qty + (bump && bumpOn ? bumpPrice : 0)) * 100) / 100
const totalText = money(total, currency).text
const seatsText = qty === 1 ? copy.seatOne : fill(copy.seatMany, { count: qty })
const atMin = qty <= 1
const atMax = qty >= max
const names = Array.from({ length: qty }, (_, i) => (values[seatKey(i + 1)] ?? '').trim())
const errorCount = Object.keys(errors).length
const alertText = fill(copy.alert, { count: errorCount, fields: errorCount === 1 ? copy.fieldWord : copy.fieldsWord })
const orderLabel = fill(qty === 1 ? copy.orderOne : copy.orderMany, { count: qty, total: totalText })
const placeholders = copy.attendeePlaceholders.length ? copy.attendeePlaceholders : COPY.attendeePlaceholders
const meta = [
date ? { Icon: CalendarDays, text: date } : null,
time ? { Icon: Clock, text: time } : null,
venue ? { Icon: MapPin, text: venue } : null,
].filter(Boolean) as { Icon: LucideIcon; text: string }[]
function setValue(name: string, value: string) {
setValues((v) => ({ ...v, [name]: value }))
if (errors[name]) {
setErrors((e) => {
const next = { ...e }
delete next[name]
return next
})
}
if (failed) setFailed(false)
}
function changeQty(delta: number) {
if (locked) return
const next = clamp(qty + delta, 1, max)
if (next === qty) return
setQty(next)
setErrors((e) => {
const out: Record<string, string> = {}
for (const [key, message] of Object.entries(e)) {
const n = seatIndex(key)
if (n === 0 || n <= next) out[key] = message
}
return out
})
}
function focusFirstError() {
if (frame.current !== undefined) cancelAnimationFrame(frame.current)
frame.current = requestAnimationFrame(() => {
frame.current = undefined
formRef.current?.querySelector<HTMLInputElement>('[aria-invalid="true"]')?.focus()
})
}
function goBack() {
if (locked) return
moved.current = true
setShowAlert(false)
setFailed(false)
setErrors({})
setStep(1)
}
function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
if (locked) return
if (step === 1) {
const found = checkSeats(qty, values, copy)
if (Object.keys(found).length) {
setErrors(found)
setShowAlert(true)
focusFirstError()
return
}
setErrors({})
setShowAlert(false)
onContinue?.({ quantity: qty, attendees: names, email: (values.email ?? '').trim() })
moved.current = true
setStep(2)
return
}
const found = checkPayment(values, copy)
if (Object.keys(found).length) {
setErrors(found)
setShowAlert(true)
focusFirstError()
return
}
setErrors({})
setShowAlert(false)
setFailed(false)
const order: EventPassOrder = {
quantity: qty,
attendees: names,
email: (values.email ?? '').trim(),
cardNumber: (values.cardNumber ?? '').replace(/\D/g, ''),
cardExpiry: values.cardExpiry ?? '',
cardCvc: values.cardCvc ?? '',
bumpSelected: Boolean(bump && bumpOn),
total,
}
let result: void | Promise<void> | undefined
try {
result = onSubmit?.(order)
} catch {
setFailed(true)
return
}
if (result && typeof (result as Promise<void>).then === 'function') {
setLoading(true)
;(result as Promise<void>).then(
() => {
if (alive.current) setLoading(false)
},
() => {
if (alive.current) {
setLoading(false)
setFailed(true)
}
}
)
}
}
return (
<section
className={`cf-two-step-order-5 ${className}`.trim()}
style={{ ...FX_HOST, overflow: 'clip' }}
data-preview={state === 'hover' ? 'hover' : undefined}
aria-labelledby={`${uid}-title`}
>
<Backdrop src={backdropImage} treatment="scrim-dark" />
<style>{CSS}</style>
<div className="tso5-wrap">
<div className="tso5-side">
<div className="tso5-head">
<h2 id={`${uid}-title`} className="tso5-title">
{headline}
</h2>
{lead ? <p className="tso5-lead">{lead}</p> : null}
</div>
{passImage ? (
<div className="tso5-stage">
<img className="tso5-pass" src={passImage} alt={passImageAlt} width={640} height={640} decoding="async" />
</div>
) : null}
{meta.length ? (
<ul className="tso5-meta">
{meta.map(({ Icon, text }) => (
<li key={text}>
<Icon className="tso5-ii" size={16} strokeWidth={2.5} aria-hidden="true" />
{text}
</li>
))}
</ul>
) : null}
</div>
<div className="tso5-order">
<form
ref={formRef}
className="tso5-card"
noValidate
onSubmit={handleSubmit}
aria-labelledby={`${uid}-card`}
aria-busy={loading || undefined}
data-loading={loading ? '' : undefined}
>
<fieldset className="tso5-lock" disabled={locked}>
<h3 id={`${uid}-card`} className="tso5-card__title">
{fill(copy.cardHeading, { event: eventName })}
</h3>
<div className="tso5-well">
<div className="tso5-lines">
<p className="tso5-micro">{copy.totalLabel}</p>
<p>{fill(copy.lineSeats, { seats: seatsText, price: ticketPrice })}</p>
{bump && bumpOn ? <p>{fill(copy.lineBump, { label: bump.summaryLabel ?? bump.title, price: bump.price })}</p> : null}
</div>
<div className="tso5-total">
<Price amount={total} currency={currency} className="tso5-price--total" />
<p className="tso5-total__note">{copy.totalNote}</p>
</div>
</div>
<ol className="tso5-steps" aria-label={copy.stepsLabel}>
<li className={`tso5-step ${step === 1 ? 'is-active' : 'is-done'}`} aria-current={step === 1 ? 'step' : undefined}>
<div className="tso5-rail" aria-hidden="true">
<span className="tso5-num">1</span>
</div>
<div className="tso5-body">
<h4 ref={title1} tabIndex={-1} className="tso5-step__title">
<span className="tso5-sr">{fill(copy.stepNumber, { n: 1 })}</span>
{step === 1 ? (
copy.step1Title
) : (
<>
<span className="tso5-badge" aria-hidden="true">
<Check size={16} strokeWidth={3} />
</span>
{copy.step1Done}
</>
)}
</h4>
{step === 1 ? (
<div className="tso5-panel">
{showAlert && errorCount > 0 ? (
<p className="tso5-alert" role="alert">
<AlertCircle className="tso5-ii" size={18} strokeWidth={2.5} aria-hidden="true" />
{alertText}
</p>
) : null}
<div className="tso5-seats" role="group" aria-labelledby={`${uid}-seats`}>
<p className="tso5-label" id={`${uid}-seats`}>
{copy.seatsLabel}
</p>
<div className="tso5-seats__row">
<div className="tso5-stepper">
<button
type="button"
className="tso5-secondary tso5-stepbtn"
aria-label={copy.removeSeat}
aria-disabled={atMin || undefined}
aria-controls={`${uid}-names`}
onClick={() => changeQty(-1)}
>
<Minus size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
<span className="tso5-count">
<span aria-hidden="true">{qty}</span>
<span className="tso5-sr">{seatsText}</span>
</span>
<button
type="button"
className="tso5-secondary tso5-stepbtn"
aria-label={copy.addSeat}
aria-disabled={atMax || undefined}
aria-controls={`${uid}-names`}
onClick={() => changeQty(1)}
>
<Plus size={20} strokeWidth={2.5} aria-hidden="true" />
</button>
</div>
<p className="tso5-each">{fill(copy.seatEach, { price: ticketPrice })}</p>
</div>
<p className="tso5-hint">{atMax ? copy.seatsAtMax : fill(copy.seatsHint, { max })}</p>
</div>
<fieldset className="tso5-group" id={`${uid}-names`}>
<legend className="tso5-label tso5-legend">{copy.attendeesLegend}</legend>
<div className="tso5-fields">
{Array.from({ length: qty }, (_, i) => {
const n = i + 1
const key = seatKey(n)
return (
<Field
key={key}
className="tso5-seat"
id={`${uid}-${key}`}
name={key}
label={fill(copy.attendeeLabel, { n })}
icon={User}
value={values[key] ?? ''}
onChange={(e) => setValue(key, e.target.value)}
placeholder={placeholders[i % placeholders.length]}
autoComplete={n === 1 ? 'name' : 'off'}
error={errors[key]}
/>
)
})}
</div>
</fieldset>
<div className="tso5-fields">
<Field
id={`${uid}-email`}
name="email"
type="email"
inputMode="email"
autoComplete="email"
label={copy.emailLabel}
icon={Mail}
value={values.email ?? ''}
onChange={(e) => setValue('email', e.target.value)}
placeholder={copy.emailPlaceholder}
error={errors.email}
/>
</div>
<div className="tso5-action">
<button type="submit" className="tso5-primary">
{copy.nextLabel}
</button>
<p className="tso5-note">{copy.nextNote}</p>
</div>
</div>
) : (
<div className="tso5-summary">
<p className="tso5-summary__text">
<strong>{seatsText}</strong>
{names.filter(Boolean).length ? ` · ${names.filter(Boolean).join(', ')}` : ''}
{values.email ? <span className="tso5-summary__email">{values.email}</span> : null}
</p>
<button type="button" className="tso5-secondary" onClick={goBack} aria-label={copy.changeAria}>
{copy.changeLabel}
</button>
</div>
)}
</div>
</li>
<li className={`tso5-step ${step === 2 ? 'is-active' : 'is-locked'}`} aria-current={step === 2 ? 'step' : undefined}>
<div className="tso5-rail" aria-hidden="true">
<span className="tso5-num">2</span>
</div>
<div className="tso5-body">
<h4 ref={title2} tabIndex={-1} className="tso5-step__title">
<span className="tso5-sr">{fill(copy.stepNumber, { n: 2 })}</span>
{copy.step2Title}
</h4>
{step === 1 ? (
<p className="tso5-hint tso5-hint--locked">{copy.step2Locked}</p>
) : (
<div className="tso5-panel">
{showAlert && errorCount > 0 ? (
<p className="tso5-alert" role="alert">
<AlertCircle className="tso5-ii" size={18} strokeWidth={2.5} aria-hidden="true" />
{alertText}
</p>
) : null}
{acceptedCards.length ? (
<p className="tso5-marks">
<span>{copy.weAccept}</span>
{acceptedCards.map((mark) => (
<CardLogo key={mark} mark={mark} label={copy.cardNames[mark]} />
))}
</p>
) : null}
<div className="tso5-fields">
<Field
id={`${uid}-card-number`}
name="cardNumber"
inputMode="numeric"
autoComplete="cc-number"
label={copy.cardNumberLabel}
icon={CreditCard}
value={values.cardNumber ?? ''}
onChange={(e) => setValue('cardNumber', formatCard(e.target.value))}
placeholder={copy.cardNumberPlaceholder}
error={errors.cardNumber}
/>
<Field
half
id={`${uid}-card-expiry`}
name="cardExpiry"
inputMode="numeric"
autoComplete="cc-exp"
label={copy.expiryLabel}
icon={CalendarDays}
value={values.cardExpiry ?? ''}
onChange={(e) => setValue('cardExpiry', formatExpiry(e.target.value))}
placeholder={copy.expiryPlaceholder}
error={errors.cardExpiry}
/>
<Field
half
id={`${uid}-card-cvc`}
name="cardCvc"
inputMode="numeric"
autoComplete="cc-csc"
label={copy.cvcLabel}
icon={Lock}
value={values.cardCvc ?? ''}
onChange={(e) => setValue('cardCvc', e.target.value.replace(/\D/g, '').slice(0, 4))}
placeholder={copy.cvcPlaceholder}
error={errors.cardCvc}
/>
</div>
{bump ? (
<div className={`tso5-bump${bumpOn ? ' is-on' : ''}`}>
<label className="tso5-bump__strip" htmlFor={`${uid}-bump`}>
<input
id={`${uid}-bump`}
type="checkbox"
className="tso5-bump__input"
checked={bumpOn}
onChange={(e) => setBumpOn(e.target.checked)}
/>
<span className="tso5-bump__box" aria-hidden="true">
<Check size={16} strokeWidth={3} />
</span>
<span className="tso5-bump__label">{fill(copy.bumpLabel, { title: bump.title, price: bump.price })}</span>
</label>
{bump.body || bump.image ? (
<div className="tso5-bump__body">
{bump.image ? (
<img className="tso5-bump__img" src={bump.image} alt={bump.imageAlt ?? ''} width={160} height={160} loading="lazy" decoding="async" />
) : null}
{bump.body ? <p>{bump.body}</p> : null}
</div>
) : null}
</div>
) : null}
{failed ? (
<p className="tso5-alert" role="alert">
<AlertCircle className="tso5-ii" size={18} strokeWidth={2.5} aria-hidden="true" />
{copy.submitError}
</p>
) : null}
<div className="tso5-action">
{guarantee ? (
<p className="tso5-risk">
<ShieldCheck className="tso5-ii tso5-risk__icon" size={20} strokeWidth={2.5} aria-hidden="true" />
{copy.riskLead} <mark className="tso5-mark">{guarantee}</mark>
</p>
) : null}
<button type="submit" className="tso5-primary">
{loading ? (
<>
<Loader2 className="tso5-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
{copy.loading}
</>
) : (
orderLabel
)}
</button>
<p className="tso5-note">
<Lock className="tso5-ii" size={16} strokeWidth={2.5} aria-hidden="true" />
{copy.orderNote}
</p>
</div>
</div>
)}
</div>
</li>
</ol>
</fieldset>
<p className="tso5-sr" aria-live="polite">
{fill(copy.live, { seats: seatsText, total: totalText })}
</p>
</form>
</div>
</div>
</section>
)
}
export default TwoStepOrder5
const ALL_CARDS: CardMark[] = ['visa', 'mastercard', 'amex', 'discover']
const EMAIL = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/
type FieldProps = {
id: string
label: string
icon: LucideIcon
error?: string
/** Shares a row with the neighbouring half field. */
half?: boolean
className?: string
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'id' | 'className'>
function Field({ id, label, icon: Icon, error, half, className = '', ...input }: FieldProps) {
const errId = `${id}-error`
return (
<div className={`tso5-field${half ? ' tso5-field--half' : ''} ${className}`.trim()}>
<label className="tso5-label" htmlFor={id}>
{label}
</label>
<div className="tso5-control">
<Icon className="tso5-control__icon" size={18} strokeWidth={2.5} aria-hidden="true" />
<input id={id} className="tso5-input" aria-invalid={error ? true : undefined} aria-describedby={error ? errId : undefined} {...input} />
</div>
{error ? (
<p className="tso5-error" id={errId}>
<AlertCircle className="tso5-ii" size={16} strokeWidth={2.5} aria-hidden="true" />
{error}
</p>
) : null}
</div>
)
}
function Price({ amount, currency, className = '' }: { amount: number; currency: string; className?: string }) {
const m = money(amount, currency)
return (
<span className={`tso5-price ${className}`.trim()}>
<sup className="tso5-price__sym">{m.symbol}</sup>
<span key={m.text} className="tso5-fig">
{m.figure}
</span>
</span>
)
}
function CardLogo({ mark, label }: { mark: CardMark; label: string }) {
if (mark === 'visa') return <Visa aria-label={label} />
if (mark === 'mastercard') return <Mastercard aria-label={label} />
if (mark === 'amex') return <AmericanExpress aria-label={label} />
return <Discover aria-label={label} />
}
function seatKey(n: number) {
return `attendee-${n}`
}
function seatIndex(key: string) {
const match = /^attendee-(\d+)$/.exec(key)
return match ? Number(match[1]) : 0
}
function checkSeats(qty: number, values: Record<string, string>, copy: TwoStepOrder5Copy) {
const out: Record<string, string> = {}
for (let n = 1; n <= qty; n++) {
if ((values[seatKey(n)] ?? '').trim().length < 2) out[seatKey(n)] = fill(copy.nameRequired, { n })
}
if (!EMAIL.test((values.email ?? '').trim())) out.email = copy.emailInvalid
return out
}
function checkPayment(values: Record<string, string>, copy: TwoStepOrder5Copy) {
const out: Record<string, string> = {}
const digits = (values.cardNumber ?? '').replace(/\D/g, '')
if (digits.length < 13 || digits.length > 19) out.cardNumber = copy.cardInvalid
if (!/^(0[1-9]|1[0-2]) \/ \d{2}$/.test(values.cardExpiry ?? '')) out.cardExpiry = copy.expiryInvalid
if (!/^\d{3,4}$/.test(values.cardCvc ?? '')) out.cardCvc = copy.cvcInvalid
return out
}
function formatCard(value: string) {
return value.replace(/\D/g, '').slice(0, 19).replace(/(\d{4})(?=\d)/g, '$1 ')
}
function formatExpiry(value: string) {
const d = value.replace(/\D/g, '').slice(0, 4)
return d.length > 2 ? `${d.slice(0, 2)} / ${d.slice(2)}` : d
}
function toNumber(price: string) {
const n = Number(String(price).replace(/[^0-9.]/g, ''))
return Number.isFinite(n) ? n : 0
}
function money(amount: number, currency: string) {
const whole = Math.abs(Math.round(amount * 100)) % 100 === 0
const digits = whole ? 0 : 2
try {
const parts = new Intl.NumberFormat('en-US', { style: 'currency', currency, minimumFractionDigits: digits, maximumFractionDigits: digits }).formatToParts(amount)
return {
symbol: parts.filter((p) => p.type === 'currency').map((p) => p.value).join(''),
figure: parts.filter((p) => p.type !== 'currency' && p.type !== 'literal').map((p) => p.value).join(''),
text: parts.map((p) => p.value).join(''),
}
} catch {
const figure = amount.toFixed(digits)
return { symbol: '$', figure, text: `$${figure}` }
}
}
function fill(template: string, vars: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (all, key: string) => (key in vars ? String(vars[key]) : all))
}
function clamp(n: number, min: number, max: number) {
return Math.min(max, Math.max(min, n))
}
function defined<T extends object>(o?: Partial<T>): Partial<T> {
const out: Partial<T> = {}
if (o) for (const k of Object.keys(o) as (keyof T)[]) if (o[k] !== undefined) out[k] = o[k]
return out
}
const R = '.cf-two-step-order-5'
const CSS = `
${R}{--tso5-rail:3.75rem;--tso5-gap:16px;--tso5-shadow:var(--shadow,oklch(0.22 0.03 256));--tso5-ease:cubic-bezier(.2,.7,.2,1);position:relative;isolation:isolate;background:var(--band,oklch(0.27 0.067 256));color:var(--band-ink,#fff);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px);-webkit-font-smoothing:antialiased}
${R},${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} :where(h2,h3,h4,p,ul,ol,fieldset,legend){margin:0;padding:0}
${R} :where(ul,ol){list-style:none}
${R} :where(fieldset){border:0;min-width:0}
${R} :where(button,input){font:inherit}
${R} .tso5-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} .tso5-ii{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
${R} .tso5-wrap{position:relative;z-index:1;max-width:1120px;margin-inline:auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,31rem);grid-template-areas:'side order';column-gap:clamp(32px,5vw,72px);row-gap:24px;align-items:start}
${R} .tso5-side{grid-area:side;position:sticky;top:clamp(16px,3vw,32px);display:grid;gap:24px;min-width:0}
${R} .tso5-head{text-align:center}
${R} .tso5-title{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(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--band-ink,#fff)}
${R} .tso5-lead{margin:16px auto 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;color:var(--band-ink,#fff)}
${R} .tso5-stage{display:flex;justify-content:center}
${R} .tso5-pass{display:block;width:min(100%,26rem);height:auto;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--tso5-shadow) calc(l - 0.1) c h / 0.55)) drop-shadow(0 18px 22px oklch(from var(--tso5-shadow) calc(l - 0.1) c h / 0.45))}
${R} .tso5-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
${R} .tso5-meta li{min-height:32px;padding:6px 14px;border-radius:999px;background:oklch(from var(--band-ink,#fff) l c h / 0.12);color:var(--band-ink,#fff);font-size:.9375rem;font-weight:600;line-height:1.35;text-align:center;text-wrap:pretty}
${R} .tso5-order{grid-area:order;position:relative;min-width:0}
${R} .tso5-card{background:var(--card,#fff);color:var(--ink);border:1px solid var(--card-border,color-mix(in oklch,var(--accent) 26%,var(--card,#fff)));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--tso5-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--tso5-shadow) l c h / 0.32)));padding:clamp(20px,3vw,32px)}
${R} .tso5-card__title{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance;color:var(--ink)}
${R} .tso5-micro{font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--ink)}
${R} .tso5-well{margin-top:16px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px 16px;padding:16px 20px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card,#fff));color:var(--ink)}
${R} .tso5-lines{display:grid;gap:6px;min-width:0;font-size:.9375rem;font-weight:600;line-height:1.4}
${R} .tso5-lines .tso5-micro{margin-bottom:4px}
${R} .tso5-total{display:grid;justify-items:end;text-align:right}
${R} .tso5-total__note{margin-top:22px;font-size:.9375rem;font-weight:600;line-height:1.2;color:var(--ink)}
${R} .tso5-price{display:inline-flex;align-items:flex-start;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.03em;font-variant-numeric:tabular-nums;line-height:1;color:var(--ink);white-space:nowrap}
${R} .tso5-price__sym{position:static;font-size:.42em;line-height:1;margin:.14em .06em 0 0;letter-spacing:0;vertical-align:baseline}
${R} .tso5-fig{display:inline-block}
${R} .tso5-price--total{font-size:clamp(2.5rem,4.2vw,3.75rem)}
${R} .tso5-steps{margin-top:24px;display:grid}
${R} .tso5-step{display:grid;grid-template-columns:var(--tso5-rail) minmax(0,1fr);column-gap:var(--tso5-gap);align-items:start}
${R} .tso5-step+.tso5-step{margin-top:24px;padding-top:24px;border-top:1px solid oklch(from var(--ink) l c h / 0.12)}
${R} .tso5-rail{display:flex;justify-content:center}
${R} .tso5-num{display:block;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:.9;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--muted);transition:color .16s ease}
${R} .tso5-step.is-active .tso5-num{color:var(--accent)}
${R} .tso5-step.is-done .tso5-num{color:var(--success)}
${R} .tso5-body{min-width:0}
${R} .tso5-step__title{display:flex;align-items:center;gap:10px;min-height:2.2em;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance;color:var(--ink);outline:none}
${R} .tso5-step.is-locked .tso5-step__title{color:var(--muted)}
${R} .tso5-badge{flex:none;display:inline-grid;place-items:center;width:26px;height:26px;border-radius:999px;background:var(--success);color:var(--status-glyph,#fff)}
${R} .tso5-panel{display:grid;gap:24px;margin-top:16px}
${R} .tso5-label{display:block;margin-bottom:8px;font-size:1rem;font-weight:700;line-height:1.3;color:var(--label-ink,var(--ink))}
${R} .tso5-legend{float:none;width:100%}
${R} .tso5-hint{margin-top:8px;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
${R} .tso5-hint--locked{margin-top:4px}
${R} .tso5-seats__row{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px}
${R} .tso5-stepper{display:inline-flex;align-items:center;gap:8px}
${R} .tso5-count{min-width:2.4ch;text-align:center;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1;font-variant-numeric:tabular-nums;color:var(--ink)}
${R} .tso5-each{font-size:.9375rem;font-weight:600;color:var(--muted)}
${R} .tso5-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}
${R} .tso5-field{grid-column:1 / -1;min-width:0}
${R} .tso5-field--half{grid-column:span 1}
${R} .tso5-control{position:relative}
${R} .tso5-control__icon{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:color-mix(in oklch,var(--field-ink,var(--ink)) 60%,var(--field,#fff));pointer-events:none}
${R} .tso5-input{display:block;width:100%;height:56px;padding:0 16px 0 46px;font-size:1.0625rem;color:var(--field-ink,var(--ink));background:var(--field,#fff);border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));box-shadow:inset 0 1px 2px oklch(from var(--tso5-shadow) l c h / 0.08);transition:border-color .16s ease,box-shadow .16s ease}
${R} .tso5-input::placeholder{color:color-mix(in oklch,var(--field-ink,var(--ink)) 65%,var(--field,#fff));opacity:1}
${R} .tso5-input:hover:not(:disabled){border-color:color-mix(in oklch,var(--ink) 40%,transparent)}
${R} .tso5-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)}
${R} .tso5-input[aria-invalid='true']{border-color:var(--danger)}
${R} .tso5-input[aria-invalid='true']:focus{box-shadow:0 0 0 3px oklch(from var(--danger) l c h / 0.3)}
${R} .tso5-input:disabled{background:color-mix(in oklch,var(--ink) 5%,var(--field,#fff));cursor:not-allowed}
${R} .tso5-error{margin-top:8px;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--danger);text-wrap:pretty}
${R} .tso5-alert{padding:12px 16px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:700;line-height:1.4;text-wrap:pretty}
${R} .tso5-marks{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:.9375rem;font-weight:600;color:var(--muted)}
${R} .tso5-marks>span{margin-inline-end:4px}
${R} .tso5-marks svg{display:block;width:40px;height:auto}
${R} .tso5-bump{border-radius:10px;overflow:hidden;border:1px solid oklch(from var(--bump-ink,var(--ink)) l c h / 0.18);background:var(--bump,oklch(0.975 0.04 95));color:var(--bump-ink,var(--ink));transition:border-color .16s ease}
${R} .tso5-bump.is-on{border-color:var(--success)}
${R} .tso5-bump__strip{position:relative;display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--bump-strip,oklch(0.93 0.11 95));color:var(--bump-ink,var(--ink));font-size:1.0625rem;font-weight:800;line-height:1.3;cursor:pointer}
${R} .tso5-bump__input{position:absolute;opacity:0;width:1px;height:1px;margin:0;pointer-events:none}
${R} .tso5-bump__box{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:7px;background:var(--card,#fff);border:2px solid oklch(from var(--bump-ink,var(--ink)) l c h / 0.55);color:transparent;transition:background .16s ease,border-color .16s ease}
${R} .tso5-bump__strip:hover .tso5-bump__box{border-color:var(--bump-ink,var(--ink))}
${R} .tso5-bump__input:checked+.tso5-bump__box{background:var(--success);border-color:var(--success);color:var(--status-glyph,#fff)}
${R} .tso5-bump__input:focus-visible+.tso5-bump__box{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
${R} .tso5-lock:disabled .tso5-bump__strip{cursor:not-allowed}
${R} .tso5-bump__label{min-width:0;text-wrap:pretty}
${R} .tso5-bump__body{display:flex;align-items:flex-start;gap:14px;padding:14px 16px 16px;font-size:1rem;line-height:1.5}
${R} .tso5-bump__body p{text-wrap:pretty}
${R} .tso5-bump__img{flex:none;width:72px;height:72px;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--tso5-shadow) l c h / 0.3))}
${R} .tso5-action{display:grid;gap:12px;justify-items:stretch;width:100%;text-align:center}
${R} .tso5-risk{font-size:1.0625rem;font-weight:600;line-height:1.45;color:var(--ink);text-wrap:pretty}
${R} .tso5-risk__icon{color:var(--accent)}
${R} .tso5-mark{color:inherit;font-weight:800;padding:0 .2em;background:linear-gradient(to bottom,transparent 38%,var(--marker,#fae37c) 38%,var(--marker,#fae37c) 94%,transparent 94%);border-radius:.2em .35em .25em .3em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
${R} .tso5-note{font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
${R} .tso5-primary{--tso5-dl:0;--tso5-fill:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + 0.04 - var(--tso5-dl)) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.02 - var(--tso5-dl)) c h));display:inline-flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;padding:12px 24px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:var(--tso5-fill);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;text-align:center;text-wrap:balance;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--tso5-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--tso5-shadow) l c h / 0.45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}
${R} .tso5-primary:hover:not(:disabled),${R}[data-preview='hover'] .tso5-primary:not(:disabled){--tso5-dl:0.05;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.1) c h / 0.6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.2) c h),0 1px 2px oklch(from var(--tso5-shadow) l c h / 0.35),0 10px 18px -6px oklch(from var(--tso5-shadow) l c h / 0.55))}
${R} .tso5-primary:active:not(:disabled){--tso5-dl:0.08;transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--tso5-shadow) l c h / 0.35),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 1px oklch(from var(--tso5-shadow) l c h / 0.3)}
${R} .tso5-primary:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
${R} .tso5-primary:disabled{background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:none;cursor:not-allowed}
${R} .tso5-card[data-loading] .tso5-primary:disabled{--tso5-dl:0.03;background:var(--tso5-fill);color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);cursor:progress}
${R} .tso5-secondary{flex:none;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));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1rem;line-height:1;cursor:pointer;transition:background .16s ease,transform .16s ease,box-shadow .16s ease}
${R} .tso5-secondary:hover:not(:disabled):not([aria-disabled='true']){background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.05) c h)}
${R} .tso5-secondary:active:not(:disabled):not([aria-disabled='true']){transform:translateY(1px);box-shadow:none;background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.08) c h)}
${R} .tso5-secondary:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
${R} .tso5-secondary:disabled,${R} .tso5-secondary[aria-disabled='true']{opacity:.45;box-shadow:none;cursor:not-allowed}
${R} .tso5-stepbtn{width:48px;height:48px;padding:0}
${R} .tso5-summary{margin-top:12px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card,#fff))}
${R} .tso5-summary__text{min-width:0;font-size:1rem;line-height:1.45;color:var(--ink);overflow-wrap:anywhere;text-wrap:pretty}
${R} .tso5-summary__email{display:block;margin-top:2px;font-weight:500}
@keyframes tso5-rise{from{opacity:.82;transform:translateY(8px)}}
@keyframes tso5-pop{from{transform:scale(.9)}}
@keyframes tso5-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:no-preference){
${R} .tso5-pass{animation:tso5-rise .45s var(--tso5-ease) both}
${R} .tso5-panel{animation:tso5-rise .45s var(--tso5-ease) both}
${R} .tso5-seat{animation:tso5-rise .45s var(--tso5-ease) both}
${R} .tso5-fig{animation:tso5-pop .3s var(--tso5-ease) both}
${R} .tso5-spin{animation:tso5-spin .8s linear infinite}
}
@media (max-width:900px){
${R} .tso5-wrap{grid-template-columns:minmax(0,1fr);grid-template-areas:'side' 'order';max-width:36rem;row-gap:20px}
${R} .tso5-side{position:static;gap:20px}
${R} .tso5-stage{order:-1}
${R} .tso5-pass{width:min(52%,15rem)}
${R} .tso5-order{margin-top:8px}
}
@media (max-width:760px){
${R} .tso5-pass{width:9.5rem}
${R} .tso5-well{padding:14px 16px}
${R} .tso5-step{grid-template-columns:auto minmax(0,1fr);column-gap:14px}
${R} .tso5-body{display:contents}
${R} .tso5-rail{grid-column:1;grid-row:1;align-self:center}
${R} .tso5-num{font-size:2.5rem}
${R} .tso5-step__title{grid-column:2;grid-row:1}
${R} .tso5-panel,${R} .tso5-summary,${R} .tso5-hint--locked{grid-column:1 / -1}
}
@media (max-width:420px){
${R} .tso5-bump__img{width:56px;height:56px}
${R} .tso5-summary{flex-wrap:wrap}
}
@media (prefers-reduced-motion:reduce){
${R} *,${R} *::before,${R} *::after{animation:none !important;transition:none !important}
${R} .tso5-primary:active:not(:disabled),${R} .tso5-secondary:active:not(:disabled){transform:none}
}
`
pieces/checkout/two-step-order-5/specimen.tsx 51 lines
import __studioImage1d12c9c6 from "../assets/3d8b0f7c2243a29f.webp";
import __studioImageec7ff732 from "../assets/87f1278df682c84d.webp";
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { TwoStepOrder5 } from '../two-step-order-5'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'error'
const FILLED = {
'attendee-1': 'Dana Reyes',
'attendee-2': 'Marco Tan',
email: 'dana@example.com',
}
export default function TwoStepOrder5Specimen({ state = 'default' }: { state?: SpecimenState }) {
return (
<TwoStepOrder5
key={state}
eventName="Founders Table Live"
headline="Pull up a chair at Founders Table Live"
lead="One day in Austin to work through your offer, your page copy and your next steps, side by side with founders doing the same."
date="Saturday, March 13, 2027"
time="9:00 AM to 5:00 PM"
venue="Eastside Commons, Austin, TX"
ticketPrice="$197"
maxTickets={5}
initialQuantity={2}
passImage={slot(
'product',
__studioImage1d12c9c6
)}
passImageAlt="Founders Table Live event pass on a navy lanyard"
bump={{
title: 'session recordings',
summaryLabel: 'Session recordings',
price: '$47',
body: 'Rewatch every session after the day, and share them with the teammates who couldn’t make the trip.',
image: slot(
'item-1',
__studioImageec7ff732
),
imageAlt: 'Tablet showing a workshop session beside headphones',
}}
guarantee={defaults.sample.guarantee}
state={state}
defaultValues={state === 'active' ? FILLED : undefined}
/>
)
}
| Name | Type | Details |
|---|---|---|
eventName OptionalTwoStepOrder5 |
string |
Default 'the workshop'
|
headline OptionalTwoStepOrder5 |
React.ReactNode |
Default 'Save your seat for the live workshop'
|
lead OptionalTwoStepOrder5 |
string |
Default 'Spend the day working through your offer, your page copy and your next steps, in the room.'
|
date OptionalTwoStepOrder5 |
string |
|
time OptionalTwoStepOrder5 |
string |
|
venue OptionalTwoStepOrder5 |
string |
|
passImage OptionalTwoStepOrder5 |
string |
|
passImageAlt OptionalTwoStepOrder5 |
string |
Default 'Event pass on a lanyard'
|
backdropImage OptionalTwoStepOrder5 |
string |
Default stage
|
ticketPrice OptionalTwoStepOrder5 |
string |
Default '$197'
|
maxTickets OptionalTwoStepOrder5 |
number |
Default 5
|
initialQuantity OptionalTwoStepOrder5 |
number |
Default 1
|
bump OptionalTwoStepOrder5 |
EventPassBump | null |
Default null
|
guarantee OptionalTwoStepOrder5 |
string | null |
Default '30-day money-back guarantee'
|
acceptedCards OptionalTwoStepOrder5 |
CardMark[] |
Default ALL_CARDS
|
currency OptionalTwoStepOrder5 |
string |
Default 'USD'
|
copy OptionalTwoStepOrder5 |
Partial<TwoStepOrder5Copy> |
|
state OptionalTwoStepOrder5 |
TwoStepOrder5State |
|
initialStep OptionalTwoStepOrder5 |
1 | 2 |
Default 1
|
defaultValues OptionalTwoStepOrder5 |
Record<string, string> |
|
disabled OptionalTwoStepOrder5 |
boolean |
Default false
|
onContinue OptionalTwoStepOrder5 |
(details: { quantity: number; attendees: string[]; email: string }) => void |
|
onSubmit OptionalTwoStepOrder5 |
(order: EventPassOrder) => void | Promise<void> |
|
className OptionalTwoStepOrder5 |
string |
Default ''
|
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--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.
--marker- The highlighter colour behind key phrases.
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.
product- The main product shot or cover (ebook, kit, bottle).
-
3d8b0f7c2243a29f.webp
image/webp · 45.1 KB
-
44c4a68a8f1604d6.webp
image/webp · 18.4 KB
-
87f1278df682c84d.webp
image/webp · 45.3 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB