Progress Bar Header 1
Funnel progress header for order and OTO pages: the striped 'Step 2 of 3' bar, the active step's promise,
Use it in a prompt
Use hero/progress-bar-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/hero/progress-bar-header.tsx. - Import it and pass your copy and images (Props tab):
import { ProgressBarHeader } from "@/components/funneldna/hero/progress-bar-header"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/progress-bar-header/component.tsx 439 lines
// layout: segmented-stepper
// Funnel progress header for order and OTO pages: the striped 'Step 2 of 3' bar, the active step's promise,
// a till receipt of the order so far and one first-person button that moves the buyer to the last step.
import * as React from 'react'
import { Check, Lock, ShieldCheck, Tag } from 'lucide-react'
export type ProgressBarHeaderStep = {
label: string
/** Shorter label shown on phones; falls back to label. */
short?: string
}
export type ProgressBarHeaderItem = {
name: string
value?: string
/** Thumbnail src (slot item-n). */
image?: string
imageAlt?: string
}
export type ProgressBarHeaderState = 'default' | 'hover' | 'active' | 'disabled'
export type ProgressBarHeaderProps = {
/** Funnel steps in order. */
steps?: ProgressBarHeaderStep[]
/** The step the visitor is on, 1-based. */
current?: number
/** Bar fill 0-100; defaults to current / steps (2 of 3 = 66). */
percent?: number
/** Step counter; placeholders {current} and {total}. */
stepTemplate?: string
/** Text between the counter and the current step name. */
stepSeparator?: string
/** Completion text; placeholder {percent}. */
percentTemplate?: string
headline?: string
/** Phrase inside the headline that gets the marker stroke. */
headlineMark?: string
lead?: React.ReactNode
/** Product cut-out on a transparent background (slot product). */
productImage?: string
productImageAlt?: string
/** Selling heading over the receipt. */
receiptTitle?: string
items?: ProgressBarHeaderItem[]
subtotalLabel?: string
subtotal?: string
discountLabel?: string
discount?: string
totalLabel?: string
totalNote?: string
/** Today's price, the bold total. */
price?: string
guaranteeNote?: string
actionLabel?: string
/** One short line under the button. */
reassurance?: string
/** Quiet secondary button back to the previous step; empty hides it. */
backLabel?: string
href?: string
backHref?: string
onAction?: () => void
onBack?: () => void
disabled?: boolean
state?: ProgressBarHeaderState
copy?: {
/** Screen-reader note on finished steps. */
done?: string
/** Accessible name of the step list. */
stepsLabel?: string
}
className?: string
}
const DEFAULT_STEPS: ProgressBarHeaderStep[] = [
{ label: 'Your details', short: 'Details' },
{ label: 'Customize your order', short: 'Customize' },
{ label: 'Instant access', short: 'Access' },
]
const DEFAULT_ITEMS: ProgressBarHeaderItem[] = [
{ name: 'Funnel Planning Guide', value: '$49' },
{ name: 'Page Copy Workbook', value: '$29' },
{ name: 'Launch Checklist', value: '$19' },
]
export function ProgressBarHeader(props: ProgressBarHeaderProps) {
const {
steps = DEFAULT_STEPS,
current: currentProp = 2,
percent: percentProp,
stepTemplate = 'Step {current} of {total}',
stepSeparator = ': ',
percentTemplate = '{percent}% complete',
headline = 'Finish your order and start planning your funnel tonight',
headlineMark = 'planning your funnel tonight',
lead = 'Your kit is ready below. Check what’s inside, then take the last step: one payment, instant download, yours to keep.',
productImage,
productImageAlt = 'The Funnel Starter Kit',
receiptTitle = 'Three tools, one payment',
items = DEFAULT_ITEMS,
subtotalLabel = 'Value of all three',
subtotal = '$97',
discountLabel = 'Starter Kit bundle price',
discount = '−$50',
totalLabel = 'Total today',
totalNote = 'One payment · Lifetime access',
price = '$47',
guaranteeNote = 'Covered by our 30-day money-back guarantee',
actionLabel = 'Yes! I want the Funnel Starter Kit',
reassurance = 'Secure checkout · Instant download',
backLabel = 'Edit my order details',
href,
backHref,
onAction,
onBack,
disabled = false,
state = 'default',
copy,
className,
} = props
const labelId = React.useId()
const [hovering, setHovering] = React.useState(false)
const text = { done: 'completed', stepsLabel: 'Checkout steps', ...copy }
const count = Math.max(steps.length, 1)
const current = Math.min(Math.max(Math.round(currentProp), 1), count)
const step = steps[current - 1] ?? { label: '' }
const percent = clampPercent(percentProp ?? Math.floor((current / count) * 100))
const previous = Math.min(Math.floor(((current - 1) / count) * 100), percent)
const hasNext = current < count
const next = hasNext
? Math.max(current + 1 === count ? 100 : Math.floor(((current + 1) / count) * 100), percent)
: percent
const isDisabled = disabled || state === 'disabled'
const forced = !isDisabled && (state === 'hover' || state === 'active') ? state : undefined
const preview = hasNext && !isDisabled && (forced !== undefined || hovering)
const counter = fill(stepTemplate, { current, total: count })
const hasPct = percentTemplate.includes('{percent}')
const [pctBefore, pctAfter = ''] = percentTemplate.split('{percent}')
const trackStyle = {
'--pbh-from-clip': percent > 0 ? `${(100 - (previous / percent) * 100).toFixed(2)}%` : '0%',
'--pbh-ghost-clip': next > 0 ? `${(100 - (percent / next) * 100).toFixed(2)}%` : '0%',
} as React.CSSProperties
const previewOn = () => setHovering(true)
const previewOff = () => setHovering(false)
const ctaEvents = { onMouseEnter: previewOn, onMouseLeave: previewOff, onFocus: previewOn, onBlur: previewOff }
const cta = isDisabled ? (
<button type='button' className='cf-pbh__cta' disabled>
{actionLabel}
</button>
) : href ? (
<a className='cf-pbh__cta' href={href} data-force={forced} onClick={() => onAction?.()} {...ctaEvents}>
{actionLabel}
</a>
) : (
<button type='button' className='cf-pbh__cta' data-force={forced} onClick={() => onAction?.()} {...ctaEvents}>
{actionLabel}
</button>
)
return (
<section
className={['cf-pbh', className].filter(Boolean).join(' ')}
data-preview={preview ? 'true' : 'false'}
style={{ '--pbh-n': count } as React.CSSProperties}
>
<style>{CSS}</style>
<header className='cf-pbh__head'>
<div className='cf-pbh__labelrow'>
<p className='cf-pbh__label' id={labelId}>
<span className='cf-pbh__count'>{counter}</span>
{stepSeparator}
{step.label}
</p>
<p className='cf-pbh__pct'>
{hasPct ? (
<>
{pctBefore}
<strong>{percent}</strong>
{pctAfter}
</>
) : (
percentTemplate
)}
</p>
</div>
<div
className='cf-pbh__track'
role='progressbar'
aria-labelledby={labelId}
aria-valuemin={0}
aria-valuemax={100}
aria-valuenow={percent}
aria-valuetext={`${counter}${stepSeparator}${step.label}`}
style={trackStyle}
>
{hasNext && <span className='cf-pbh__ghost' aria-hidden='true' style={{ width: `${next}%` }} />}
<span className='cf-pbh__fill' aria-hidden='true' style={{ width: `${percent}%` }} />
{Array.from({ length: count - 1 }, (_, i) => (
<span key={i} className='cf-pbh__tick' aria-hidden='true' style={{ left: `${((i + 1) / count) * 100}%` }} />
))}
</div>
<ol className='cf-pbh__steps' aria-label={text.stepsLabel}>
{steps.map((s, i) => {
const n = i + 1
const status = n < current ? 'done' : n === current ? 'current' : n === current + 1 ? 'next' : 'todo'
return (
<li key={i} className={`cf-pbh__step is-${status}`} aria-current={status === 'current' ? 'step' : undefined}>
<span className='cf-pbh__badge' aria-hidden='true'>
{status === 'done' ? <Check size={16} strokeWidth={3} /> : n}
</span>
{status === 'done' && (
<span className='cf-pbh__mini' aria-hidden='true'>
<Check size={16} strokeWidth={3} />
</span>
)}
<span className='cf-pbh__steplabel'>
<span className='cf-pbh__full'>{s.label}</span>
<span className='cf-pbh__short'>{s.short ?? s.label}</span>
{status === 'done' && <span className='cf-pbh__sr'> ({text.done})</span>}
</span>
</li>
)
})}
</ol>
</header>
<div className='cf-pbh__body'>
<div className='cf-pbh__pitch'>
<h2 className='cf-pbh__headline cf-pbh__in'>
<Marked text={headline} mark={headlineMark} />
</h2>
{lead ? (
<p className='cf-pbh__lead cf-pbh__in' style={{ '--d': '.07s' } as React.CSSProperties}>
{lead}
</p>
) : null}
{productImage ? (
<figure className='cf-pbh__product cf-pbh__in' style={{ '--d': '.14s' } as React.CSSProperties}>
<img src={productImage} alt={productImageAlt} width={480} height={480} decoding='async' />
</figure>
) : null}
</div>
<div className='cf-pbh__offer'>
<div className='cf-pbh__receipt cf-pbh__in' style={{ '--d': '.14s' } as React.CSSProperties}>
<h3 className='cf-pbh__rtitle'>{receiptTitle}</h3>
<ul className='cf-pbh__items'>
{items.map((item, i) => (
<li key={i} className='cf-pbh__item'>
{item.image ? (
<img className='cf-pbh__thumb' src={item.image} alt={item.imageAlt ?? item.name} width={44} height={44} loading='lazy' decoding='async' />
) : null}
<span className='cf-pbh__iname'>{item.name}</span>
{item.value ? <span className='cf-pbh__ival'>{item.value}</span> : null}
</li>
))}
</ul>
{subtotal || discount ? (
<dl className='cf-pbh__sums'>
{subtotal ? (
<div className='cf-pbh__row'>
<dt>{subtotalLabel}</dt>
<dd>{subtotal}</dd>
</div>
) : null}
{discount ? (
<div className='cf-pbh__row is-discount'>
<dt>
<Tag size={18} strokeWidth={2.5} className='cf-pbh__ico is-good' aria-hidden='true' />
{discountLabel}
</dt>
<dd>{discount}</dd>
</div>
) : null}
</dl>
) : null}
<div className='cf-pbh__total'>
<div>
<p className='cf-pbh__tlabel'>{totalLabel}</p>
{totalNote ? <p className='cf-pbh__tnote'>{totalNote}</p> : null}
</div>
<p className='cf-pbh__price'>{price}</p>
</div>
{guaranteeNote ? (
<p className='cf-pbh__guar'>
<ShieldCheck size={16} strokeWidth={2.5} className='cf-pbh__ico is-good' aria-hidden='true' />
{keepHyphens(guaranteeNote)}
</p>
) : null}
</div>
<div className='cf-pbh__action cf-pbh__in' style={{ '--d': '.21s' } as React.CSSProperties}>
{cta}
{reassurance ? (
<p className='cf-pbh__assure'>
<Lock size={16} strokeWidth={2.5} className='cf-pbh__ico' aria-hidden='true' />
{reassurance}
</p>
) : null}
{backLabel ? (
backHref ? (
<a className='cf-pbh__back' href={backHref} onClick={() => onBack?.()}>
{backLabel}
</a>
) : (
<button type='button' className='cf-pbh__back' onClick={() => onBack?.()}>
{backLabel}
</button>
)
) : null}
</div>
</div>
</div>
</section>
)
}
export default ProgressBarHeader
function Marked({ text, mark }: { text: string; mark?: string }) {
const at = mark ? text.indexOf(mark) : -1
if (!mark || at < 0) return <>{text}</>
return (
<>
{text.slice(0, at)}
<span className='cf-pbh__mark'>{mark}</span>
{text.slice(at + mark.length)}
</>
)
}
function fill(template: string, vars: Record<string, string | number>) {
return Object.entries(vars).reduce((out, [key, value]) => out.split('{' + key + '}').join(String(value)), template)
}
function clampPercent(n: number) {
return Number.isFinite(n) ? Math.min(100, Math.max(0, Math.round(n))) : 0
}
/** Keeps hyphenated words ("money-back", "30-day") whole so a phone wrap never splits them. */
function keepHyphens(text: string) {
return text.split(/(\S+-\S+)/).map((part, i) =>
i % 2 ? (
<span key={i} className='cf-pbh__nobr'>
{part}
</span>
) : (
part
),
)
}
const CSS = `
.cf-pbh{--pbh-fill:var(--accent-fill,var(--accent,oklch(0.5 0.17 257)));--pbh-stripe:oklch(from var(--pbh-fill) calc(l + 0.12) c h / 0.55);--pbh-line:oklch(from var(--ink,oklch(0.21 0.03 263)) l c h / 0.12);--pbh-head:color-mix(in oklch,var(--ink,oklch(0.21 0.03 263)) 3%,var(--card,oklch(1 0 0)));--pbh-well:color-mix(in oklch,var(--ink,oklch(0.21 0.03 263)) 4%,var(--card,oklch(1 0 0)));--pbh-marker:var(--marker,var(--bump-strip,#fae37c));--pbh-btn:var(--button-bg,var(--cta,oklch(0.58 0.21 29)));--pbh-btn-2:var(--button-bg-2,var(--cta-2,oklch(0.51 0.21 29)));--pbh-shadow:var(--shadow,oklch(0.22 0.03 256));position:relative;box-sizing:border-box;width:100%;max-width:1120px;margin-inline:auto;overflow:hidden;background:var(--card,oklch(1 0 0));color:var(--ink,oklch(0.21 0.03 263));border:1px solid var(--card-border,oklch(from var(--ink,oklch(0.21 0.03 263)) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(0.22 0.03 256 / 0.22),0 4px 10px -2px oklch(0.22 0.03 256 / 0.2)));font-family:var(--font-body,system-ui,sans-serif);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5}
.cf-pbh *,.cf-pbh *::before,.cf-pbh *::after{box-sizing:border-box}
.cf-pbh :where(h2,h3,p,ul,ol,dl,dd,figure){margin:0}
.cf-pbh__head{padding:clamp(20px,3vw,32px) clamp(20px,3vw,32px) clamp(16px,2.4vw,24px);background:var(--pbh-head);border-bottom:1px solid var(--pbh-line)}
.cf-pbh__labelrow{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px;margin-bottom:12px}
.cf-pbh__label{min-width:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.25;letter-spacing:-0.01em;text-wrap:balance}
.cf-pbh__count{color:var(--accent,oklch(0.5 0.17 257))}
.cf-pbh__pct{font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--muted,oklch(0.45 0.03 258));font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-pbh__pct strong{font-weight:800;color:var(--ink,oklch(0.21 0.03 263))}
.cf-pbh__track{position:relative;height:18px;border-radius:999px;overflow:hidden;background:color-mix(in oklch,var(--ink,oklch(0.21 0.03 263)) 9%,var(--card,oklch(1 0 0)));box-shadow:inset 0 1px 2px oklch(from var(--pbh-shadow) l c h / 0.3)}
.cf-pbh__fill,.cf-pbh__ghost{position:absolute;top:0;bottom:0;left:0;border-radius:999px;background-size:28px 28px,100% 100%}
.cf-pbh__fill{background-image:linear-gradient(-45deg,var(--pbh-stripe) 25%,transparent 25%,transparent 50%,var(--pbh-stripe) 50%,var(--pbh-stripe) 75%,transparent 75%,transparent),linear-gradient(oklch(from var(--pbh-fill) calc(l + 0.05) c h),oklch(from var(--pbh-fill) calc(l - 0.05) c h));box-shadow:inset 0 1px 0 oklch(from var(--pbh-fill) calc(l + 0.18) c h / 0.55),inset 0 -2px 0 oklch(from var(--pbh-fill) calc(l - 0.14) c h / 0.6);animation:cf-pbh-grow .9s cubic-bezier(.2,.7,.2,1) .15s both,cf-pbh-stripes 1.1s linear 4}
.cf-pbh__ghost{background-image:linear-gradient(-45deg,oklch(from var(--pbh-fill) l c h / 0.34) 25%,transparent 25%,transparent 50%,oklch(from var(--pbh-fill) l c h / 0.34) 50%,oklch(from var(--pbh-fill) l c h / 0.34) 75%,transparent 75%,transparent),linear-gradient(oklch(from var(--pbh-fill) l c h / 0.18),oklch(from var(--pbh-fill) l c h / 0.18));clip-path:inset(0 var(--pbh-ghost-clip,100%) 0 0 round 999px);opacity:0;transition:clip-path .45s cubic-bezier(.2,.7,.2,1),opacity .16s ease}
.cf-pbh[data-preview=true] .cf-pbh__ghost{opacity:1;clip-path:inset(0 0 0 0 round 999px)}
.cf-pbh__tick{position:absolute;top:0;bottom:0;width:2px;margin-left:-1px;background:oklch(from var(--card,oklch(1 0 0)) l c h / 0.85);pointer-events:none}
.cf-pbh__steps{list-style:none;padding:0;margin-top:12px;display:grid;grid-template-columns:repeat(var(--pbh-n,3),minmax(0,1fr))}
.cf-pbh__step{display:flex;align-items:center;gap:8px;min-width:0;padding-right:8px;font-size:0.9375rem;font-weight:600;line-height:1.25;color:var(--muted,oklch(0.45 0.03 258));transition:color .16s ease}
.cf-pbh__badge{flex:none;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;font-size:0.875rem;font-weight:800;font-variant-numeric:tabular-nums;background:var(--secondary,color-mix(in oklch,var(--ink,oklch(0.21 0.03 263)) 8%,var(--card,oklch(1 0 0))));color:var(--secondary-ink,var(--ink,oklch(0.21 0.03 263)));transition:background .16s ease,color .16s ease}
.cf-pbh__step.is-done{color:var(--ink,oklch(0.21 0.03 263))}
.cf-pbh__step.is-done .cf-pbh__badge{background:var(--success,oklch(0.5 0.14 150));color:var(--success-ink,#fff)}
.cf-pbh__step.is-current{color:var(--ink,oklch(0.21 0.03 263));font-weight:800}
.cf-pbh__step.is-current .cf-pbh__badge{background:var(--pbh-fill);color:var(--accent-fill-ink,var(--card,#fff))}
.cf-pbh[data-preview=true] .cf-pbh__step.is-next{color:var(--ink,oklch(0.21 0.03 263))}
.cf-pbh[data-preview=true] .cf-pbh__step.is-next .cf-pbh__badge{background:color-mix(in oklch,var(--pbh-fill) 22%,var(--card,oklch(1 0 0)));color:var(--ink,oklch(0.21 0.03 263))}
.cf-pbh__steplabel{min-width:0;overflow-wrap:break-word}
.cf-pbh__short,.cf-pbh__mini{display:none}
.cf-pbh__sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.cf-pbh__body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(32px,4.4vw,64px);align-items:start;padding:clamp(24px,3.4vw,40px) clamp(20px,3vw,32px) clamp(24px,3.6vw,44px)}
.cf-pbh__headline{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink,oklch(0.21 0.03 263))}
.cf-pbh__mark{background-image:linear-gradient(var(--pbh-marker),var(--pbh-marker));background-repeat:no-repeat;background-size:100% 0.5em;background-position:0 92%;padding-inline:0.06em;border-radius:0.1em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-pbh__lead{margin-top:16px;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted,oklch(0.45 0.03 258));text-wrap:pretty}
.cf-pbh__product{margin-top:24px;display:flex;justify-content:center}
.cf-pbh__product img{display:block;width:100%;max-width:360px;height:auto;aspect-ratio:1/1;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--pbh-shadow) l c h / 0.28)) drop-shadow(0 14px 16px oklch(from var(--pbh-shadow) l c h / 0.2))}
.cf-pbh__receipt{padding:clamp(18px,2.4vw,24px);border-radius:10px;background:var(--pbh-well)}
.cf-pbh__rtitle{margin-bottom:4px;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;text-wrap:balance}
.cf-pbh__items{list-style:none;padding:0}
.cf-pbh__item{display:flex;align-items:flex-start;gap:12px;padding:12px 0}
.cf-pbh__item + .cf-pbh__item{border-top:1px solid var(--pbh-line)}
.cf-pbh__thumb{flex:none;display:block;width:44px;height:44px;border-radius:8px;object-fit:cover;object-position:center}
.cf-pbh__iname{flex:1 1 auto;min-width:0;padding-top:2px;font-weight:700;line-height:1.3;text-wrap:pretty}
.cf-pbh__ival{flex:none;padding-top:2px;font-weight:700;line-height:1.3;font-variant-numeric:tabular-nums}
.cf-pbh__sums{display:grid;gap:8px;padding-top:12px;border-top:1px solid var(--pbh-line)}
.cf-pbh__row{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.cf-pbh__row dt{min-width:0;color:var(--muted,oklch(0.45 0.03 258));text-wrap:pretty}
.cf-pbh__row dd{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-pbh__row.is-discount dt{color:var(--ink,oklch(0.21 0.03 263));font-weight:700}
.cf-pbh__row.is-discount dd{font-weight:800}
.cf-pbh__ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:0.4em}
.cf-pbh__ico.is-good{color:var(--success,oklch(0.5 0.14 150))}
.cf-pbh__total{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:16px;margin-top:20px}
.cf-pbh__total > div{min-width:0}
.cf-pbh__tlabel{font-size:1.0625rem;font-weight:800;line-height:1.3}
.cf-pbh__tnote{margin-top:4px;font-size:0.9375rem;font-weight:500;line-height:1.4;color:var(--muted,oklch(0.45 0.03 258));text-wrap:pretty}
.cf-pbh__price{font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--ink,oklch(0.21 0.03 263))}
.cf-pbh__guar{margin-top:16px;font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--muted,oklch(0.45 0.03 258));text-wrap:pretty}
.cf-pbh__nobr{white-space:nowrap}
.cf-pbh__action{display:grid;gap:12px;justify-items:center;margin-top:24px;text-align:center}
.cf-pbh__cta{appearance:none;border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:64px;padding:14px 24px;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.4vw,1.25rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;color:var(--button-ink,var(--cta-ink,#fff));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--pbh-btn) calc(l + 0.04) c h),oklch(from var(--pbh-btn-2) calc(l - 0.02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--pbh-btn) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--pbh-btn) calc(l - 0.16) c h),0 1px 2px oklch(from var(--pbh-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--pbh-shadow) l c h / 0.45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-pbh__cta:not(:disabled):hover,.cf-pbh__cta[data-force=hover]{transform:translateY(-1px);background:linear-gradient(oklch(from var(--pbh-btn) calc(l - 0.01) c h),oklch(from var(--pbh-btn-2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--pbh-btn) calc(l + 0.1) c h / 0.7),inset 0 -3px 0 oklch(from var(--pbh-btn) calc(l - 0.2) c h),0 1px 2px oklch(from var(--pbh-shadow) l c h / 0.32),0 10px 20px -6px oklch(from var(--pbh-shadow) l c h / 0.5)}
.cf-pbh__cta:not(:disabled):active,.cf-pbh__cta[data-force=active]{transform:translateY(1px);background:linear-gradient(oklch(from var(--pbh-btn) calc(l - 0.06) c h),oklch(from var(--pbh-btn-2) calc(l - 0.1) c h));box-shadow:inset 0 2px 3px oklch(from var(--pbh-btn) calc(l - 0.24) c h / 0.45),inset 0 -2px 0 oklch(from var(--pbh-btn) calc(l - 0.18) c h),0 1px 2px oklch(from var(--pbh-shadow) l c h / 0.3)}
.cf-pbh__cta:disabled{cursor:not-allowed;transform:none;background:var(--secondary,oklch(0.93 0.015 263));color:var(--secondary-ink,var(--ink,oklch(0.21 0.03 263)));text-shadow:none;box-shadow:inset 0 -2px 0 oklch(from var(--secondary,oklch(0.93 0.015 263)) calc(l - 0.08) c h)}
.cf-pbh__cta:focus-visible,.cf-pbh__back:focus-visible{outline:3px solid var(--field-focus,var(--accent,oklch(0.5 0.17 257)));outline-offset:3px}
.cf-pbh__assure{font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--muted,oklch(0.45 0.03 258));text-wrap:pretty}
.cf-pbh__back{appearance:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 20px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary,oklch(0.93 0.015 263)));color:var(--button-2-ink,var(--secondary-ink,oklch(0.21 0.03 263)));box-shadow:var(--button-2-shadow,inset 0 -2px 0 oklch(from var(--secondary,oklch(0.93 0.015 263)) calc(l - 0.1) c h),var(--shadow-sm,0 1px 2px oklch(0.22 0.03 256 / 0.2)));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:0.9375rem;line-height:1.2;text-decoration:none;transition:background .16s ease,transform .16s ease}
.cf-pbh__back:hover{background:color-mix(in oklch,var(--ink,oklch(0.21 0.03 263)) 8%,var(--button-2-bg,var(--secondary,oklch(0.93 0.015 263))))}
.cf-pbh__back:active{transform:translateY(1px)}
.cf-pbh__in{animation:cf-pbh-in .45s cubic-bezier(.2,.7,.2,1) var(--d,0s) both}
@keyframes cf-pbh-grow{from{clip-path:inset(0 var(--pbh-from-clip,0%) 0 0 round 999px)}to{clip-path:inset(0 0 0 0 round 999px)}}
@keyframes cf-pbh-stripes{from{background-position:0 0,0 0}to{background-position:28px 0,0 0}}
@keyframes cf-pbh-in{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (max-width:860px){.cf-pbh__body{grid-template-columns:minmax(0,1fr);gap:24px}.cf-pbh__product{margin-top:20px}.cf-pbh__product img{max-width:240px}}
@media (max-width:640px){.cf-pbh__head{padding:20px 20px 16px}.cf-pbh__track{height:14px}.cf-pbh__badge,.cf-pbh__full{display:none}.cf-pbh__short{display:inline}.cf-pbh__step{display:block;font-size:0.875rem}.cf-pbh__step.is-current{color:var(--accent,oklch(0.5 0.17 257))}.cf-pbh__mini{display:inline-block;vertical-align:-0.2em;margin-inline-end:4px;color:var(--success,oklch(0.5 0.14 150))}.cf-pbh__body{padding:24px 20px 28px}.cf-pbh__cta{padding:14px 20px}}
@media (forced-colors:active){.cf-pbh__track{border:1px solid CanvasText}.cf-pbh__fill{background:Highlight}}
@media (prefers-reduced-motion:reduce){.cf-pbh *,.cf-pbh *::before,.cf-pbh *::after{animation:none !important;transition:none !important}}
`
pieces/hero/progress-bar-header/specimen.tsx 43 lines
import __studioImage7368d16b from "../assets/2be2c3b60c4c9950.webp";
import * as React from 'react'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { ProgressBarHeader, type ProgressBarHeaderState } from '../progress-bar-header'
export const states = ['default', 'hover', 'active', 'disabled']
export default function ProgressBarHeaderSpecimen({ state = 'default' }: { state?: ProgressBarHeaderState }) {
const sample = defaults.sample
return (
<ProgressBarHeader
state={state}
steps={[
{ label: 'Your details', short: 'Details' },
{ label: 'Customize your order', short: 'Customize' },
{ label: 'Instant access', short: 'Access' },
]}
current={2}
headline='Finish your order and start planning your funnel tonight'
headlineMark='planning your funnel tonight'
productImage={slot(
'product',
__studioImage7368d16b
)}
productImageAlt='The Funnel Starter Kit: planning guide, page copy workbook and launch checklist'
receiptTitle='Three tools, one payment'
items={sample.items.map((item, i) => ({
name: item.name,
value: item.value,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
subtotal={sample.regularPrice}
discount='−$50'
price={sample.price}
totalNote={sample.note}
guaranteeNote={`Covered by our ${sample.guarantee}`}
actionLabel={`Yes! I want ${sample.name.replace('The ', 'the ')}`}
reassurance={sample.sublabel}
/>
)
}
| Name | Type | Details |
|---|---|---|
steps OptionalProgressBarHeader |
ProgressBarHeaderStep[] |
|
current OptionalProgressBarHeader |
number |
|
percent OptionalProgressBarHeader |
number |
|
stepTemplate OptionalProgressBarHeader |
string |
|
stepSeparator OptionalProgressBarHeader |
string |
|
percentTemplate OptionalProgressBarHeader |
string |
|
headline OptionalProgressBarHeader |
string |
|
headlineMark OptionalProgressBarHeader |
string |
|
lead OptionalProgressBarHeader |
React.ReactNode |
|
productImage OptionalProgressBarHeader |
string |
|
productImageAlt OptionalProgressBarHeader |
string |
|
receiptTitle OptionalProgressBarHeader |
string |
|
items OptionalProgressBarHeader |
ProgressBarHeaderItem[] |
|
subtotalLabel OptionalProgressBarHeader |
string |
|
subtotal OptionalProgressBarHeader |
string |
|
discountLabel OptionalProgressBarHeader |
string |
|
discount OptionalProgressBarHeader |
string |
|
totalLabel OptionalProgressBarHeader |
string |
|
totalNote OptionalProgressBarHeader |
string |
|
price OptionalProgressBarHeader |
string |
|
guaranteeNote OptionalProgressBarHeader |
string |
|
actionLabel OptionalProgressBarHeader |
string |
|
reassurance OptionalProgressBarHeader |
string |
|
backLabel OptionalProgressBarHeader |
string |
|
href OptionalProgressBarHeader |
string |
|
backHref OptionalProgressBarHeader |
string |
|
onAction OptionalProgressBarHeader |
() => void |
|
onBack OptionalProgressBarHeader |
() => void |
|
disabled OptionalProgressBarHeader |
boolean |
|
state OptionalProgressBarHeader |
ProgressBarHeaderState |
|
copy OptionalProgressBarHeader |
{
/** Screen-reader note on finished steps. */
done?: string
/** Accessible name of the step list. */
stepsLabel?: string
} |
|
className OptionalProgressBarHeader |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- 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).
-
2be2c3b60c4c9950.webp
image/webp · 144 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB