Method Bar 1
Method bar: one proportional bar shows the whole method at a glance, so it feels simple and complete.
Use it in a prompt
Use content/method-bar 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/content/method-bar.tsx. - Import it and pass your copy and images (Props tab):
import { MethodBar } from "@/components/funneldna/content/method-bar"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/method-bar/component.tsx 680 lines
// layout: photo-overlap-card
// Method bar: one proportional bar shows the whole method at a glance, so it feels simple and complete.
// A letter-voiced close with the price and a two-line button then sends the reader to the one action.
import * as React from 'react';
import { ShieldCheck } from 'lucide-react';
/** Theme colour for one bar part; every value resolves to a token recipe (the neutral value is a quiet ink tint). */
export type MethodBarTone = 'accent' | 'amber' | 'ink' | 'accent-soft' | 'grey' | 'cta';
export type MethodBarPart = {
name: string;
/** Duration or weight shown beside the name (“90 minutes”, “One window”). */
meta?: string;
/** One-line description under the name. */
note?: string;
/** Relative width of this part in the bar (default 1). */
weight?: number;
/** Theme colour for this part; by default the bar steps the accent from light to deep, so it reads as progress. */
tone?: MethodBarTone;
};
export type MethodBarLetter = {
/** Opening line of the note (“Friend,”). */
salutation?: string;
/** Short paragraphs in the owner's voice. */
body: React.ReactNode[];
/** Sign-off line above the name (“Talk soon,”). */
closing?: string;
name?: string;
/** Line under the name (title, product). */
role?: string;
};
export type MethodBarProps = {
headline?: React.ReactNode;
/** Phrase inside a string headline that gets the marker stroke. */
emphasis?: string;
/** Supporting line under the headline. */
lead?: React.ReactNode;
/** 2 to 5 parts, in order (extra parts are ignored). */
parts?: MethodBarPart[];
/** Accessible description of the bar; built from the parts when omitted. */
barLabel?: string;
/** Opening words of the generated bar description. */
barLabelPrefix?: string;
/** Optional labels under the start and end of the bar. */
scaleStart?: string;
scaleEnd?: string;
/** Optional dear-friend note shown beside the action. */
letter?: MethodBarLetter;
/** Small line above the price. */
priceLabel?: string;
/** Regular price, shown slashed; only with price. */
regularPrice?: string;
/** Today's price; the price row is hidden without it. */
price?: string;
/** Screen-reader words before the slashed price. */
regularPriceLabel?: string;
/** Screen-reader words before today's price. */
todayPriceLabel?: string;
/** Main button text. */
label?: string;
/** Second, smaller line inside the button. */
sublabel?: string;
/** Reassurance line under the button (guarantee, privacy). */
note?: React.ReactNode;
/** Navigation destination; the button renders as a link when set and not disabled. */
href?: string;
/** Called on every button click. */
onAction?: () => void;
disabled?: boolean;
/** Forced visual state for the specimen; hover and active style the button, disabled disables it. */
state?: 'default' | 'hover' | 'active' | 'disabled';
/** Slot “scene”: full-bleed photo the card overlaps. */
sceneImage?: string;
sceneAlt?: string;
className?: string;
};
export function MethodBar(props: MethodBarProps) {
const {
headline = 'Three steps. That’s the whole system.',
emphasis = 'the whole system',
lead = 'Each step has one job, so you always know exactly what to do next.',
parts = DEFAULT_PARTS,
barLabel,
barLabelPrefix = 'The method in order:',
scaleStart = '',
scaleEnd = '',
letter,
priceLabel = '',
regularPrice = '',
price = '',
regularPriceLabel = 'Regular price',
todayPriceLabel = 'Today',
label = 'Show Me The Step-By-Step Plan',
sublabel = 'Instant access',
note = '',
href,
onAction,
disabled = false,
state = 'default',
sceneImage,
sceneAlt = '',
className,
} = props;
const uid = React.useId();
const headingId = `cf-mb-${uid}`;
const [hot, setHot] = React.useState<number | null>(null);
const list = parts.slice(0, 5);
const isDisabled = disabled || state === 'disabled';
const ariaBar =
barLabel ?? `${barLabelPrefix} ${list.map((p) => (p.meta ? `${p.name} (${p.meta})` : p.name)).join(', ')}.`;
const enter = (i: number) => () => setHot(i);
const leave = () => setHot(null);
const rootClass = ['cf-method-bar', sceneImage ? '' : 'cf-method-bar--plain', className ?? '']
.filter(Boolean)
.join(' ');
const btnClass = ['cf-method-bar__btn', state === 'hover' ? 'is-hover' : '', state === 'active' ? 'is-active' : '']
.filter(Boolean)
.join(' ');
const btnInner = (
<>
<span className='cf-method-bar__btn-label'>{label}</span>
{sublabel ? <span className='cf-method-bar__btn-sub'>{sublabel}</span> : null}
</>
);
const button =
href && !isDisabled ? (
<a className={btnClass} href={href} onClick={() => onAction?.()}>
{btnInner}
</a>
) : (
<button type='button' className={btnClass} disabled={isDisabled} onClick={() => onAction?.()}>
{btnInner}
</button>
);
return (
<section className={rootClass} aria-labelledby={headingId}>
<style>{CSS}</style>
{sceneImage ? (
<div className='cf-method-bar__scene'>
<img src={sceneImage} alt={sceneAlt} width={1536} height={1024} loading='lazy' decoding='async' />
</div>
) : null}
<div className='cf-method-bar__wrap'>
<div className='cf-method-bar__card'>
<header className='cf-method-bar__head'>
<h2 className='cf-method-bar__title' id={headingId}>
{withMarker(headline, emphasis)}
</h2>
{lead ? <p className='cf-method-bar__lead'>{lead}</p> : null}
</header>
<div className='cf-method-bar__bar'>
<div
className='cf-method-bar__track'
role='img'
aria-label={ariaBar}
data-has-hot={hot !== null ? '' : undefined}
>
{list.map((p, i) => (
<span
key={i}
className='cf-method-bar__seg'
data-hot={hot === i ? '' : undefined}
style={partVars(p, i, list.length)}
onMouseEnter={enter(i)}
onMouseLeave={leave}
>
<span className='cf-method-bar__tag' aria-hidden='true'>
<span className='cf-method-bar__num'>{i + 1}</span>
<span className='cf-method-bar__tag-name'>{p.name}</span>
</span>
</span>
))}
</div>
{scaleStart || scaleEnd ? (
<div className='cf-method-bar__scale' aria-hidden='true'>
<span>{scaleStart}</span>
<span>{scaleEnd}</span>
</div>
) : null}
</div>
<ol className='cf-method-bar__legend'>
{list.map((p, i) => (
<li
key={i}
className='cf-method-bar__item'
data-hot={hot === i ? '' : undefined}
style={partVars(p, i, list.length)}
onMouseEnter={enter(i)}
onMouseLeave={leave}
>
<span className='cf-method-bar__key' aria-hidden='true'>
<span className='cf-method-bar__num'>{i + 1}</span>
</span>
<div className='cf-method-bar__text'>
<div className='cf-method-bar__line'>
<h3 className='cf-method-bar__name'>{p.name}</h3>
{p.meta ? <p className='cf-method-bar__meta'>{p.meta}</p> : null}
</div>
{p.note ? <p className='cf-method-bar__note'>{p.note}</p> : null}
</div>
</li>
))}
</ol>
<div className={letter ? 'cf-method-bar__close' : 'cf-method-bar__close is-solo'}>
{letter ? (
<div className='cf-method-bar__letter'>
{letter.salutation ? <p className='cf-method-bar__salute'>{letter.salutation}</p> : null}
{letter.body.map((para, i) => (
<p key={i}>{para}</p>
))}
{letter.closing ? <p className='cf-method-bar__closing'>{letter.closing}</p> : null}
{letter.name ? <p className='cf-method-bar__sign'>{letter.name}</p> : null}
{letter.role ? <p className='cf-method-bar__role'>{letter.role}</p> : null}
</div>
) : null}
<div className='cf-method-bar__action'>
{price ? (
<div className='cf-method-bar__offer'>
{priceLabel ? <p className='cf-method-bar__price-label'>{priceLabel}</p> : null}
<p className='cf-method-bar__price'>
{regularPrice ? (
<span className='cf-method-bar__was'>
<span className='cf-method-bar__sr'>{regularPriceLabel} </span>
{regularPrice}
</span>
) : null}
<span className='cf-method-bar__now'>
<span className='cf-method-bar__sr'>{todayPriceLabel} </span>
{price}
</span>
</p>
</div>
) : null}
{button}
{note ? (
<p className='cf-method-bar__fine'>
<ShieldCheck aria-hidden='true' strokeWidth={2.25} />
{note}
</p>
) : null}
</div>
</div>
</div>
</div>
</section>
);
}
export default MethodBar;
/** Approved default copy for the three parts. */
const DEFAULT_PARTS: MethodBarPart[] = [
{ name: 'Set it up', meta: 'First', note: 'Put the one foundation in place that everything else needs.', weight: 2 },
{ name: 'Do the work', meta: 'Next', note: 'Follow the core steps in order, one at a time.', weight: 3 },
{ name: 'Check and go', meta: 'Last', note: 'Review it, fix what is missing and put it live.', weight: 1 },
];
/** Quiet neutral ink tint: the neutral tone's recipe and the fallback for any tone without its own recipe. */
const NEUTRAL_TONE = 'color-mix(in oklch, var(--ink, #101828) 28%, var(--card, #ffffff))';
/** Token recipe per chromatic tone; the neutral tone (and any unknown value) resolves to NEUTRAL_TONE. */
const TONES: Partial<Record<MethodBarTone, string>> = {
'accent': 'var(--accent-fill, var(--accent, #2563eb))',
'amber': 'oklch(from var(--warning, #b7791f) 0.76 max(c, 0.15) h)',
'ink': 'var(--ink, #101828)',
'accent-soft': 'oklch(from var(--accent-fill, var(--accent, #2563eb)) clamp(0.3, calc(l + 0.14), 0.95) calc(c * 0.7) h)',
'cta': 'var(--cta, #d92d20)',
};
/** One hue, stepped from light (start) to deep (finish): the bar reads as progress under any theme. */
function rampTone(i: number, n: number) {
const off = n > 1 ? 0.14 - (0.3 * i) / (n - 1) : 0;
const sign = off < 0 ? '-' : '+';
return `oklch(from var(--accent-fill, var(--accent, #2563eb)) clamp(0.3, calc(l ${sign} ${Math.abs(off).toFixed(3)}), 0.95) c h)`;
}
function partVars(p: MethodBarPart, i: number, n: number): React.CSSProperties {
const weight = Math.max(0.2, Number(p.weight) || 1);
return {
'--seg': p.tone ? TONES[p.tone] ?? NEUTRAL_TONE : rampTone(i, n),
'--w': weight,
'--i': i,
} as React.CSSProperties;
}
function withMarker(text: React.ReactNode, phrase: string) {
if (typeof text !== 'string' || !phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className='cf-method-bar__mark'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
const CSS = `
.cf-method-bar{
--mb-well: color-mix(in oklch, var(--ink, #101828) 4%, var(--card, #ffffff));
--mb-shadow: var(--shadow, oklch(0.22 0.03 260));
position: relative;
isolation: isolate;
overflow: hidden;
background: color-mix(in oklch, var(--ink, #101828) 4%, var(--surface, #ffffff));
color: var(--ink, #101828);
font-family: var(--font-body, system-ui, sans-serif);
padding: 0 0 clamp(3rem, 7vw, 6rem);
}
.cf-method-bar *, .cf-method-bar *::before, .cf-method-bar *::after{ box-sizing: border-box; }
.cf-method-bar--plain{ padding-top: clamp(3rem, 7vw, 6rem); }
.cf-method-bar__scene{ height: clamp(15rem, 36vw, 30rem); overflow: hidden; }
/* Photo fade: the mask reads only alpha, so any opaque token works as the solid stop. */
.cf-method-bar__scene img{
display: block; width: 100%; height: 100%;
object-fit: cover; object-position: center 40%;
-webkit-mask-image: linear-gradient(to bottom, var(--ink, #101828) 58%, transparent 100%);
mask-image: linear-gradient(to bottom, var(--ink, #101828) 58%, transparent 100%);
}
.cf-method-bar__wrap{
position: relative; z-index: 1;
max-width: 70rem;
margin: calc(-1 * clamp(6rem, 13vw, 12rem)) auto 0;
padding-inline: clamp(1rem, 3vw, 2rem);
}
.cf-method-bar--plain .cf-method-bar__wrap{ margin-top: 0; }
.cf-method-bar__card{
background: var(--card, #ffffff);
color: var(--ink, #101828);
border: 1px solid var(--card-border, color-mix(in oklch, var(--ink, #101828) 12%, transparent));
border-radius: var(--card-radius, calc(var(--radius, 12px) + 10px));
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 260 / 0.22), 0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)));
padding: clamp(1.5rem, 4.5vw, 3.5rem);
}
.cf-method-bar__head{ text-align: center; max-width: 48rem; margin-inline: auto; }
.cf-method-bar__title{
margin: 0;
font-family: var(--font-display, var(--font-body, sans-serif));
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
letter-spacing: var(--display-tracking, -0.02em);
font-size: clamp(1.875rem, 4.2vw, 3.25rem);
line-height: 1.06;
text-wrap: balance;
color: var(--ink, #101828);
}
.cf-method-bar__mark{
background-image: linear-gradient(177deg, transparent 0 54%, oklch(from var(--marker, #fae37c) l c h / 0.9) 54% 92%, transparent 92%);
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
padding-inline: 0.06em;
border-radius: 0.1em;
}
.cf-method-bar__lead{
margin: clamp(0.875rem, 1.4vw, 1rem) auto 0;
max-width: 40rem;
font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
font-weight: 500;
line-height: 1.5;
color: var(--muted, #475467);
text-wrap: pretty;
}
.cf-method-bar__bar{ margin-top: clamp(2rem, 4.5vw, 3rem); }
.cf-method-bar__track{
display: flex;
gap: clamp(0.375rem, 0.8vw, 0.625rem);
height: clamp(3.5rem, 6vw, 4.5rem);
}
.cf-method-bar__seg, .cf-method-bar__key{
background: linear-gradient(oklch(from var(--seg) calc(l + 0.05) c h), oklch(from var(--seg) calc(l - 0.05) c h));
box-shadow:
inset 0 1px 0 oklch(from var(--seg) calc(l + 0.16) c h / 0.7),
inset 0 -3px 0 oklch(from var(--seg) calc(l - 0.15) c h),
inset 0 0 0 1px oklch(from var(--ink, #101828) l c h / 0.08),
var(--shadow-sm, 0 1px 2px oklch(0.22 0.03 260 / 0.25));
}
.cf-method-bar__seg{
flex: var(--w, 1) 1 0%;
display: flex;
align-items: center;
min-width: 0;
padding-inline: 0.625rem;
border-radius: calc(var(--radius, 12px) * 0.75 + 2px);
}
.cf-method-bar__track[data-has-hot] .cf-method-bar__seg:not([data-hot]){ opacity: 0.5; }
.cf-method-bar__seg[data-hot]{
transform: translateY(-3px);
box-shadow:
inset 0 1px 0 oklch(from var(--seg) calc(l + 0.16) c h / 0.7),
inset 0 -3px 0 oklch(from var(--seg) calc(l - 0.15) c h),
inset 0 0 0 1px oklch(from var(--ink, #101828) l c h / 0.08),
var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2));
}
.cf-method-bar__num{
flex: none;
display: grid; place-items: center;
width: 1.75rem; height: 1.75rem;
border-radius: 999px;
background: var(--card, #ffffff);
color: var(--ink, #101828);
font-family: var(--font-display, var(--font-body, sans-serif));
font-weight: var(--display-weight, 800);
font-size: 0.875rem;
line-height: 1;
box-shadow: 0 1px 2px oklch(from var(--mb-shadow) l c h / 0.3);
}
.cf-method-bar__tag{
display: inline-flex; align-items: center; gap: 0.5rem;
min-width: 0; max-width: 100%;
padding: 0.1875rem 0.875rem 0.1875rem 0.1875rem;
border-radius: 999px;
background: var(--card, #ffffff);
color: var(--ink, #101828);
box-shadow:
inset 0 0 0 1px oklch(from var(--ink, #101828) l c h / 0.08),
0 1px 2px oklch(from var(--mb-shadow) l c h / 0.3);
}
.cf-method-bar__tag .cf-method-bar__num{
background: var(--ink, #101828);
color: var(--card, #ffffff);
box-shadow: none;
}
.cf-method-bar__tag-name{
min-width: 0;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
font-family: var(--font-display, var(--font-body, sans-serif));
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
font-size: 0.9375rem;
line-height: 1.2;
}
.cf-method-bar__scale{
display: flex; justify-content: space-between; gap: 1rem;
margin-top: 0.75rem;
font-size: 0.875rem; font-weight: 600;
color: var(--muted, #475467);
}
.cf-method-bar__scale span:last-child{ text-align: right; }
.cf-method-bar__legend{
list-style: none;
margin: clamp(1.25rem, 3vw, 2rem) 0 0;
padding: 0;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
gap: 0.5rem clamp(0.5rem, 1.5vw, 1rem);
}
.cf-method-bar__item{
display: grid;
align-content: start;
gap: 0.75rem;
padding: 0.875rem 1rem 1rem;
border-radius: calc(var(--radius, 12px) + 2px);
}
.cf-method-bar__item[data-hot]{ background: var(--mb-well); }
.cf-method-bar__key{
display: flex; align-items: center;
width: 3.25rem; height: 2.25rem;
padding-inline: 0.375rem;
border-radius: calc(var(--radius, 12px) * 0.5 + 2px);
}
.cf-method-bar__key .cf-method-bar__num{ width: 1.5rem; height: 1.5rem; }
.cf-method-bar__text{ min-width: 0; }
.cf-method-bar__line{ display: grid; gap: 0.1875rem; }
.cf-method-bar__name{
margin: 0;
font-family: var(--font-display, var(--font-body, sans-serif));
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
font-size: clamp(1.125rem, 1.6vw, 1.25rem);
line-height: 1.2;
color: var(--ink, #101828);
text-wrap: balance;
}
.cf-method-bar__meta{ margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--muted, #475467); }
.cf-method-bar__note{
margin: 0.375rem 0 0;
font-size: 1rem; line-height: 1.5;
color: var(--muted, #475467);
text-wrap: pretty;
}
.cf-method-bar__close{
margin-top: clamp(1.5rem, 3.5vw, 2.5rem);
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(16rem, 21rem);
gap: clamp(1.25rem, 3.5vw, 3rem);
align-items: start;
padding: clamp(1.25rem, 3.2vw, 2.25rem);
border-radius: calc(var(--radius, 12px) + 6px);
background: var(--mb-well);
}
.cf-method-bar__close.is-solo{
grid-template-columns: minmax(0, 24rem);
justify-content: center;
background: transparent;
padding: 0.5rem 0 0;
}
.cf-method-bar__letter{
max-width: 38rem;
font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
line-height: 1.6;
color: var(--ink, #101828);
}
.cf-method-bar__letter p{ margin: 0 0 0.75rem; text-wrap: pretty; }
.cf-method-bar__letter .cf-method-bar__salute{ font-family: var(--font-display, var(--font-body, sans-serif)); font-weight: 700; }
.cf-method-bar__letter .cf-method-bar__closing{ margin: 1rem 0 0.125rem; }
.cf-method-bar__letter .cf-method-bar__sign{
margin: 0;
font-family: var(--font-display, var(--font-body, sans-serif));
font-weight: var(--display-weight, 800);
font-size: 1.125rem;
line-height: 1.3;
}
.cf-method-bar__letter .cf-method-bar__role{ margin: 0.125rem 0 0; font-size: 0.875rem; font-weight: 500; line-height: 1.4; color: var(--muted, #475467); }
.cf-method-bar__action{ display: grid; justify-items: center; gap: 0.875rem; text-align: center; min-width: 0; }
.cf-method-bar__offer{ display: grid; justify-items: center; gap: 0.375rem; }
.cf-method-bar__price-label{ margin: 0; font-size: 0.9375rem; font-weight: 600; color: var(--muted, #475467); text-wrap: balance; }
.cf-method-bar__price{
margin: 0;
display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
gap: 0.25rem 1rem;
line-height: 1.1;
}
.cf-method-bar__was{
position: relative; display: inline-block;
padding-inline: 0.15em;
font-family: var(--font-display, var(--font-body, sans-serif));
font-weight: 700;
font-size: clamp(1.375rem, 2.2vw, 1.625rem);
color: var(--muted, #475467);
}
.cf-method-bar__was::after{
content: '';
position: absolute; left: -0.1em; right: -0.1em; top: 52%;
height: 0.14em; min-height: 3px;
border-radius: 999px;
background: var(--danger, #c0362c);
transform: rotate(-16deg);
}
.cf-method-bar__now{
display: inline-block;
font-family: var(--font-display, var(--font-body, sans-serif));
font-weight: var(--display-weight, 800);
font-size: clamp(2.5rem, 4.4vw, 3.25rem);
letter-spacing: -0.02em;
color: var(--ink, #101828);
}
.cf-method-bar__sr{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cf-method-bar__btn{
--mb-bg: var(--button-bg, var(--cta, #d92d20));
--mb-bg2: var(--button-bg-2, var(--cta-2, var(--cta, #b42318)));
width: 100%;
min-height: 4.25rem;
display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
gap: 0.25rem;
padding: 0.875rem 1.5rem;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(oklch(from var(--mb-bg) calc(l + 0.04) c h), oklch(from var(--mb-bg2) l c h));
color: var(--button-ink, var(--cta-ink, #ffffff));
font-family: var(--button-font, var(--font-display, var(--font-body, sans-serif)));
text-transform: var(--button-case, none);
text-shadow: var(--button-text-shadow, none);
text-decoration: none;
text-align: center;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
box-shadow: var(--button-shadow,
inset 0 1px 0 oklch(from var(--mb-bg) calc(l + 0.14) c h / 0.6),
inset 0 -3px 0 oklch(from var(--mb-bg) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--mb-shadow) l c h / 0.3),
0 6px 12px -4px oklch(from var(--mb-shadow) l c h / 0.4));
}
.cf-method-bar__btn:not(:disabled):hover, .cf-method-bar__btn.is-hover:not(:disabled){
background: linear-gradient(oklch(from var(--mb-bg) calc(l - 0.02) c h), oklch(from var(--mb-bg2) calc(l - 0.06) c h));
transform: translateY(-2px);
box-shadow: var(--button-shadow,
inset 0 1px 0 oklch(from var(--mb-bg) calc(l + 0.12) c h / 0.6),
inset 0 -3px 0 oklch(from var(--mb-bg) calc(l - 0.2) c h),
0 2px 3px oklch(from var(--mb-shadow) l c h / 0.32),
0 10px 18px -6px oklch(from var(--mb-shadow) l c h / 0.45));
}
.cf-method-bar__btn:not(:disabled):active, .cf-method-bar__btn.is-active:not(:disabled){
background: linear-gradient(oklch(from var(--mb-bg) calc(l - 0.08) c h), oklch(from var(--mb-bg2) calc(l - 0.08) c h));
transform: translateY(1px);
box-shadow:
inset 0 2px 3px oklch(from var(--mb-bg) calc(l - 0.22) c h / 0.5),
0 1px 1px oklch(from var(--mb-shadow) l c h / 0.3);
}
.cf-method-bar__btn:focus-visible{ outline: 3px solid var(--field-focus, var(--accent, #2563eb)); outline-offset: 3px; }
.cf-method-bar__btn:disabled{
background: var(--button-2-bg, var(--secondary, #e9edf3));
color: var(--button-2-ink, var(--secondary-ink, #101828));
text-shadow: none;
cursor: not-allowed;
transform: none;
box-shadow:
inset 0 0 0 1px var(--button-2-border, transparent),
inset 0 -2px 0 oklch(from var(--button-2-bg, var(--secondary, #e9edf3)) calc(l - 0.1) c h);
}
.cf-method-bar__btn-label{
font-weight: var(--button-weight, 800);
font-size: clamp(1.125rem, 2vw, 1.3125rem);
line-height: 1.2;
text-wrap: balance;
}
.cf-method-bar__btn-sub{
font-family: var(--font-body, sans-serif);
font-weight: 500;
font-size: 0.875rem;
line-height: 1.35;
text-transform: none;
text-wrap: pretty;
}
.cf-method-bar__fine{
margin: 0;
font-size: 0.875rem; font-weight: 500; line-height: 1.45;
color: var(--muted, #475467);
text-wrap: pretty;
}
.cf-method-bar__fine svg{
display: inline-block;
vertical-align: -0.15em;
width: 1.05em; height: 1.05em;
margin-inline-end: 0.4em;
color: var(--success, #157f3c);
}
@media (max-width: 760px){
.cf-method-bar__close{ grid-template-columns: minmax(0, 1fr); gap: 1.75rem; padding: 0; background: transparent; }
.cf-method-bar__letter{
max-width: none;
padding: 1.25rem;
border-radius: calc(var(--radius, 12px) + 6px);
background: var(--mb-well);
}
}
@media (max-width: 720px){
.cf-method-bar__tag{ padding: 0.1875rem; }
.cf-method-bar__tag-name{ display: none; }
}
@media (max-width: 640px){
.cf-method-bar__scene{ height: 15rem; }
.cf-method-bar__wrap{ margin-top: -5.5rem; }
.cf-method-bar__card{ padding: 1.5rem 1.25rem; }
.cf-method-bar__track{ height: 3.25rem; }
.cf-method-bar__legend{ grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
.cf-method-bar__item{ grid-template-columns: auto minmax(0, 1fr); gap: 0.875rem; padding: 0.75rem; }
.cf-method-bar__close.is-solo{ padding: 0.5rem 0 0; }
.cf-method-bar__btn{ padding-inline: 1rem; }
.cf-method-bar__btn-label{ font-size: 1.0625rem; }
}
@media (prefers-reduced-motion: no-preference){
.cf-method-bar__card{ animation: cfmb-rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.cf-method-bar__scene img{ animation: cfmb-settle 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.cf-method-bar__seg{
animation: cfmb-grow 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
animation-delay: calc(var(--i, 0) * 90ms + 120ms);
transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
}
.cf-method-bar__tag{
animation: cfmb-pop 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
animation-delay: calc(var(--i, 0) * 90ms + 420ms);
}
.cf-method-bar__item{ transition: background-color 0.2s ease; }
.cf-method-bar__btn{ transition: transform 0.15s ease, box-shadow 0.15s ease; }
}
@keyframes cfmb-rise{ from{ opacity: 0.82; transform: translateY(8px); } }
@keyframes cfmb-settle{ from{ transform: scale(1.05); } }
@keyframes cfmb-grow{ from{ clip-path: inset(0 100% 0 0); } to{ clip-path: inset(0 0 0 0); } }
@keyframes cfmb-pop{ from{ opacity: 0.82; transform: translateY(4px); } }
`;
pieces/content/method-bar/specimen.tsx 45 lines
import __studioImage99c50ab8 from "../assets/9cc36161e99bc238.webp";
import { MethodBar } from '../method-bar';
import { slot } from '../../slots';
import defaults from '../../studio-defaults.json';
export const states = ['default', 'hover', 'active', 'disabled'];
export default function MethodBarSpecimen({ state }: { state?: 'default' | 'hover' | 'active' | 'disabled' }) {
const s = defaults.sample;
const [guide, workbook, checklist] = s.items;
return (
<MethodBar
state={state}
sceneImage={slot('scene', __studioImage99c50ab8)}
sceneAlt='A person at a tidy desk sketching a simple three-step plan beside an open laptop'
headline='One funnel, three steps. That’s the whole plan.'
emphasis='three steps'
lead='Plan it, write it, check it. Each step has its own piece of the kit, so you always know what to do next.'
parts={[
{ name: 'Plan it', meta: guide.name, note: guide.detail, weight: 3 },
{ name: 'Write it', meta: workbook.name, note: workbook.detail, weight: 4 },
{ name: 'Check it', meta: checklist.name, note: checklist.detail, weight: 2 },
]}
scaleStart='Your idea'
scaleEnd='Your live funnel'
letter={{
salutation: 'Friend,',
body: [
'Most first funnels stall because they feel like one giant job with no edges.',
'Split it into three and each piece gets small enough to finish. The kit hands you the right tool for each step, in order.',
],
closing: 'Talk soon,',
name: 'Jordan Reyes',
role: 'Creator of The Funnel Starter Kit',
}}
priceLabel={s.todayLabel}
regularPrice={s.regularPrice}
price={s.price}
label='Send Me The Starter Kit'
sublabel={s.sublabel}
note={s.guarantee}
href='#order'
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalMethodBar |
React.ReactNode |
|
emphasis OptionalMethodBar |
string |
|
lead OptionalMethodBar |
React.ReactNode |
|
parts OptionalMethodBar |
MethodBarPart[] |
|
barLabel OptionalMethodBar |
string |
|
barLabelPrefix OptionalMethodBar |
string |
|
scaleStart OptionalMethodBar |
string |
|
scaleEnd OptionalMethodBar |
string |
|
letter OptionalMethodBar |
MethodBarLetter |
|
priceLabel OptionalMethodBar |
string |
|
regularPrice OptionalMethodBar |
string |
|
price OptionalMethodBar |
string |
|
regularPriceLabel OptionalMethodBar |
string |
|
todayPriceLabel OptionalMethodBar |
string |
|
label OptionalMethodBar |
string |
|
sublabel OptionalMethodBar |
string |
|
note OptionalMethodBar |
React.ReactNode |
|
href OptionalMethodBar |
string |
|
onAction OptionalMethodBar |
() => void |
|
disabled OptionalMethodBar |
boolean |
|
state OptionalMethodBar |
'default' | 'hover' | 'active' | 'disabled' |
|
sceneImage OptionalMethodBar |
string |
|
sceneAlt OptionalMethodBar |
string |
|
className OptionalMethodBar |
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- 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.
scene- A wide atmosphere photo behind or beside the copy.
-
9cc36161e99bc238.webp
image/webp · 77.4 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB