Order Form Header 1
Order form header: shows the buyer which step they are on, spotlights exactly what they are buying beside an itemised value ledger and today's price, so the form underneath feels safe to finish.
Use it in a prompt
Use offer/order-form-header 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/offer/order-form-header.tsx. - Import it and pass your copy and images (Props tab):
import { OrderFormHeader } from "@/components/funneldna/offer/order-form-header"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/order-form-header/component.tsx 443 lines
// layout: spotlight-row
// Order form header: shows the buyer which step they are on, spotlights exactly what they are buying beside an itemised value ledger and today's price, so the form underneath feels safe to finish.
import * as React from "react"
import { AlertCircle, Check, Lock } from "lucide-react"
export type OrderFormHeaderItem = {
/** Item name on the ledger, in the spotlight and on its thumbnail */
name: string
/** One short line shown in the spotlight */
detail?: string
/** Value on the ledger line, e.g. "$49" */
value?: string
/** Item image (slot item-n); items without an image stay on the ledger only */
image?: string
/** Defaults to the item name */
imageAlt?: string
/** "cover" for photos, "contain" for transparent cut-outs */
fit?: "cover" | "contain"
}
export type OrderFormHeaderProps = {
/** Current checkout step, 1-based */
step?: number
/** Names of the checkout steps, in order */
steps?: string[]
/** Template with {current} and {total} */
stepCountLabel?: string
headline?: string
/** Phrase inside the headline set in the accent colour */
highlight?: string
/** Line under the headline */
lead?: string
productName?: string
productDetail?: string
/** Transparent cut-out of the whole offer (slot product); shown first in the spotlight */
productImage?: string
/** Defaults to the product name */
productImageAlt?: string
/** Ledger lines; items with an image also join the spotlight */
items?: OrderFormHeaderItem[]
/** Label on the ledger's total line */
valueLabel?: string
/** Total value: the ledger total and the struck price */
regularPrice?: string
todayLabel?: string
price?: string
/** Small line under the today label */
priceNote?: string
/** Reassurance line with the lock icon */
secureLine?: string
psLabel?: string
ps?: string
/** Shown when state is "error" (the form below failed validation) */
errorMessage?: string
/** Square the bottom corners so the header joins the order form card under it */
attached?: boolean
/** "hover" / "active" force the second thumbnail's state; "error" shows the alert */
state?: "default" | "hover" | "active" | "error"
copy?: {
/** Accessible label on the step list */
progressLabel?: string
/** Accessible label on the thumbnail list */
thumbsLabel?: string
/** Visible label on the whole-offer thumbnail */
kitThumb?: string
/** Template with {value} */
worth?: string
/** Screen-reader note after a finished step's name */
completed?: string
/** Screen-reader label read before the struck regular price */
regular?: string
}
className?: string
}
export function OrderFormHeader(props: OrderFormHeaderProps) {
const {
step = 1,
steps = DEFAULT_STEPS,
stepCountLabel = "Step {current} of {total}",
headline = "Where should we send your kit?",
highlight = "your kit",
lead = "Enter your details below and your download link goes straight to your inbox.",
productName = "The Funnel Starter Kit",
productDetail = "Plan your funnel, write your page copy, and check every step before you launch.",
productImage,
productImageAlt,
items = DEFAULT_ITEMS,
valueLabel = "Total value",
regularPrice = "$97",
todayLabel = "Your price today",
price = "$47",
priceNote = "One payment \u00b7 Lifetime access",
secureLine = "Secure checkout \u00b7 Instant download",
psLabel = "P.S.",
ps = "Your kit is covered by our 30-day money-back guarantee.",
errorMessage = "Please check the highlighted fields below, then try again.",
attached = false,
state = "default",
copy,
className,
} = props
const c = { ...DEFAULT_COPY, ...copy }
const uid = React.useId()
const titleId = `${uid}-title`
const total = Math.max(steps.length, 1)
const current = Math.min(Math.max(step, 1), total)
const entries: Entry[] = []
if (productImage) {
entries.push({
name: productName,
thumb: c.kitThumb,
detail: productDetail,
value: regularPrice,
image: productImage,
imageAlt: productImageAlt || productName,
fit: "contain",
ledger: -1,
})
}
items.forEach((item, i) => {
if (!item.image) return
entries.push({
name: item.name,
thumb: item.name,
detail: item.detail,
value: item.value,
image: item.image,
imageAlt: item.imageAlt || item.name,
fit: item.fit || "cover",
ledger: i,
})
})
const forced = entries.length > 1 ? 1 : 0
const [active, setActive] = React.useState(state === "active" ? forced : 0)
React.useEffect(() => {
if (state === "active") setActive(forced)
}, [state, forced])
const idx = Math.min(active, Math.max(entries.length - 1, 0))
const spot: Entry | undefined = entries[idx]
const rootClass = ["cf-order-form-header", className].filter(Boolean).join(" ")
return (
<section className={rootClass} aria-labelledby={titleId} data-attached={attached ? "" : undefined}>
<style>{CSS}</style>
<div className="cf-order-form-header__progress">
<p className="cf-order-form-header__count">
{fill(stepCountLabel, { current: String(current), total: String(total) })}
</p>
<ol
className="cf-order-form-header__track"
aria-label={c.progressLabel}
style={{ ["--ofh-steps" as string]: total } as React.CSSProperties}
>
{steps.map((name, i) => {
const s = i + 1 < current ? "done" : i + 1 === current ? "current" : "upcoming"
return (
<li
key={name + i}
className="cf-order-form-header__seg"
data-state={s}
aria-current={s === "current" ? "step" : undefined}
>
<span className="cf-order-form-header__bar" aria-hidden="true" />
<span className="cf-order-form-header__segname">
{s === "done" && (
<span className="cf-order-form-header__done" aria-hidden="true">
<Check size={12} strokeWidth={3} />
</span>
)}
{name}
{s === "done" && <span className="cf-order-form-header__sr"> ({c.completed})</span>}
</span>
</li>
)
})}
</ol>
</div>
<h2 id={titleId} className="cf-order-form-header__title">
{renderHeadline(headline, highlight)}
</h2>
{lead ? <p className="cf-order-form-header__lead">{lead}</p> : null}
{state === "error" && errorMessage ? (
<p className="cf-order-form-header__alert" role="alert">
<AlertCircle size={18} strokeWidth={2.5} aria-hidden="true" />
{errorMessage}
</p>
) : null}
<div className={"cf-order-form-header__body" + (spot ? " has-spot" : "")}>
{spot ? (
<div className="cf-order-form-header__show">
<div className="cf-order-form-header__stage" aria-live="polite">
<div key={idx} className="cf-order-form-header__spotin">
<div className="cf-order-form-header__shot" data-fit={spot.fit}>
<img src={spot.image} alt={spot.imageAlt} width={480} height={480} decoding="async" />
</div>
<div className="cf-order-form-header__spottext">
<h3 className="cf-order-form-header__spotname">{spot.name}</h3>
{spot.detail ? <p className="cf-order-form-header__spotdetail">{spot.detail}</p> : null}
{spot.value ? (
<span className="cf-order-form-header__chip">{fill(c.worth, { value: spot.value })}</span>
) : null}
</div>
</div>
</div>
{entries.length > 1 ? (
<ul
className="cf-order-form-header__thumbs"
aria-label={c.thumbsLabel}
style={{ ["--ofh-n" as string]: entries.length } as React.CSSProperties}
>
{entries.map((e, i) => {
const force =
i === forced && state === "hover" ? "hover" : i === forced && state === "active" ? "press" : undefined
return (
<li key={e.name + i}>
<button
type="button"
className="cf-order-form-header__thumb"
data-fit={e.fit}
data-force={force}
aria-pressed={i === idx}
onClick={() => setActive(i)}
>
<span className="cf-order-form-header__thumbimg">
<img src={e.image} alt="" width={160} height={160} loading="lazy" decoding="async" />
</span>
<span className="cf-order-form-header__thumbname">{e.thumb}</span>
</button>
</li>
)
})}
</ul>
) : null}
</div>
) : null}
<div className="cf-order-form-header__offer">
<ul className="cf-order-form-header__ledger">
{items.map((item, i) => (
<li
key={item.name + i}
className="cf-order-form-header__line"
data-on={spot && spot.ledger === i ? "" : undefined}
>
<span className="cf-order-form-header__lname">{item.name}</span>
<span className="cf-order-form-header__leader" aria-hidden="true" />
{item.value ? <span className="cf-order-form-header__lval">{item.value}</span> : null}
</li>
))}
{regularPrice ? (
<li
className="cf-order-form-header__line cf-order-form-header__line--total"
data-on={spot && spot.ledger === -1 ? "" : undefined}
>
<span className="cf-order-form-header__lname">{valueLabel}</span>
<span className="cf-order-form-header__leader" aria-hidden="true" />
<span className="cf-order-form-header__lval">{regularPrice}</span>
</li>
) : null}
</ul>
{price ? (
<div className="cf-order-form-header__today">
<div className="cf-order-form-header__todaycopy">
<p className="cf-order-form-header__todaylabel">{todayLabel}</p>
{priceNote ? <p className="cf-order-form-header__todaynote">{priceNote}</p> : null}
</div>
<p className="cf-order-form-header__pricewrap">
{regularPrice ? (
<s className="cf-order-form-header__was">
<span className="cf-order-form-header__sr">{c.regular} </span>
{regularPrice}
</s>
) : null}
<span className="cf-order-form-header__price">{price}</span>
</p>
</div>
) : null}
{secureLine ? (
<p className="cf-order-form-header__secure">
<Lock size={16} strokeWidth={2.5} aria-hidden="true" />
{secureLine}
</p>
) : null}
{ps ? (
<p className="cf-order-form-header__ps">
<b>{psLabel}</b>
{ps}
</p>
) : null}
</div>
</div>
</section>
)
}
export default OrderFormHeader
type Entry = {
name: string
thumb: string
detail?: string
value?: string
image: string
imageAlt: string
fit: "cover" | "contain"
/** Ledger line it lights up: item index, or -1 for the total line */
ledger: number
}
const DEFAULT_STEPS = ["Your details", "Payment"]
const DEFAULT_ITEMS: OrderFormHeaderItem[] = [
{ name: "Funnel Planning Guide", detail: "Map your offer and the pages your funnel needs.", value: "$49" },
{ name: "Page Copy Workbook", detail: "Draft your headline, offer, and call to action.", value: "$29" },
{ name: "Launch Checklist", detail: "Review the links, forms, and next steps before launch.", value: "$19" },
]
const DEFAULT_COPY = {
progressLabel: "Checkout progress",
thumbsLabel: "Look inside your order",
kitThumb: "The whole kit",
worth: "Worth {value}",
completed: "completed",
regular: "Regular price",
}
function fill(template: string, vars: Record<string, string>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => (key in vars ? vars[key] : match))
}
function renderHeadline(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text
const at = text.indexOf(phrase)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<em className="cf-order-form-header__em">{phrase}</em>
{text.slice(at + phrase.length)}
</>
)
}
const CSS = `
.cf-order-form-header{--ofh-ink:var(--ink,#1b2130);--ofh-card:var(--card,#ffffff);--ofh-accent:var(--accent,#2563eb);--ofh-well:color-mix(in oklch,var(--ofh-ink) 4%,var(--ofh-card));--ofh-well-2:color-mix(in oklch,var(--ofh-ink) 8%,var(--ofh-card));--ofh-line:oklch(from var(--ofh-ink) l c h / .16);--ofh-pick:color-mix(in oklch,var(--ofh-accent) 10%,var(--ofh-card));--ofh-ring:oklch(from var(--field-focus,var(--ofh-accent)) l c h / .4);--ofh-shadow:var(--shadow,oklch(0.22 0.03 260));--ofh-shadow-sm:var(--shadow-sm,0 1px 1px oklch(from var(--ofh-shadow) l c h / .18),0 1px 3px oklch(from var(--ofh-shadow) l c h / .14));container-type:inline-size;box-sizing:border-box;width:100%;max-width:61.25rem;margin-inline:auto;padding:clamp(20px,3vw,32px);background:var(--ofh-card);color:var(--ofh-ink);border:1px solid var(--card-border,oklch(from var(--ofh-ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--ofh-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--ofh-shadow) l c h / .2)));font-family:var(--font-body,system-ui,sans-serif);font-size:1.0625rem;line-height:1.5;-webkit-font-smoothing:antialiased}
.cf-order-form-header *,.cf-order-form-header *::before,.cf-order-form-header *::after{box-sizing:border-box}
.cf-order-form-header[data-attached]{border-end-start-radius:0;border-end-end-radius:0;box-shadow:var(--ofh-shadow-sm)}
.cf-order-form-header__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-order-form-header__progress{display:flex;flex-wrap:wrap;align-items:flex-start;gap:12px 24px;margin:0 0 24px}
.cf-order-form-header__count{flex:0 0 auto;margin:0;padding-top:0;font-size:.875rem;line-height:1.2;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--ofh-accent);white-space:nowrap}
@container (min-width:30rem){.cf-order-form-header__count{padding-top:15px}}
.cf-order-form-header__track{flex:1 1 240px;display:grid;grid-template-columns:repeat(var(--ofh-steps,2),minmax(0,1fr));gap:8px;margin:0;padding:0;list-style:none}
.cf-order-form-header__seg{display:grid;gap:8px;min-width:0}
.cf-order-form-header__bar{display:block;height:6px;border-radius:999px;background:var(--ofh-well-2);overflow:hidden}
.cf-order-form-header__bar::after{content:"";display:block;width:100%;height:100%;border-radius:inherit;background:var(--accent-fill,var(--ofh-accent));transform:scaleX(0);transform-origin:left center}
.cf-order-form-header__seg[data-state=done] .cf-order-form-header__bar::after,.cf-order-form-header__seg[data-state=current] .cf-order-form-header__bar::after{transform:none}
.cf-order-form-header__segname{font-size:.875rem;line-height:1.3;font-weight:600;color:var(--muted,#4b5567);text-wrap:pretty}
.cf-order-form-header__seg[data-state=current] .cf-order-form-header__segname{color:var(--ofh-ink);font-weight:800}
.cf-order-form-header__seg[data-state=done] .cf-order-form-header__segname{color:var(--ofh-ink)}
.cf-order-form-header__done{display:inline-grid;place-items:center;width:18px;height:18px;margin-inline-end:6px;vertical-align:-4px;border-radius:999px;background:var(--success,#1f7a46);color:var(--success-ink,#ffffff)}
.cf-order-form-header__title{margin:0;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,5.2cqi,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ofh-ink)}
.cf-order-form-header__em{font-style:normal;color:var(--ofh-accent)}
.cf-order-form-header__lead{max-width:60ch;margin:14px 0 0;font-size:clamp(1.125rem,2.2cqi,1.375rem);line-height:1.4;font-weight:500;color:var(--muted,#4b5567);text-wrap:pretty}
.cf-order-form-header__alert{margin:16px 0 0;padding:12px 16px;border-radius:10px;background:var(--danger-soft,#fbe9e7);color:var(--danger,#b42318);font-size:.9375rem;line-height:1.4;font-weight:700;text-wrap:pretty}
.cf-order-form-header__alert svg{display:inline-block;vertical-align:-.2em;margin-inline-end:.4em}
.cf-order-form-header__body{display:grid;gap:24px;margin-top:32px}
.cf-order-form-header__body:not(.has-spot) .cf-order-form-header__offer{max-width:34rem}
@container (min-width:46rem){.cf-order-form-header__body.has-spot{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:clamp(24px,4cqi,40px);align-items:start}}
.cf-order-form-header__show{min-width:0}
.cf-order-form-header__stage{padding:16px;border-radius:12px;background:var(--ofh-well)}
.cf-order-form-header__spotin{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1fr);gap:16px;align-items:start}
.cf-order-form-header__shot{display:grid;place-items:center;aspect-ratio:1;border-radius:12px;overflow:hidden}
.cf-order-form-header__shot img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.cf-order-form-header__shot[data-fit=contain]{border-radius:0;overflow:visible}
.cf-order-form-header__shot[data-fit=contain] img{object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--ofh-shadow) l c h / .28)) drop-shadow(0 12px 14px oklch(from var(--ofh-shadow) l c h / .18))}
.cf-order-form-header__spottext{min-width:0;padding-top:4px}
.cf-order-form-header__spotname{margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,2.6cqi,1.625rem);line-height:1.15;letter-spacing:-.01em;text-wrap:balance;color:var(--ofh-ink)}
.cf-order-form-header__spotdetail{margin:8px 0 0;font-size:.9375rem;line-height:1.4;color:var(--ofh-ink);text-wrap:pretty}
@container (min-width:46rem){.cf-order-form-header__spotdetail{font-size:1.0625rem;line-height:1.5}}
.cf-order-form-header__chip{display:inline-flex;align-items:center;min-height:28px;margin-top:12px;padding:4px 12px;border-radius:999px;background:var(--ofh-card);border:1px solid var(--ofh-line);font-size:.875rem;line-height:1.2;font-weight:800;color:var(--ofh-ink);font-variant-numeric:tabular-nums;white-space:nowrap}
@container (max-width:20.99rem){.cf-order-form-header__spotin{grid-template-columns:minmax(0,1fr)}.cf-order-form-header__shot{width:min(100%,200px);justify-self:center}}
.cf-order-form-header__thumbs{display:grid;grid-template-columns:repeat(var(--ofh-n,4),minmax(0,1fr));gap:8px;margin:12px 0 0;padding:0;list-style:none}
.cf-order-form-header__thumbs li{display:flex;min-width:0}
.cf-order-form-header__thumb{position:relative;appearance:none;-webkit-appearance:none;display:flex;flex-direction:column;gap:8px;width:100%;min-height:44px;margin:0;padding:8px;border:1px solid var(--button-2-border,transparent);border-radius:12px;background:var(--ofh-well);color:var(--button-2-ink,var(--ofh-ink));font:inherit;text-align:start;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease,border-color .16s ease}
.cf-order-form-header__thumbimg{display:block;width:100%;aspect-ratio:4/3;border-radius:8px;overflow:hidden}
.cf-order-form-header__thumbimg img{display:block;width:100%;height:100%;object-fit:cover}
.cf-order-form-header__thumb[data-fit=contain] .cf-order-form-header__thumbimg{border-radius:0;overflow:visible;padding:2px}
.cf-order-form-header__thumb[data-fit=contain] img{object-fit:contain;filter:drop-shadow(0 1px 2px oklch(from var(--ofh-shadow) l c h / .3))}
.cf-order-form-header__thumbname{font-size:.875rem;line-height:1.25;font-weight:700;text-wrap:balance}
@media (hover:hover){.cf-order-form-header__thumb:hover{background:var(--ofh-well-2);transform:translateY(-2px)}}
.cf-order-form-header__thumb[data-force=hover]{background:var(--ofh-well-2);transform:translateY(-2px)}
.cf-order-form-header__thumb[aria-pressed=true]{background:var(--ofh-pick);color:var(--ofh-ink);border-color:oklch(from var(--ofh-accent) l c h / .55);box-shadow:var(--ofh-shadow-sm)}
.cf-order-form-header__thumb:active,.cf-order-form-header__thumb[data-force=press]{transform:translateY(0) scale(.97);box-shadow:inset 0 1px 2px oklch(from var(--ofh-shadow) l c h / .22)}
.cf-order-form-header__thumb:focus-visible{outline:none;box-shadow:0 0 0 3px var(--ofh-ring)}
@container (max-width:29.99rem){.cf-order-form-header__thumb{padding:6px}.cf-order-form-header__thumbimg{aspect-ratio:1}.cf-order-form-header__thumbname{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}}
.cf-order-form-header__offer{min-width:0;container:cf-order-form-header-offer / inline-size}
.cf-order-form-header__ledger{display:grid;gap:2px;margin:0;padding:0;list-style:none}
.cf-order-form-header__line{display:flex;align-items:flex-end;gap:12px;padding:6px 0;font-size:1.0625rem;line-height:1.4;color:var(--ofh-ink);transition:color .16s ease}
.cf-order-form-header__lname{min-width:0;font-weight:600;text-wrap:pretty}
.cf-order-form-header__leader{flex:1 1 24px;min-width:24px;height:1px;margin-bottom:.42em;background:var(--ofh-line)}
.cf-order-form-header__lval{flex:0 0 auto;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-order-form-header__line[data-on]{color:var(--ofh-accent)}
.cf-order-form-header__line[data-on] .cf-order-form-header__leader{background:oklch(from var(--ofh-accent) l c h / .5)}
.cf-order-form-header__line--total{margin-top:8px}
.cf-order-form-header__line--total .cf-order-form-header__lname,.cf-order-form-header__line--total .cf-order-form-header__lval{font-weight:800}
.cf-order-form-header__today{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px 16px;margin-top:20px;padding:20px 24px;border-radius:12px;background:var(--ofh-well)}
.cf-order-form-header__todaycopy{min-width:0}
.cf-order-form-header__todaylabel{margin:0;font-size:1.0625rem;line-height:1.3;font-weight:800;color:var(--ofh-ink);text-wrap:balance}
.cf-order-form-header__todaynote{margin:4px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--ofh-ink);text-wrap:pretty}
.cf-order-form-header__pricewrap{display:flex;flex-direction:column;align-items:flex-end;gap:4px;margin:0}
.cf-order-form-header__was{font-size:1.0625rem;line-height:1.2;font-weight:700;color:var(--ofh-ink);font-variant-numeric:tabular-nums;text-decoration:line-through;text-decoration-color:var(--danger,#b42318);text-decoration-thickness:2px;white-space:nowrap}
.cf-order-form-header__price{display:block;margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,7cqi,3.75rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--ofh-ink);white-space:nowrap}
@container cf-order-form-header-offer (max-width:23.49rem){.cf-order-form-header__today{grid-template-columns:minmax(0,1fr);padding:16px 20px}.cf-order-form-header__pricewrap{flex-direction:row;align-items:baseline;justify-content:flex-start;gap:12px}}
.cf-order-form-header__secure{margin:16px 0 0;font-size:.9375rem;line-height:1.4;font-weight:700;color:var(--ofh-ink);text-wrap:pretty}
.cf-order-form-header__secure svg{display:inline-block;vertical-align:-.15em;margin-inline-end:.4em;color:var(--success,#1f7a46)}
.cf-order-form-header__ps{margin:8px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted,#4b5567);text-wrap:pretty}
.cf-order-form-header__ps b{margin-inline-end:.3em;font-weight:800;color:var(--ofh-ink)}
@keyframes cf-order-form-header-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-order-form-header-fill{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media (prefers-reduced-motion:no-preference){.cf-order-form-header__spotin{animation:cf-order-form-header-rise .45s cubic-bezier(.2,.7,.2,1) both}.cf-order-form-header__seg[data-state=current] .cf-order-form-header__bar::after{animation:cf-order-form-header-fill .6s .1s cubic-bezier(.2,.7,.2,1) both}}
@media (prefers-reduced-motion:reduce){.cf-order-form-header__thumb,.cf-order-form-header__line{transition:none}.cf-order-form-header__thumb:hover,.cf-order-form-header__thumb:active,.cf-order-form-header__thumb[data-force]{transform:none}}
`
pieces/offer/order-form-header/specimen.tsx 32 lines
import __studioImage892ccc8e from "../assets/f2f818917f032eb1.webp"
import { OrderFormHeader, type OrderFormHeaderProps } from "../order-form-header"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
const sample = defaults.sample
export const states = ["default", "hover", "active", "error"]
export default function OrderFormHeaderSpecimen({ state = "default" }: { state?: OrderFormHeaderProps["state"] }) {
return (
<OrderFormHeader
state={state}
productName={sample.name}
productDetail={sample.lead}
productImage={slot("product", __studioImage892ccc8e)}
productImageAlt="The Funnel Starter Kit: planning guide, copy workbook and launch checklist together"
items={sample.items.map((item, i) => ({
name: item.name,
detail: item.detail,
value: item.value,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
regularPrice={sample.regularPrice}
price={sample.price}
priceNote={sample.note}
secureLine={sample.sublabel}
ps={`Your kit is covered by our ${sample.guarantee}.`}
/>
)
}
| Name | Type | Details |
|---|---|---|
step OptionalOrderFormHeader |
number |
|
steps OptionalOrderFormHeader |
string[] |
|
stepCountLabel OptionalOrderFormHeader |
string |
|
headline OptionalOrderFormHeader |
string |
|
highlight OptionalOrderFormHeader |
string |
|
lead OptionalOrderFormHeader |
string |
|
productName OptionalOrderFormHeader |
string |
|
productDetail OptionalOrderFormHeader |
string |
|
productImage OptionalOrderFormHeader |
string |
|
productImageAlt OptionalOrderFormHeader |
string |
|
items OptionalOrderFormHeader |
OrderFormHeaderItem[] |
|
valueLabel OptionalOrderFormHeader |
string |
|
regularPrice OptionalOrderFormHeader |
string |
|
todayLabel OptionalOrderFormHeader |
string |
|
price OptionalOrderFormHeader |
string |
|
priceNote OptionalOrderFormHeader |
string |
|
secureLine OptionalOrderFormHeader |
string |
|
psLabel OptionalOrderFormHeader |
string |
|
ps OptionalOrderFormHeader |
string |
|
errorMessage OptionalOrderFormHeader |
string |
|
attached OptionalOrderFormHeader |
boolean |
|
state OptionalOrderFormHeader |
"default" | "hover" | "active" | "error" |
|
copy OptionalOrderFormHeader |
{
/** Accessible label on the step list */
progressLabel?: string
/** Accessible label on the thumbnail list */
thumbsLabel?: string
/** Visible label on the whole-offer thumbnail */
kitThumb?: string
/** Template with {value} */
worth?: string
/** Screen-reader note after a finished step's name */
completed?: string
/** Screen-reader label read before the struck regular price */
regular?: string
} |
|
className OptionalOrderFormHeader |
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-2-border--button-2-ink- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
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).
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
f2f818917f032eb1.webp
image/webp · 157 KB