One Step Order 7
Takes the whole order in one step: the promise, a recap of what's inside, and one order card with an optional add-on.
Use it in a prompt
Use checkout/one-step-order-7 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/one-step-order-7.tsx. - Import it and pass your copy and images (Props tab):
import { OneStepOrder7 } from "@/components/funneldna/checkout/one-step-order-7"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/one-step-order-7/component.tsx 520 lines
// Takes the whole order in one step: the promise, a recap of what's inside, and one order card with an optional add-on.
// layout: classic-centred-stack
'use client'
import * as React from 'react'
import { AlertCircle, Check, CreditCard, Loader2, Lock, ShieldCheck } from 'lucide-react'
import { AmericanExpress, Discover, Mastercard, Visa } from 'react-svg-credit-card-payment-icons/icons/flat-rounded'
export type OneStepOrder7State = 'default' | 'hover' | 'active' | 'disabled' | 'error' | 'success'
export type OneStepOrder7Item = { name: string; detail?: string; value?: string; image?: string; imageAlt?: string }
export type OneStepOrder7Bump = { title: string; price: string; body: string; summaryName?: string }
export type OneStepOrder7Network = 'visa' | 'mastercard' | 'amex' | 'discover'
export type OneStepOrder7Values = { name: string; email: string; card: string; exp: string; cvc: string }
type Field = keyof OneStepOrder7Values
type Errors = Partial<Record<Field, string>>
type Phase = 'idle' | 'loading'
const ORDER_COPY = {
formNote: 'Contact and payment in one quick step',
contactTitle: 'Your details',
paymentTitle: 'Payment',
nameLabel: 'Full name',
namePlaceholder: 'Your full name',
emailLabel: 'Email address',
emailPlaceholder: 'you@example.com',
cardLabel: 'Card number',
cardPlaceholder: '1234 1234 1234 1234',
expLabel: 'Expiry date',
expPlaceholder: 'MM / YY',
cvcLabel: 'Security code',
cvcPlaceholder: 'CVC',
nameError: 'Enter your full name.',
emailError: 'Enter a valid email address.',
cardError: 'Check your card number.',
expError: 'Enter a valid expiry date.',
cvcError: 'Enter the {digits}-digit code on your card.',
networksLabel: 'Cards accepted',
whatYouGet: 'What you get',
valueLabel: 'Value',
regularLabel: 'Regular price',
saveLabel: 'You save {amount}',
bumpTag: 'One-time offer:',
totalLabel: 'Total today',
orderTotalLabel: 'Order total',
loadingLabel: 'Processing your order…',
successNamed: 'You’re in, {name}!',
}
export type OneStepOrder7Copy = typeof ORDER_COPY
const NETS = [
{ key: 'visa', name: 'Visa', Icon: Visa },
{ key: 'mastercard', name: 'Mastercard', Icon: Mastercard },
{ key: 'amex', name: 'American Express', Icon: AmericanExpress },
{ key: 'discover', name: 'Discover', Icon: Discover },
] as const
const FIELDS: Field[] = ['name', 'email', 'card', 'exp', 'cvc']
const EMPTY: OneStepOrder7Values = { name: '', email: '', card: '', exp: '', cvc: '' }
const ERROR_PREFILL: OneStepOrder7Values = { name: 'Jordan Lee', email: 'jordan@example', card: '4242 4242 4242 4241', exp: '13 / 24', cvc: '12' }
export type OneStepOrder7Props = {
/** Override supporting labels, placeholders and validation copy. */
copy?: Partial<OneStepOrder7Copy>
/** Receives validated local values and the add-on choice. A returned promise shows the loading label; a rejection shows errorMessage. Nothing is sent or charged by the block. */
onSubmit?: (values: Readonly<OneStepOrder7Values>, bumpSelected: boolean) => void | Promise<void>
headline?: string
/** One continuous phrase inside the headline that gets the marker stroke. */
highlight?: string
lead?: string
productName?: string
productImage?: string
productImageAlt?: string
note?: string
items?: OneStepOrder7Item[]
price?: string
regularPrice?: string
todayLabel?: string
guarantee?: string
bump?: OneStepOrder7Bump | null
/** Only list the networks the real processor accepts. */
networks?: OneStepOrder7Network[]
formTitle?: string
label?: string
sublabel?: string
/** @deprecated No longer rendered: the builder wires what happens after the order. */
successTitle?: string
/** @deprecated No longer rendered: the builder wires what happens after the order. */
successMessage?: string
errorMessage?: string
disabledMessage?: string
/** "success" is accepted for older callers and renders as default. */
state?: OneStepOrder7State
disabled?: boolean
className?: string
}
export function OneStepOrder7({
copy: copyOverrides,
onSubmit,
headline = 'Build your first funnel with a clear plan',
highlight = 'clear plan',
lead = 'Plan your funnel, write your page copy, and check every step before you launch.',
productName = 'The Funnel Starter Kit',
productImage,
productImageAlt = '',
note,
items = [],
price = '$47',
regularPrice,
todayLabel = 'Get the complete kit for',
guarantee = '30-day money-back guarantee',
bump = null,
networks = ['visa', 'mastercard', 'amex', 'discover'],
formTitle = 'Complete your order',
label = 'Complete My Order',
sublabel,
errorMessage = 'We couldn’t complete your order. Please check the highlighted fields.',
disabledMessage = 'Checkout is unavailable right now.',
state = 'default',
disabled = false,
className,
}: OneStepOrder7Props) {
const copy = { ...ORDER_COPY, ...Object.fromEntries(Object.entries(copyOverrides ?? {}).filter(([, v]) => v !== undefined)) } as OneStepOrder7Copy
const uid = 'os7' + React.useId().replace(/[^a-zA-Z0-9]/g, '')
const [values, setValues] = React.useState<OneStepOrder7Values>(() => (state === 'error' ? { ...ERROR_PREFILL } : { ...EMPTY }))
const [errors, setErrors] = React.useState<Errors>(() => (state === 'error' ? validate(ERROR_PREFILL, copy) : {}))
const [failed, setFailed] = React.useState(state === 'error')
const [phase, setPhase] = React.useState<Phase>('idle')
const [bumpOn, setBumpOn] = React.useState(false)
const request = React.useRef(0)
const refs = React.useRef<Partial<Record<Field, HTMLInputElement | null>>>({})
React.useEffect(() => {
request.current++
const prefill = state === 'error' ? { ...ERROR_PREFILL } : { ...EMPTY }
setValues(prefill)
setErrors(state === 'error' ? validate(prefill, copy) : {})
setFailed(state === 'error')
setPhase('idle')
setBumpOn(false)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [state])
React.useEffect(() => () => { request.current++ }, [])
const isDisabled = disabled || state === 'disabled'
const busy = phase === 'loading'
const sym = symbolOf(price)
const base = parseMoney(price)
const bumpAmount = bump ? parseMoney(bump.price) : null
const totalValue = base === null ? null : base + (bump && bumpOn && bumpAmount !== null ? bumpAmount : 0)
const total = totalValue === null ? price : fmt(totalValue, sym)
const regular = parseMoney(regularPrice)
const savings = regular !== null && base !== null && regular > base ? fmt(regular - base, sym) : null
const brand = detectBrand(digits(values.card))
const Brand = brand ? NETS.find((n) => n.key === brand)?.Icon : undefined
const force = state === 'hover' ? ' is-hover' : state === 'active' ? ' is-active' : ''
const shownNets = NETS.filter((n) => networks.includes(n.key))
function update(field: Field, raw: string) {
const value = field === 'card' ? formatCard(raw) : field === 'exp' ? formatExp(raw) : field === 'cvc' ? digits(raw).slice(0, 4) : raw
setValues((prev) => ({ ...prev, [field]: value }))
if (errors[field]) setErrors((prev) => ({ ...prev, [field]: undefined }))
}
function check(field: Field) {
if (values[field]) setErrors((prev) => ({ ...prev, [field]: validate(values, copy)[field] }))
}
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
event.preventDefault()
if (isDisabled || busy) return
const next = validate(values, copy)
const firstBad = FIELDS.find((f) => next[f])
if (firstBad) {
setErrors(next)
setFailed(true)
refs.current[firstBad]?.focus()
return
}
setErrors({})
setFailed(false)
if (!onSubmit) return
const id = ++request.current
try {
const result = onSubmit({ ...values }, bumpOn)
if (!result) return
setPhase('loading')
await result
if (id === request.current) setPhase('idle')
} catch {
if (id === request.current) { setPhase('idle'); setFailed(true) }
}
}
const input = (f: Field, o: { label: string; placeholder: string; autoComplete: string; type?: string; inputMode?: 'numeric' | 'email' | 'text'; icon?: React.ReactNode; trailing?: React.ReactNode; maxLength?: number }) => {
const id = `${uid}-${f}`
const err = errors[f]
return (
<div className='os7-field' data-invalid={err ? '' : undefined}>
<label htmlFor={id}>{o.label}</label>
<div className={'os7-input' + (o.icon ? ' has-icon' : '') + (o.trailing ? ' has-trail' : '')}>
{o.icon ? <span className='os7-ico' aria-hidden='true'>{o.icon}</span> : null}
<input
ref={(el) => { refs.current[f] = el }}
id={id}
name={f}
type={o.type ?? 'text'}
inputMode={o.inputMode}
autoComplete={o.autoComplete}
placeholder={o.placeholder}
maxLength={o.maxLength}
value={values[f]}
onChange={(e) => update(f, e.target.value)}
onBlur={() => check(f)}
aria-invalid={err ? true : undefined}
aria-describedby={err ? id + '-err' : undefined}
required
/>
{o.trailing ? <span className='os7-trail' aria-hidden='true'>{o.trailing}</span> : null}
</div>
{err ? <p className='os7-err' id={id + '-err'}><AlertCircle aria-hidden='true' />{err}</p> : null}
</div>
)
}
return (
<section className={'os7' + (className ? ' ' + className : '')} aria-labelledby={uid + '-h'}>
<style>{CSS}</style>
<div className='os7-wrap'>
<header className='os7-head'>
<h2 className='os7-h' id={uid + '-h'}>{withMark(headline, highlight)}</h2>
{lead ? <p className='os7-lead'>{lead}</p> : null}
</header>
<div className='os7-grid'>
<aside className='os7-recap' aria-labelledby={uid + '-name'}>
{productImage ? <img className='os7-product' src={productImage} alt={productImageAlt} width={640} height={640} decoding='async' /> : null}
<h3 className='os7-name' id={uid + '-name'}>{productName}</h3>
{note ? <p className='os7-note'>{note}</p> : null}
{items.length ? (
<>
<p className='os7-label'>{copy.whatYouGet}</p>
<ul className='os7-items'>
{items.map((item, i) => (
<li className={'os7-item' + (item.image ? '' : ' no-img')} key={item.name + i}>
{item.image ? (
<img className='os7-thumb' src={item.image} alt={item.imageAlt ?? ''} width={112} height={112} loading='lazy' />
) : (
<span className='os7-tickmark' aria-hidden='true'><Check /></span>
)}
<div>
<strong>{item.name}</strong>
{item.detail ? <span className='os7-item-d'>{item.detail}</span> : null}
</div>
{item.value ? <span className='os7-val'><span className='os7-sr'>{copy.valueLabel} </span>{item.value}</span> : null}
</li>
))}
</ul>
</>
) : null}
<div className='os7-price'>
{todayLabel ? <p className='os7-price-lbl'>{todayLabel}</p> : null}
<p className='os7-price-row'>
{regularPrice ? <s className='os7-was'><span className='os7-sr'>{copy.regularLabel} </span>{regularPrice}</s> : null}
<span className='os7-big'>{price}</span>
{savings ? <span className='os7-save'>{copy.saveLabel.replace('{amount}', savings)}</span> : null}
</p>
</div>
{guarantee ? <p className='os7-guar'><ShieldCheck aria-hidden='true' />{guarantee}</p> : null}
</aside>
<div className='os7-cardwrap'>
<div className='os7-card'>
<>
<div className='os7-card-head'>
<h3 className='os7-card-h' id={uid + '-form'}>{formTitle}</h3>
<p className='os7-card-sub'><Lock aria-hidden='true' />{copy.formNote}</p>
</div>
<form className='os7-form' onSubmit={handleSubmit} noValidate aria-labelledby={uid + '-form'}>
{failed ? <div className='os7-alert' role='alert'><AlertCircle aria-hidden='true' /><span>{errorMessage}</span></div> : null}
<fieldset className='os7-all' disabled={isDisabled || busy}>
<fieldset className='os7-fs' aria-labelledby={uid + '-c'}>
<div className='os7-fs-head'><span className='os7-fs-title' id={uid + '-c'}>{copy.contactTitle}</span></div>
<div className='os7-row2 is-contact'>
{input('name', { label: copy.nameLabel, placeholder: copy.namePlaceholder, autoComplete: 'name' })}
{input('email', { label: copy.emailLabel, placeholder: copy.emailPlaceholder, autoComplete: 'email', type: 'email', inputMode: 'email' })}
</div>
</fieldset>
<fieldset className='os7-fs' aria-labelledby={uid + '-p'}>
<div className='os7-fs-head'>
<span className='os7-fs-title' id={uid + '-p'}>{copy.paymentTitle}</span>
{shownNets.length ? (
<ul className='os7-nets' aria-label={copy.networksLabel}>
{shownNets.map(({ key, name, Icon }) => (
<li key={key}><Icon aria-hidden='true' /><span className='os7-sr'>{name}</span></li>
))}
</ul>
) : null}
</div>
{input('card', { label: copy.cardLabel, placeholder: copy.cardPlaceholder, autoComplete: 'cc-number', inputMode: 'numeric', icon: <CreditCard />, trailing: Brand ? <Brand /> : undefined })}
<div className='os7-row2'>
{input('exp', { label: copy.expLabel, placeholder: copy.expPlaceholder, autoComplete: 'cc-exp', inputMode: 'numeric', maxLength: 7 })}
{input('cvc', { label: copy.cvcLabel, placeholder: copy.cvcPlaceholder, autoComplete: 'cc-csc', inputMode: 'numeric', maxLength: 4 })}
</div>
</fieldset>
{bump ? (
<div className='os7-bump' data-on={bumpOn ? '' : undefined}>
<label className='os7-bump-head' htmlFor={uid + '-bump'}>
<input className='os7-sr' id={uid + '-bump'} type='checkbox' checked={bumpOn} onChange={(e) => setBumpOn(e.target.checked)} aria-describedby={uid + '-bump-d'} />
<span className='os7-box' aria-hidden='true'><Check /></span>
<span className='os7-bump-title'>{bump.title}</span>
<span className='os7-bump-price'>+{bump.price}</span>
</label>
<p className='os7-bump-body' id={uid + '-bump-d'}><strong>{copy.bumpTag}</strong> {bump.body}</p>
</div>
) : null}
</fieldset>
<dl className='os7-sum' aria-live='polite'>
<div className='os7-sum-row'><dt>{productName}</dt><dd>{price}</dd></div>
{bump && bumpOn ? <div className='os7-sum-row is-add'><dt>{bump.summaryName ?? bump.title}</dt><dd>{bump.price}</dd></div> : null}
<div className='os7-sum-total'><dt>{copy.totalLabel}</dt><dd><span className='os7-tick' key={total}>{total}</span></dd></div>
</dl>
<div className='os7-action'>
<button type='submit' className={'os7-btn' + force} disabled={isDisabled || busy} aria-busy={busy || undefined} aria-describedby={isDisabled || sublabel ? uid + '-secure' : undefined}>
{busy ? <><Loader2 className='os7-spin' aria-hidden='true' /><span>{copy.loadingLabel}</span></> : <span>{label}</span>}
</button>
{isDisabled ? (
<p className='os7-secure' id={uid + '-secure'} role='status'><AlertCircle aria-hidden='true' />{disabledMessage}</p>
) : sublabel ? (
<p className='os7-secure' id={uid + '-secure'}><Lock aria-hidden='true' />{sublabel}</p>
) : null}
</div>
</form>
</>
</div>
</div>
</div>
</div>
</section>
)
}
export default OneStepOrder7
function withMark(text: string, phrase?: string) {
if (!phrase) return text
const at = text.indexOf(phrase)
if (at < 0) return text
return <>{text.slice(0, at)}<span className='os7-mark'>{phrase}</span>{text.slice(at + phrase.length)}</>
}
function digits(s: string) { return s.replace(/[^0-9]/g, '') }
function detectBrand(d: string): OneStepOrder7Network | null {
if (/^4/.test(d)) return 'visa'
if (/^(5[1-5]|2[2-7])/.test(d)) return 'mastercard'
if (/^3[47]/.test(d)) return 'amex'
if (/^(6011|65|64[4-9])/.test(d)) return 'discover'
return null
}
function luhn(d: string) {
let sum = 0
let alt = false
for (let i = d.length - 1; i >= 0; i--) {
let n = Number(d[i])
if (alt) { n *= 2; if (n > 9) n -= 9 }
sum += n
alt = !alt
}
return d.length > 0 && sum % 10 === 0
}
function formatCard(raw: string) {
const d = digits(raw).slice(0, 19)
if (detectBrand(d) === 'amex') return [d.slice(0, 4), d.slice(4, 10), d.slice(10, 15)].filter(Boolean).join(' ')
return (d.match(/.{1,4}/g) ?? []).join(' ')
}
function formatExp(raw: string) {
const d = digits(raw).slice(0, 4)
return d.length > 2 ? d.slice(0, 2) + ' / ' + d.slice(2) : d
}
function parseMoney(s?: string) {
if (!s || !/[0-9]/.test(s)) return null
const n = Number(s.replace(/[^0-9.]/g, ''))
return Number.isFinite(n) ? n : null
}
function symbolOf(s: string) { return (s.match(/^[^0-9]*/)?.[0] ?? '').trim() || '$' }
function fmt(n: number, sym: string) { return sym + (Number.isInteger(n) ? String(n) : n.toFixed(2)) }
function validate(v: OneStepOrder7Values, c: OneStepOrder7Copy): Errors {
const e: Errors = {}
if (v.name.trim().length < 2) e.name = c.nameError
if (!/^[^ @]+@[^ @]+[.][^ @]{2,}$/.test(v.email.trim())) e.email = c.emailError
const d = digits(v.card)
const brand = detectBrand(d)
if (d.length < (brand === 'amex' ? 15 : 13) || d.length > 19 || !luhn(d)) e.card = c.cardError
const m = v.exp.match(/^([0-9]{2}) ?[/] ?([0-9]{2})$/)
if (!m) e.exp = c.expError
else {
const month = Number(m[1])
const year = 2000 + Number(m[2])
const now = new Date()
if (month < 1 || month > 12 || year < now.getFullYear() || (year === now.getFullYear() && month < now.getMonth() + 1)) e.exp = c.expError
}
const need = brand === 'amex' ? 4 : 3
if (digits(v.cvc).length !== need) e.cvc = c.cvcError.replace('{digits}', String(need))
return e
}
const CSS = `
.os7{--os7-ink:var(--ink,#1b2333);--os7-muted:var(--muted,#566173);--os7-band:var(--band,#1d2b4a);--os7-band-ink:var(--band-ink,#fff);--os7-band-2:color-mix(in oklab,var(--band-ink,#fff) 80%,var(--band,#1d2b4a));--os7-band-lift:oklch(from var(--band,#1d2b4a) calc(l + .05) c h);--os7-quiet:color-mix(in oklch,var(--ink,#1b2333) 4%,var(--card,#fff));--os7-focus:var(--field-focus,var(--accent,#2f5fd0));--os7-shadow:var(--shadow,oklch(.22 .03 260));--os7-r:var(--radius,12px);--os7-btn:var(--button-bg,var(--cta,#d4322c));--os7-btn-2:var(--button-bg-2,var(--cta-2,#b0241f));position:relative;isolation:isolate;overflow-x:clip;background:var(--surface,#fff);color:var(--os7-ink);font-family:var(--font-body,system-ui,sans-serif);font-size:1rem;line-height:1.55;padding:clamp(3rem,7vw,6rem) clamp(1rem,4vw,2.5rem)}
.os7,.os7 *,.os7 *::before,.os7 *::after{box-sizing:border-box}
.os7 :where(h2,h3,p,ul,dl,dd,fieldset){margin:0}
.os7 :where(ul){padding:0;list-style:none}
.os7 fieldset{border:0;padding:0;min-width:0}
.os7 :where(button,input){font:inherit}
.os7-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.os7-wrap{max-width:74rem;margin-inline:auto}
.os7-head{max-width:54rem;margin:0 auto clamp(2.25rem,5vw,3.75rem);text-align:center}
.os7-h{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-.035em);font-size:clamp(2.375rem,6.2vw,4.75rem);line-height:1.06;color:var(--os7-ink);text-wrap:balance;margin-bottom:clamp(1rem,1.6vw,1.375rem)}
.os7-mark{background-color:oklch(from var(--marker,#fae37c) max(l,.86) c h);color:oklch(from var(--marker,#fae37c) .22 min(c,.06) h);padding:0 .12em;margin:0 -.04em;border-radius:.22em .5em .3em .55em/.5em .35em .55em .3em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.os7-lead{max-width:40rem;margin-inline:auto;color:var(--os7-muted);font-size:clamp(1.125rem,1.9vw,1.375rem);font-weight:500;line-height:1.5;text-wrap:pretty}
.os7-grid{display:grid;grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr);gap:clamp(1.5rem,3.2vw,3rem);align-items:start}
.os7-recap{position:sticky;top:1.5rem;background:var(--os7-band);color:var(--os7-band-ink);border-radius:var(--card-radius,var(--os7-r));padding:clamp(1.25rem,3vw,2rem);box-shadow:var(--shadow-md,0 1px 2px oklch(.22 .03 260 / .22),0 4px 10px -2px oklch(.22 .03 260 / .2))}
.os7-product{display:block;width:100%;max-width:22rem;height:auto;max-height:16rem;object-fit:contain;margin:0 auto 1.25rem;filter:drop-shadow(0 2px 2px oklch(from var(--os7-shadow) calc(l - .08) c h / .45)) drop-shadow(0 10px 12px oklch(from var(--os7-shadow) calc(l - .08) c h / .35))}
.os7-name{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.375rem,2.2vw,1.75rem);line-height:1.15;letter-spacing:-.02em;text-wrap:balance;margin-bottom:.45rem}
.os7-note{color:var(--os7-band-2);font-size:1rem;font-weight:500}
.os7-label{margin:1.5rem 0 .875rem;font-weight:800;font-size:1.0625rem}
.os7-items{display:grid;gap:.875rem}
.os7-item{display:grid;grid-template-columns:3.5rem minmax(0,1fr) auto;gap:.875rem;align-items:start}
.os7-item.no-img{grid-template-columns:1.75rem minmax(0,1fr) auto}
.os7-thumb{display:block;width:3.5rem;height:3.5rem;border-radius:calc(var(--os7-r) * .6);object-fit:cover;background:var(--os7-band-lift)}
.os7-tickmark{display:grid;place-items:center;width:1.75rem;height:1.75rem;border-radius:50%;background:var(--success-soft,#e2f3e8);color:var(--success,#1e7a45)}
.os7-tickmark svg{width:1rem;height:1rem;stroke-width:3}
.os7-item strong{display:block;font-weight:700;font-size:1.0625rem;line-height:1.3;text-wrap:pretty}
.os7-item-d{display:block;margin-top:.2rem;color:var(--os7-band-2);font-size:.9375rem;line-height:1.45;text-wrap:pretty}
.os7-val{padding-top:.1rem;color:var(--os7-band-2);font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.os7-price{margin-top:1.5rem;background:var(--os7-band-lift);border-radius:calc(var(--os7-r) * .75);padding:1rem 1.125rem 1.125rem}
.os7-price-lbl{margin-bottom:.5rem;color:var(--os7-band-2);font-weight:600;font-size:1rem}
.os7-price-row{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem .875rem}
.os7-was{color:var(--os7-band-2);font-size:1.5rem;font-weight:700;text-decoration-thickness:.09em;font-variant-numeric:tabular-nums}
.os7-big{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(2.75rem,4.5vw,3.5rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.os7-save{display:inline-flex;align-items:center;padding:.3rem .8rem;border-radius:999px;background:var(--success-soft,#e2f3e8);color:var(--success,#1e7a45);font-weight:800;font-size:.9375rem;line-height:1.3;white-space:nowrap}
.os7-guar{display:flex;align-items:center;gap:.6rem;margin-top:1.125rem;font-weight:700;font-size:1rem;line-height:1.35}
.os7-guar svg{flex:none;width:1.375rem;height:1.375rem}
.os7-cardwrap{position:relative;min-width:0}
.os7-cardwrap::before{content:'';position:absolute;z-index:-1;inset:1.5rem -1rem -1rem 1.5rem;border-radius:var(--card-radius,var(--os7-r));background:color-mix(in oklch,var(--ink,#1b2333) 5%,var(--surface,#fff))}
.os7-card{position:relative;container-type:inline-size;background:var(--card,#fff);color:var(--os7-ink);border:1px solid var(--card-border,color-mix(in oklch,var(--ink,#1b2333) 12%,transparent));border-radius:var(--card-radius,var(--os7-r));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(.22 .03 260 / .22),0 12px 24px -8px oklch(.22 .03 260 / .32)));padding:clamp(1.25rem,3.4vw,2.25rem)}
.os7-card-h{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.625rem,2.8vw,2.125rem);line-height:1.1;letter-spacing:-.025em;text-wrap:balance;margin-bottom:.6rem}
.os7-card-sub{display:flex;align-items:center;gap:.45rem;color:var(--os7-muted);font-weight:600;font-size:1rem;text-wrap:pretty}
.os7-card-sub svg{flex:none;width:1rem;height:1rem}
.os7-form{display:grid;gap:1.5rem;margin-top:1.5rem}
.os7-all{display:grid;gap:1.5rem}
.os7-fs{display:grid;gap:1rem}
.os7-fs-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem 1rem}
.os7-fs-title{font-family:var(--font-display,inherit);font-weight:800;font-size:1.25rem;line-height:1.2}
.os7-nets{display:flex;align-items:center;gap:.375rem}
.os7-nets svg{display:block;width:2.375rem;height:auto}
.os7-row2{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
@container (max-width:30rem){.os7-row2.is-contact{grid-template-columns:1fr}}
.os7-field{display:grid;gap:.45rem;min-width:0}
.os7-field label{font-weight:800;font-size:1.0625rem;line-height:1.3;color:var(--label-ink,var(--ink,#1b2333))}
.os7-input{position:relative}
.os7-input input{width:100%;min-height:3.375rem;padding:.75rem 1rem;border:1.5px solid var(--field-border,color-mix(in oklch,var(--ink,#1b2333) 22%,transparent));border-radius:var(--field-radius,var(--os7-r));background:var(--field,#fff);color:var(--field-ink,#1b2333);font-size:1.0625rem;font-weight:500;line-height:1.25;outline:none;box-shadow:inset 0 1px 2px oklch(from var(--os7-shadow) l c h / .08);transition:border-color .15s ease,box-shadow .15s ease}
.os7-input input::placeholder{color:color-mix(in oklch,var(--field-ink,#1b2333) 62%,var(--field,#fff));opacity:1}
.os7-input.has-icon input{padding-left:2.875rem}
.os7-input.has-trail input{padding-right:3.75rem}
.os7-ico{position:absolute;left:1rem;top:50%;translate:0 -50%;display:flex;color:color-mix(in oklch,var(--field-ink,#1b2333) 62%,var(--field,#fff));pointer-events:none}
.os7-ico svg{width:1.25rem;height:1.25rem}
.os7-trail{position:absolute;right:.875rem;top:50%;translate:0 -50%;display:flex;pointer-events:none}
.os7-trail svg{display:block;width:2.25rem;height:auto}
.os7-input input:hover{border-color:color-mix(in oklch,var(--field-ink,#1b2333) 45%,var(--field,#fff))}
.os7-input input:focus{border-color:var(--os7-focus);box-shadow:0 0 0 3px oklch(from var(--os7-focus) l c h / .25)}
.os7-input input:disabled{background:color-mix(in oklch,var(--field-ink,#1b2333) 5%,var(--field,#fff));cursor:not-allowed}
.os7-field[data-invalid] input{border-color:var(--danger,#c0282d)}
.os7-field[data-invalid] input:focus{box-shadow:0 0 0 3px oklch(from var(--danger,#c0282d) l c h / .22)}
.os7-err{display:flex;align-items:flex-start;gap:.4rem;color:var(--danger,#c0282d);font-size:.9375rem;font-weight:600;line-height:1.35;text-wrap:pretty}
.os7-err svg{flex:none;width:1rem;height:1rem;margin-top:.12rem}
.os7-alert{display:flex;align-items:flex-start;gap:.6rem;padding:.875rem 1rem;border-radius:calc(var(--os7-r) * .75);background:var(--danger-soft,#fbe7e6);color:var(--danger,#c0282d);font-weight:700;font-size:1rem;line-height:1.4;text-wrap:pretty;animation:os7-in .28s ease-out}
.os7-alert svg{flex:none;width:1.25rem;height:1.25rem;margin-top:.05rem}
.os7-bump{border:2px dashed var(--warning,#8a6d00);border-radius:calc(var(--os7-r) * .85);overflow:hidden;background:var(--bump, oklch(0.975 0.04 95));color:var(--bump-ink, var(--ink))}
.os7-bump[data-on]{border-style:solid}
.os7-bump-head{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.625rem;padding:.875rem 1rem;background:var(--bump-strip, oklch(0.93 0.11 95));color:var(--bump-ink, var(--os7-ink));cursor:pointer;transition:background-color .15s ease}
.os7-bump-head:hover{background:oklch(from var(--bump-strip, oklch(0.93 0.11 95)) calc(l - 0.03) c h)}
.os7-all:disabled .os7-bump-head{cursor:not-allowed}
.os7-box{display:grid;place-items:center;width:1.625rem;height:1.625rem;border-radius:.375rem;border:2px solid oklch(from var(--ink,#1b2333) l c h / .5);background:var(--field,#fff);color:transparent;transition:background-color .15s ease,border-color .15s ease}
.os7-box svg{width:1.125rem;height:1.125rem;stroke-width:3.25}
.os7-bump input:checked+.os7-box{background:var(--success,#1e7a45);border-color:var(--success,#1e7a45);color:var(--card,#fff);animation:os7-pop .28s ease-out}
.os7-bump input:focus-visible+.os7-box{outline:3px solid var(--os7-focus);outline-offset:2px}
.os7-bump-title{font-weight:800;font-size:1.0625rem;line-height:1.3;text-wrap:pretty}
.os7-bump-price{font-weight:800;font-size:1.0625rem;font-variant-numeric:tabular-nums;white-space:nowrap}
.os7-bump-body{padding:.875rem 1rem 1rem;color:var(--bump-ink, var(--os7-ink));font-size:1rem;line-height:1.5;text-wrap:pretty}
.os7-bump-body strong{font-weight:800;font-size:.9375rem;letter-spacing:.02em;text-transform:uppercase}
.os7-sum{display:grid;gap:.5rem;padding:1rem 1.125rem 1.125rem;border-radius:calc(var(--os7-r) * .85);background:var(--os7-quiet);color:var(--os7-ink)}
.os7-sum-row{display:flex;justify-content:space-between;gap:1rem;font-size:1rem;line-height:1.4}
.os7-sum-row dt{font-weight:600;text-wrap:pretty}
.os7-sum-row dd{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.os7-sum-row.is-add{animation:os7-in .28s ease-out}
.os7-sum-total{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin-top:.5rem}
.os7-sum-total dt{font-weight:800;font-size:1.125rem}
.os7-sum-total dd{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(1.875rem,3.4vw,2.375rem);line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums;white-space:nowrap}
.os7-tick{display:inline-block;animation:os7-tick .32s ease-out}
.os7-btn{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;width:100%;min-height:4.125rem;padding:.9rem 1.25rem;border:1px solid oklch(from var(--os7-btn-2) calc(l - .08) c h);border-radius:var(--button-radius,var(--os7-r));background:linear-gradient(180deg,oklch(from var(--os7-btn) calc(l + .04) c h),var(--os7-btn-2));color:var(--button-ink,var(--cta-ink,#fff));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.0625rem,4.4vw,1.4375rem);line-height:1.2;letter-spacing:-.01em;text-align:center;text-wrap:balance;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:inset 0 1px 0 oklch(from var(--os7-btn) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--os7-btn-2) calc(l - .1) c h),var(--button-shadow,var(--shadow-md,0 1px 2px oklch(.22 .03 260 / .22),0 4px 10px -2px oklch(.22 .03 260 / .2)));transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.os7-btn:hover:not(:disabled),.os7-btn.is-hover{transform:translateY(-2px);background:linear-gradient(180deg,oklch(from var(--os7-btn) calc(l + .01) c h),oklch(from var(--os7-btn-2) calc(l - .05) c h));box-shadow:inset 0 1px 0 oklch(from var(--os7-btn) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--os7-btn-2) calc(l - .14) c h),var(--shadow-lg,0 2px 4px oklch(.22 .03 260 / .22),0 12px 24px -8px oklch(.22 .03 260 / .32))}
.os7-btn:active:not(:disabled),.os7-btn.is-active{transform:translateY(1px);background:linear-gradient(180deg,oklch(from var(--os7-btn-2) calc(l - .02) c h),oklch(from var(--os7-btn-2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--os7-btn-2) calc(l - .2) c h / .6),var(--shadow-sm,0 1px 1px oklch(.22 .03 260 / .18),0 1px 3px oklch(.22 .03 260 / .14))}
.os7-btn:focus-visible{outline:3px solid var(--os7-focus);outline-offset:3px}
.os7-btn[aria-busy=true]{cursor:progress}
.os7-btn:disabled:not([aria-busy]){background:var(--secondary,#e6e9ef);color:var(--secondary-ink,#1b2333);border-color:transparent;box-shadow:none;text-shadow:none;cursor:not-allowed}
.os7-spin{flex:none;width:1.375rem;height:1.375rem;animation:os7-spin .8s linear infinite}
.os7-secure{display:flex;align-items:center;justify-content:center;gap:.45rem;margin-top:.75rem;color:var(--os7-muted);font-size:.9375rem;font-weight:600;line-height:1.35;text-align:center;text-wrap:pretty}
.os7-secure svg{flex:none;width:1rem;height:1rem}
.os7-head,.os7-grid{animation:os7-rise .45s cubic-bezier(.2,.7,.2,1) both}
.os7-grid{animation-delay:.08s}
@keyframes os7-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes os7-pop{0%{transform:scale(.8)}60%{transform:scale(1.08)}100%{transform:scale(1)}}
@keyframes os7-tick{from{opacity:.4;transform:translateY(-.25em)}to{opacity:1;transform:none}}
@keyframes os7-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@keyframes os7-spin{to{transform:rotate(360deg)}}
@media (max-width:60rem){.os7-grid{grid-template-columns:minmax(0,1fr);max-width:40rem;margin-inline:auto}.os7-recap{position:static}}
@media (max-width:40rem){.os7-cardwrap::before{inset:1rem -.5rem -.5rem 1rem}.os7-product{max-height:12rem}.os7-item{grid-template-columns:3rem minmax(0,1fr) auto}.os7-thumb{width:3rem;height:3rem}.os7-item-d{display:none}.os7-item strong{padding-top:.6rem}}
@media (prefers-reduced-motion:reduce){.os7,.os7 *,.os7 *::before,.os7 *::after{animation:none!important;transition:none!important}.os7-btn:hover:not(:disabled),.os7-btn.is-hover,.os7-btn:active:not(:disabled),.os7-btn.is-active{transform:none}}
@media (forced-colors:active){.os7-btn,.os7-card,.os7-bump,.os7-input input,.os7-box{border:1px solid CanvasText}.os7-mark{forced-color-adjust:none}}
`
pieces/checkout/one-step-order-7/specimen.tsx 42 lines
import __studioImagee17fcde0 from "../assets/a4ce9ed22bcd2c77.webp";
import * as React from 'react'
import { OneStepOrder7, type OneStepOrder7State } from '../one-step-order-7'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function OneStepOrder7Specimen({ state = 'default' }: { state?: string }) {
const s = defaults.sample
return (
<OneStepOrder7
state={state as OneStepOrder7State}
headline={s.headline}
highlight='clear plan'
lead={s.lead}
productName={s.name}
productImage={slot('product', __studioImagee17fcde0)}
productImageAlt='The Funnel Starter Kit: planning guide, page copy workbook and launch checklist'
note={s.note}
items={s.items.map((item, i) => ({
name: item.name,
detail: item.detail,
value: item.value,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
price={s.price}
regularPrice={s.regularPrice}
todayLabel={s.todayLabel}
guarantee={s.guarantee}
bump={{
title: 'Yes! Add the Funnel Swipe File',
summaryName: 'Funnel Swipe File',
price: '$17',
body: 'Ready-to-adapt headline, offer and button examples for every page you plan with the kit. Add it to this order with one click.',
}}
label={s.label}
sublabel={s.sublabel}
/>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalOneStepOrder7 |
Partial<OneStepOrder7Copy> |
|
onSubmit OptionalOneStepOrder7 |
(values: Readonly<OneStepOrder7Values>, bumpSelected: boolean) => void | Promise<void> |
|
headline OptionalOneStepOrder7 |
string |
Default 'Build your first funnel with a clear plan'
|
highlight OptionalOneStepOrder7 |
string |
Default 'clear plan'
|
lead OptionalOneStepOrder7 |
string |
Default 'Plan your funnel, write your page copy, and check every step before you launch.'
|
productName OptionalOneStepOrder7 |
string |
Default 'The Funnel Starter Kit'
|
productImage OptionalOneStepOrder7 |
string |
|
productImageAlt OptionalOneStepOrder7 |
string |
Default ''
|
note OptionalOneStepOrder7 |
string |
|
items OptionalOneStepOrder7 |
OneStepOrder7Item[] |
Default []
|
price OptionalOneStepOrder7 |
string |
Default '$47'
|
regularPrice OptionalOneStepOrder7 |
string |
|
todayLabel OptionalOneStepOrder7 |
string |
Default 'Get the complete kit for'
|
guarantee OptionalOneStepOrder7 |
string |
Default '30-day money-back guarantee'
|
bump OptionalOneStepOrder7 |
OneStepOrder7Bump | null |
Default null
|
networks OptionalOneStepOrder7 |
OneStepOrder7Network[] |
Default ['visa', 'mastercard', 'amex', 'discover']
|
formTitle OptionalOneStepOrder7 |
string |
Default 'Complete your order'
|
label OptionalOneStepOrder7 |
string |
Default 'Complete My Order'
|
sublabel OptionalOneStepOrder7 |
string |
|
successTitle OptionalOneStepOrder7 |
string |
|
successMessage OptionalOneStepOrder7 |
string |
|
errorMessage OptionalOneStepOrder7 |
string |
Default 'We couldn’t complete your order. Please check the highlighted fields.'
|
disabledMessage OptionalOneStepOrder7 |
string |
Default 'Checkout is unavailable right now.'
|
state OptionalOneStepOrder7 |
OneStepOrder7State |
Default 'default'
|
disabled OptionalOneStepOrder7 |
boolean |
Default false
|
className OptionalOneStepOrder7 |
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.
--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-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
product- The main product shot or cover (ebook, kit, bottle).
-
a4ce9ed22bcd2c77.webp
image/webp · 161 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB