Checkout Header 2
Checkout progress header: a light half carries the logo and a sliding step rail that shows the buyer how close they are to done,
Use it in a prompt
Use nav/checkout-header-2 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/nav/checkout-header-2.tsx. - Import it and pass your copy and images (Props tab):
import { CheckoutHeader2 } from "@/components/funneldna/nav/checkout-header-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/nav/checkout-header-2/component.tsx 303 lines
// layout: split-contrast
// Checkout progress header: a light half carries the logo and a sliding step rail that shows the buyer how close they are to done,
// and a dark half answers the safety question before it is asked. It has no exit links, so the visitor stays in the checkout.
import * as React from 'react';
import { Check, Clock, Lock, Phone, ShieldCheck } from 'lucide-react';
export type CheckoutHeader2Props = {
/** Step names in order, 1 to 4 (e.g. Your info, Payment, Confirm) */
steps?: string[];
/** 0-based index of the step the visitor is on */
current?: number;
/** Called with a completed step's index for back navigation; without it no step is clickable */
onStepClick?: (index: number) => void;
/** logo slot image: a transparent mark or wordmark. Empty shows the brand name instead */
logoImage?: string;
/** Alt text for the logo image; falls back to brandName */
logoAlt?: string;
/** Wordmark shown when there is no logo image; empty hides it */
brandName?: string;
/** Support number as shown; empty hides it. Digits and + form the tel: link */
phone?: string;
/** Lead-in before the phone number on wide screens */
phoneLabel?: string;
/** Accessible name of the phone link, with {phone} */
callLabel?: string;
/** Reassurance beside the lock */
secureLabel?: string;
/** Shorter reassurance for phones */
secureLabelShort?: string;
/** A real guarantee line for the strip under the bar; empty hides it */
guaranteeLine?: string;
/** A real deadline line for the strip; empty hides it */
deadlineLine?: string;
/** Accessible name of the step list */
progressLabel?: string;
/** Template with {current} and {total} */
stepCountLabel?: string;
/** Screen-reader suffix for finished steps that are not clickable */
completedLabel?: string;
/** Accessible label of a clickable finished step, with {label} */
backLabel?: string;
/** Lock back navigation (for example while a payment processes) */
disabled?: boolean;
/** Stick to the top of the viewport while the visitor scrolls */
sticky?: boolean;
state?: 'default' | 'hover' | 'disabled';
className?: string;
};
export function CheckoutHeader2(props: CheckoutHeader2Props) {
const {
steps = ['Your info', 'Payment', 'Confirm'],
current = 0,
onStepClick,
logoImage,
logoAlt,
brandName = 'Funnel Starter Kit',
phone = '',
phoneLabel = 'Questions?',
callLabel = 'Call support at {phone}',
secureLabel = 'Secure checkout',
secureLabelShort = 'Secure',
guaranteeLine = '',
deadlineLine = '',
progressLabel = 'Checkout progress',
stepCountLabel = 'Step {current} of {total}',
completedLabel = 'completed',
backLabel = '{label}, completed. Go back to this step',
disabled = false,
sticky = false,
state = 'default',
className,
} = props;
const total = steps.length;
const cur = total ? Math.min(Math.max(Math.round(current), 0), total - 1) : 0;
const navLocked = disabled || state === 'disabled';
const progress = total > 1 ? cur / (total - 1) : 0;
// The step the visitor came from: the badges they just finished pop once the fill arrives.
const prevRef = React.useRef(cur);
const prevCur = prevRef.current;
React.useEffect(() => {
prevRef.current = cur;
}, [cur]);
const count = fill(stepCountLabel, { current: String(cur + 1), total: String(total) });
const tel = Array.from(phone).filter((ch) => '0123456789+'.includes(ch)).join('');
const callName = fill(callLabel, { phone });
const firstDone = cur > 0 ? 0 : -1;
const hasStrip = Boolean(guaranteeLine || deadlineLine);
const rootStyle = { '--cf-ch2-n': Math.max(total, 1), '--cf-ch2-p': progress } as React.CSSProperties;
return (
<header className={['cf-ch2', sticky ? 'is-sticky' : '', className].filter(Boolean).join(' ')} style={rootStyle}>
<style>{CSS}</style>
<div className='cf-ch2-card'>
<div className={total ? 'cf-ch2-bar' : 'cf-ch2-bar is-bare'}>
<div className='cf-ch2-brand'>
{logoImage ? (
<img className='cf-ch2-logo' src={logoImage} alt={logoAlt || brandName || 'Logo'} />
) : brandName ? (
<span className='cf-ch2-word'>
<span className='cf-ch2-mark' aria-hidden='true'>{brandName.trim().charAt(0)}</span>
<span className='cf-ch2-wordtext'>{brandName}</span>
</span>
) : null}
</div>
{total > 0 ? (
<nav className='cf-ch2-track' aria-label={progressLabel + ': ' + count}>
<div className='cf-ch2-rail'>
{total > 1 ? (
<span className='cf-ch2-line' aria-hidden='true'>
<span className='cf-ch2-fill' />
</span>
) : null}
<ol className='cf-ch2-steps'>
{steps.map((label, i) => {
const status = i < cur ? 'done' : i === cur ? 'current' : 'next';
const clickable = status === 'done' && Boolean(onStepClick) && !navLocked;
const pop = status === 'done' && i >= prevCur && i < cur;
const badge = (
<span key={status} className={'cf-ch2-badge is-' + status + (pop ? ' is-pop' : '')} aria-hidden='true'>
{status === 'done' ? <Check size={18} strokeWidth={3} /> : i + 1}
</span>
);
return (
<li key={label + i} className={'cf-ch2-step is-' + status} aria-current={status === 'current' ? 'step' : undefined}>
{clickable ? (
<button
type='button'
className={'cf-ch2-hit' + (state === 'hover' && i === firstDone ? ' is-hover' : '')}
onClick={() => onStepClick?.(i)}
aria-label={fill(backLabel, { label })}
>
{badge}
<span className='cf-ch2-label'>{label}</span>
</button>
) : (
<span className='cf-ch2-hit'>
{badge}
<span className='cf-ch2-label'>
{label}
{status === 'done' ? <span className='cf-ch2-sr'>, {completedLabel}</span> : null}
</span>
</span>
)}
</li>
);
})}
</ol>
</div>
<p className='cf-ch2-caption' aria-hidden='true'>
{total > 1 ? <span className='cf-ch2-caption-count'>{count}</span> : null}
<span className='cf-ch2-caption-label'>{steps[cur]}</span>
</p>
<p className='cf-ch2-sr' aria-live='polite'>{count + ': ' + steps[cur]}</p>
</nav>
) : null}
<div className='cf-ch2-secure'>
<span className='cf-ch2-lock' aria-hidden='true'>
<Lock size={20} strokeWidth={2.5} />
</span>
<span className='cf-ch2-secure-text'>
<span className='cf-ch2-secure-label'>
<span className='cf-ch2-long'>{secureLabel}</span>
<span className='cf-ch2-short'>{secureLabelShort}</span>
</span>
{phone ? (
<a className='cf-ch2-phone' href={'tel:' + tel} aria-label={callName}>
{phoneLabel ? phoneLabel + ' ' : ''}
{phone}
</a>
) : null}
</span>
{phone ? (
<a className='cf-ch2-phone-icon' href={'tel:' + tel} aria-label={callName}>
<Phone size={20} strokeWidth={2.5} aria-hidden='true' />
</a>
) : null}
</div>
</div>
{hasStrip ? (
<div className='cf-ch2-strip'>
{guaranteeLine ? (
<p className='cf-ch2-note is-guarantee'>
<ShieldCheck size={18} strokeWidth={2.5} aria-hidden='true' />
{guaranteeLine}
</p>
) : null}
{deadlineLine ? (
<p className='cf-ch2-note is-deadline'>
<Clock size={18} strokeWidth={2.5} aria-hidden='true' />
{deadlineLine}
</p>
) : null}
</div>
) : null}
</div>
</header>
);
}
export default CheckoutHeader2;
function fill(template: string, values: Record<string, string>) {
return Object.keys(values).reduce((text, key) => text.split('{' + key + '}').join(values[key]), template);
}
// Theme notes: every colour is a token or an OKLCH recipe on a token; hex appears only as var() fallbacks.
// The done badge glyph reads the component-scoped --cf-ch2-done-ink, white by default (solid status badge rule).
// The clickable step reads --button-radius for its hit/focus shape (10px when the theme leaves it unset).
const CSS = `
.cf-ch2{container-type:inline-size;display:block;width:100%;font-family:var(--font-body,Arial,sans-serif);color:var(--ink,#101828);}
.cf-ch2.is-sticky{position:sticky;top:0;z-index:30;}
.cf-ch2 *,.cf-ch2 *::before,.cf-ch2 *::after{box-sizing:border-box;}
.cf-ch2-card{background:var(--card,#fff);border:1px solid var(--card-border,oklch(from var(--ink,#101828) l c h / .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 260 / .22),0 4px 10px -2px oklch(0.22 0.03 260 / .2)));overflow:hidden;}
.cf-ch2-bar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:'brand track secure';align-items:stretch;min-height:96px;}
.cf-ch2-bar.is-bare{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'brand secure';min-height:72px;}
.cf-ch2-brand{grid-area:brand;display:flex;align-items:center;min-width:0;max-width:280px;padding:16px 12px 16px clamp(20px,3vw,32px);}
.cf-ch2-logo{display:block;height:40px;width:auto;max-width:180px;object-fit:contain;object-position:left center;}
.cf-ch2-word{display:inline-flex;align-items:center;gap:12px;min-width:0;font-family:var(--font-display,var(--font-body,Arial,sans-serif));font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);font-size:1.125rem;line-height:1.15;color:var(--ink,#101828);}
.cf-ch2-mark{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:var(--radius,12px);background:linear-gradient(oklch(from var(--accent-fill,var(--accent,#2563eb)) calc(l + .04) c h),oklch(from var(--accent-fill,var(--accent,#2563eb)) calc(l - .05) c h));color:var(--accent-fill-ink,var(--card,#fff));font-size:1.125rem;line-height:1;letter-spacing:0;text-transform:uppercase;box-shadow:inset 0 1px 0 oklch(from var(--accent-fill,var(--accent,#2563eb)) calc(l + .14) c h / .6),var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / .25));}
.cf-ch2-wordtext{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.cf-ch2-track{grid-area:track;min-width:0;display:flex;flex-direction:column;justify-content:center;padding:18px clamp(12px,2.4vw,32px) 16px;}
.cf-ch2-rail{position:relative;width:100%;max-width:680px;margin:0 auto;}
.cf-ch2-line{position:absolute;top:15px;height:6px;left:calc(50% / var(--cf-ch2-n));right:calc(50% / var(--cf-ch2-n));border-radius:999px;overflow:hidden;background:color-mix(in oklch,var(--ink,#101828) 10%,var(--card,#fff));box-shadow:inset 0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .14);}
.cf-ch2-fill{position:absolute;inset:0;transform-origin:left center;transform:scaleX(var(--cf-ch2-p));background:linear-gradient(90deg,oklch(from var(--accent-fill,var(--accent,#2563eb)) calc(l - .04) c h),oklch(from var(--accent-fill,var(--accent,#2563eb)) calc(l + .05) c h));transition:transform .6s cubic-bezier(.2,.7,.2,1);}
.cf-ch2-steps{position:relative;display:grid;grid-template-columns:repeat(var(--cf-ch2-n),minmax(0,1fr));list-style:none;margin:0;padding:0;}
.cf-ch2-step{display:flex;justify-content:center;min-width:0;}
.cf-ch2-hit{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;min-width:0;max-width:100%;margin:0;padding:0 8px 4px;border:0;border-radius:10px;background:none;font:inherit;color:inherit;text-align:center;}
button.cf-ch2-hit{cursor:pointer;border-radius:var(--button-radius,10px);-webkit-tap-highlight-color:transparent;}
button.cf-ch2-hit:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent,#2563eb)) l c h / .55);outline-offset:3px;}
.cf-ch2-badge{position:relative;flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:999px;font-family:var(--font-display,var(--font-body,Arial,sans-serif));font-weight:var(--display-weight,800);font-size:.875rem;line-height:1;font-variant-numeric:tabular-nums;transition:transform .16s ease,background-color .16s ease,box-shadow .16s ease;}
.cf-ch2-badge svg{width:18px;height:18px;}
/* Solid status badge: --success fill with a white glyph, per the theme contract. */
.cf-ch2-badge.is-done{background:var(--success,#16a34a);color:var(--cf-ch2-done-ink,#fff);box-shadow:inset 0 1px 0 oklch(from var(--success,#16a34a) calc(l + .14) c h / .7),inset 0 -2px 0 oklch(from var(--success,#16a34a) calc(l - .12) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3);}
.cf-ch2-badge.is-current{background:var(--card,#fff);color:var(--accent,#2563eb);font-size:.9375rem;box-shadow:inset 0 0 0 3px var(--accent-fill,var(--accent,#2563eb)),0 0 0 5px oklch(from var(--accent-fill,var(--accent,#2563eb)) l c h / .22),0 3px 6px -1px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3);}
.cf-ch2-badge.is-next{background:var(--secondary,oklch(0.93 0.015 263));color:var(--secondary-ink,var(--ink,#101828));box-shadow:inset 0 0 0 1px oklch(from var(--ink,#101828) l c h / .1);}
.cf-ch2-label{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9375rem;line-height:1.25;font-weight:600;color:var(--ink,#101828);}
.cf-ch2-step.is-current .cf-ch2-label{color:var(--accent,#2563eb);font-weight:800;}
.cf-ch2-step.is-next .cf-ch2-label{color:var(--muted,#475467);}
button.cf-ch2-hit:hover .cf-ch2-label,.cf-ch2-hit.is-hover .cf-ch2-label{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:.22em;text-decoration-color:oklch(from var(--ink,#101828) l c h / .45);}
button.cf-ch2-hit:hover .cf-ch2-badge.is-done,.cf-ch2-hit.is-hover .cf-ch2-badge.is-done{background:oklch(from var(--success,#16a34a) calc(l - .06) c h);transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--success,#16a34a) calc(l + .1) c h / .7),inset 0 -2px 0 oklch(from var(--success,#16a34a) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3),0 4px 8px -3px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .45);}
button.cf-ch2-hit:active .cf-ch2-badge.is-done{transform:translateY(0) scale(.94);background:oklch(from var(--success,#16a34a) calc(l - .1) c h);box-shadow:inset 0 2px 3px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .35);}
.cf-ch2-badge.is-pop{animation:cf-ch2-pop .3s cubic-bezier(.2,.7,.2,1) .4s backwards;}
@keyframes cf-ch2-pop{from{transform:scale(.9)}to{transform:scale(1)}}
.cf-ch2-caption{display:none;align-items:baseline;justify-content:center;gap:8px;min-width:0;margin:12px 0 0;font-size:.9375rem;line-height:1.3;white-space:nowrap;}
.cf-ch2-caption-count{flex:none;color:var(--muted,#475467);font-weight:600;}
.cf-ch2-caption-label{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--accent,#2563eb);font-weight:800;}
.cf-ch2-secure{grid-area:secure;display:flex;align-items:center;gap:12px;min-width:0;padding:16px clamp(20px,3vw,32px) 16px calc(clamp(20px,3vw,32px) + 28px);background:var(--band,oklch(0.27 0.067 256));color:var(--band-ink,#fff);clip-path:polygon(28px 0,100% 0,100% 100%,0 100%);}
.cf-ch2-lock{flex:none;display:grid;place-items:center;width:40px;height:40px;border-radius:999px;background:oklch(from var(--band-ink,#fff) l c h / .12);color:var(--band-ink,#fff);box-shadow:inset 0 0 0 1px oklch(from var(--band-ink,#fff) l c h / .16);}
.cf-ch2-secure-text{display:flex;flex-direction:column;gap:2px;min-width:0;}
.cf-ch2-secure-label{font-family:var(--font-display,var(--font-body,Arial,sans-serif));font-weight:var(--display-weight,800);font-size:.9375rem;line-height:1.2;white-space:nowrap;}
.cf-ch2-short{display:none;}
.cf-ch2-phone{color:var(--band-ink,#fff);font-size:.9375rem;font-weight:500;line-height:1.3;white-space:nowrap;text-decoration:underline;text-decoration-color:oklch(from var(--band-ink,#fff) l c h / .4);text-underline-offset:.18em;border-radius:4px;font-variant-numeric:tabular-nums;}
.cf-ch2-phone:hover{text-decoration-color:var(--band-ink,#fff);}
.cf-ch2-phone:focus-visible,.cf-ch2-phone-icon:focus-visible{outline:3px solid var(--band-ink,#fff);outline-offset:2px;}
.cf-ch2-phone-icon{display:none;flex:none;place-items:center;width:44px;height:44px;border-radius:999px;color:var(--band-ink,#fff);background:oklch(from var(--band-ink,#fff) l c h / .12);transition:background-color .16s ease,transform .16s ease;}
.cf-ch2-phone-icon:hover{background:oklch(from var(--band-ink,#fff) l c h / .2);}
.cf-ch2-phone-icon:active{transform:scale(.95);}
.cf-ch2-strip{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 28px;padding:12px clamp(16px,3vw,32px);background:color-mix(in oklch,var(--ink,#101828) 4%,var(--card,#fff));font-size:.9375rem;font-weight:600;line-height:1.4;text-align:center;color:var(--ink,#101828);}
.cf-ch2-note{margin:0;text-wrap:pretty;}
.cf-ch2-note svg{display:inline-block;vertical-align:-.2em;margin-inline-end:.4em;}
.cf-ch2-note.is-guarantee svg{color:var(--success,#16a34a);}
.cf-ch2-note.is-deadline svg{color:var(--warning,#a16207);}
.cf-ch2-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}
@container (max-width: 860px){
.cf-ch2-brand{max-width:220px;}
.cf-ch2-phone{display:none;}
.cf-ch2-phone-icon{display:grid;}
}
@container (max-width: 640px){
.cf-ch2-bar{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'brand secure' 'track track';min-height:0;}
.cf-ch2-brand{max-width:none;padding:10px 8px 10px 16px;}
.cf-ch2-logo{height:32px;max-width:150px;}
.cf-ch2-word{gap:10px;font-size:1.0625rem;}
.cf-ch2-wordtext{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal;text-wrap:balance;line-height:1.15;}
.cf-ch2-mark{width:32px;height:32px;font-size:.9375rem;border-radius:calc(var(--radius,12px) * .75);}
.cf-ch2-secure{gap:8px;min-height:60px;padding:8px 10px 8px 32px;clip-path:polygon(20px 0,100% 0,100% 100%,0 100%);}
.cf-ch2-lock{width:auto;height:auto;background:none;box-shadow:none;}
.cf-ch2-long{display:none;}
.cf-ch2-short{display:inline;}
.cf-ch2-track{padding:8px 12px 14px;border-top:1px solid oklch(from var(--ink,#101828) l c h / .1);}
.cf-ch2-line{top:19px;}
.cf-ch2-hit{padding:6px;gap:0;}
.cf-ch2-badge{width:32px;height:32px;}
.cf-ch2-badge svg{width:16px;height:16px;}
.cf-ch2-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);}
.cf-ch2-caption{display:flex;margin-top:6px;}
}
@container (max-width: 380px){
.cf-ch2-mark{display:none;}
}
@media (prefers-reduced-motion: reduce){
.cf-ch2-fill,.cf-ch2-badge,.cf-ch2-phone-icon{transition:none;}
.cf-ch2-badge.is-pop{animation:none;}
button.cf-ch2-hit:hover .cf-ch2-badge.is-done,.cf-ch2-hit.is-hover .cf-ch2-badge.is-done,button.cf-ch2-hit:active .cf-ch2-badge.is-done{transform:none;}
}
`;
pieces/nav/checkout-header-2/specimen.tsx 107 lines
import * as React from 'react';
import { CheckoutHeader2 } from '../checkout-header-2';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'disabled'];
const FLOWS: Record<string, string[]> = {
'1': ['Complete your order'],
'3': ['Your info', 'Payment', 'Confirm'],
'4': ['Your info', 'Payment', 'Your upgrade', 'Confirm'],
};
const LENGTHS = [
{ key: '1', label: 'One step' },
{ key: '3', label: 'Three steps' },
{ key: '4', label: 'Four steps' },
];
type SpecimenState = 'default' | 'hover' | 'disabled';
export default function CheckoutHeader2Specimen({ state = 'default' }: { state?: SpecimenState }) {
const sample = defaults.sample;
const [flow, setFlow] = React.useState('3');
const [current, setCurrent] = React.useState(1);
const steps = FLOWS[flow];
const last = steps.length - 1;
const chooseFlow = (key: string) => {
setFlow(key);
setCurrent((c) => Math.min(c, FLOWS[key].length - 1));
};
return (
<div className='cf-ch2-demo'>
<style>{DEMO_CSS}</style>
<CheckoutHeader2
steps={steps}
current={current}
onStepClick={setCurrent}
logoImage={slot('logo', '') || undefined}
brandName={sample.name}
phone='(555) 123-4567'
guaranteeLine={`Every order is covered by our ${sample.guarantee}.`}
state={state}
disabled={state === 'disabled'}
/>
<div className='cf-ch2-demo-controls'>
<button
type='button'
className='cf-ch2-demo-btn is-secondary'
onClick={() => setCurrent((c) => Math.max(c - 1, 0))}
disabled={current === 0}
>
Back
</button>
<button
type='button'
className='cf-ch2-demo-btn is-primary'
onClick={() => setCurrent((c) => Math.min(c + 1, last))}
disabled={current >= last}
>
{current < last ? `Continue to ${steps[current + 1]}` : 'Continue'}
</button>
</div>
<div className='cf-ch2-demo-lengths' role='group' aria-label='Checkout length'>
{LENGTHS.map((item) => (
<button
type='button'
key={item.key}
className='cf-ch2-demo-chip'
aria-pressed={flow === item.key}
onClick={() => chooseFlow(item.key)}
>
{item.label}
</button>
))}
</div>
</div>
);
}
// Demo controls reset with all:unset so they inherit the host's theme face; the specimen sets no font of its own.
const DEMO_CSS = `
.cf-ch2-demo{width:100%;max-width:1120px;margin:0 auto;}
.cf-ch2-demo-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:24px;}
.cf-ch2-demo-btn{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;text-align:center;min-height:56px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1.125rem;line-height:1.15;white-space:nowrap;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease;}
.cf-ch2-demo-btn.is-primary{background:linear-gradient(oklch(from var(--button-bg,var(--cta,#dc2626)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2,#b91c1c)) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink,#fff));text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta,#dc2626)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta,#dc2626)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3),0 8px 16px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .45));}
.cf-ch2-demo-btn.is-primary:hover:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta,#dc2626)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2,#b91c1c)) calc(l - .07) c h));}
.cf-ch2-demo-btn.is-primary:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .35),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta,#dc2626)) calc(l - .16) c h);}
.cf-ch2-demo-btn.is-secondary{background:var(--button-2-bg,var(--secondary,oklch(0.93 0.015 263)));color:var(--button-2-ink,var(--secondary-ink,var(--ink,#101828)));border:1px solid var(--button-2-border,transparent);box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / .25)));}
.cf-ch2-demo-btn.is-secondary:hover:not(:disabled){background:oklch(from var(--button-2-bg,var(--secondary,oklch(0.93 0.015 263))) calc(l - .04) c h);}
.cf-ch2-demo-btn.is-secondary:active:not(:disabled){transform:translateY(1px);}
.cf-ch2-demo-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent,#2563eb)) l c h / .55);outline-offset:3px;}
.cf-ch2-demo-btn:disabled{cursor:not-allowed;background:var(--secondary,oklch(0.93 0.015 263));color:color-mix(in oklch,var(--secondary-ink,var(--ink,#101828)) 72%,var(--secondary,oklch(0.93 0.015 263)));box-shadow:none;text-shadow:none;}
.cf-ch2-demo-lengths{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:16px;}
.cf-ch2-demo-chip{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;text-align:center;min-height:32px;padding:4px 14px;border:0;border-radius:var(--button-radius,999px);font-size:.875rem;font-weight:800;line-height:1.2;cursor:pointer;background:color-mix(in oklch,var(--ink,#101828) 6%,var(--surface,var(--card,#fff)));color:var(--ink,#101828);transition:background .16s ease;}
.cf-ch2-demo-chip:hover{background:color-mix(in oklch,var(--ink,#101828) 10%,var(--surface,var(--card,#fff)));}
.cf-ch2-demo-chip[aria-pressed='true']{background:color-mix(in oklch,var(--accent,#2563eb) 12%,var(--surface,var(--card,#fff)));color:var(--ink,#101828);box-shadow:inset 0 0 0 1px oklch(from var(--accent,#2563eb) l c h / .5);}
.cf-ch2-demo-chip:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent,#2563eb)) l c h / .55);outline-offset:2px;}
@media (max-width: 560px){
.cf-ch2-demo-controls{flex-direction:column-reverse;align-items:stretch;gap:10px;margin-top:20px;}
.cf-ch2-demo-btn{width:100%;white-space:normal;text-wrap:balance;}
.cf-ch2-demo-btn.is-secondary{min-height:48px;}
}
@media (prefers-reduced-motion: reduce){.cf-ch2-demo-btn,.cf-ch2-demo-chip{transition:none;}}
`;
| Name | Type | Details |
|---|---|---|
steps OptionalCheckoutHeader2 |
string[] |
|
current OptionalCheckoutHeader2 |
number |
|
onStepClick OptionalCheckoutHeader2 |
(index: number) => void |
|
logoImage OptionalCheckoutHeader2 |
string |
|
logoAlt OptionalCheckoutHeader2 |
string |
|
brandName OptionalCheckoutHeader2 |
string |
|
phone OptionalCheckoutHeader2 |
string |
|
phoneLabel OptionalCheckoutHeader2 |
string |
|
callLabel OptionalCheckoutHeader2 |
string |
|
secureLabel OptionalCheckoutHeader2 |
string |
|
secureLabelShort OptionalCheckoutHeader2 |
string |
|
guaranteeLine OptionalCheckoutHeader2 |
string |
|
deadlineLine OptionalCheckoutHeader2 |
string |
|
progressLabel OptionalCheckoutHeader2 |
string |
|
stepCountLabel OptionalCheckoutHeader2 |
string |
|
completedLabel OptionalCheckoutHeader2 |
string |
|
backLabel OptionalCheckoutHeader2 |
string |
|
disabled OptionalCheckoutHeader2 |
boolean |
|
sticky OptionalCheckoutHeader2 |
boolean |
|
state OptionalCheckoutHeader2 |
'default' | 'hover' | 'disabled' |
|
className OptionalCheckoutHeader2 |
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-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-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.
logo- The brand’s logo mark.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB