Funding Progress 2
Funding build story: funded milestones run down one path into the pledge stage, where a meter fills to the supplied percentage beside the founding-member action.
Use it in a prompt
Use urgency/funding-progress-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/urgency/funding-progress-2.tsx. - Import it and pass your copy and images (Props tab):
import { FundingProgress2 } from "@/components/funneldna/urgency/funding-progress-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/urgency/funding-progress-2/component.tsx 678 lines
// layout: path-to-action
// Funding build story: funded milestones run down one path into the pledge stage, where a meter fills to the supplied percentage beside the founding-member action.
import * as React from 'react';
import { Check, Lock } from 'lucide-react';
export type FundingMilestone = {
title: string;
/** One line in the founder's voice. */
line: React.ReactNode;
/** What this milestone cost, shown in its funded chip (funded milestones only). */
amount?: string;
/** Photo of the milestone (slot item-n). */
image?: string;
imageAlt?: string;
};
export type FundingProgress2Copy = {
fundedChip: string;
nextChip: string;
percentLabel: string;
raisedLabel: string;
goalLabel: string;
backersLabel: string;
/** Accessible meter name; {next} is replaced with the next milestone title. */
meterLabel: string;
listLabel: string;
};
export type FundingProgress2Props = {
headline?: React.ReactNode;
/** Why it started, in the founder's voice. */
lead?: React.ReactNode;
/** Attribution under the lead (name and role). */
founder?: string;
/** Milestones already funded, oldest first. */
milestones?: FundingMilestone[];
/** What the next pledge builds: the closing stage with the meter and the action. */
next?: FundingMilestone;
/** Funded percentage (0 to 100). The meter only shows when this is supplied. */
percent?: number;
raised?: string;
goal?: string;
backers?: string;
/** Empty-proof variant: hides the meter and every count. */
hideProof?: boolean;
price?: string;
priceSuffix?: string;
priceNote?: string;
reasonsTitle?: string;
reasons?: React.ReactNode[];
label?: string;
reassurance?: string;
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
disabled?: boolean;
state?: 'default' | 'hover' | 'active' | 'disabled';
copy?: Partial<FundingProgress2Copy>;
className?: string;
};
export function FundingProgress2(props: FundingProgress2Props) {
const {
headline = DEFAULT_HEADLINE,
lead = DEFAULT_LEAD,
founder,
milestones = DEFAULT_MILESTONES,
next = DEFAULT_NEXT,
percent,
raised,
goal,
backers,
hideProof = false,
price,
priceSuffix = 'today. That’s it.',
priceNote = 'One founding membership. No subscription, nothing to unlock later.',
reasonsTitle = 'Three reasons to pledge today',
reasons = DEFAULT_REASONS,
label = 'Yes! Make me a founding member',
reassurance = 'Secure pledge, one payment',
href,
onAction,
disabled = false,
state = 'default',
copy,
className,
} = props;
const c: FundingProgress2Copy = { ...DEFAULT_COPY, ...copy };
const headingId = React.useId();
const rootRef = React.useRef<HTMLElement>(null);
const [motion, setMotion] = React.useState(false);
const isDisabled = disabled || state === 'disabled';
const hasPercent = !hideProof && typeof percent === 'number' && Number.isFinite(percent);
const pctValue = hasPercent ? (percent as number) : 0;
const pct = Math.min(100, Math.max(0, pctValue));
const counts: { value: string; label: string }[] = [];
if (!hideProof) {
if (raised) counts.push({ value: raised, label: c.raisedLabel });
if (goal) counts.push({ value: goal, label: c.goalLabel });
if (backers) counts.push({ value: backers, label: c.backersLabel });
}
const showMeter = hasPercent || counts.length > 0;
const valueText = [formatPct(pctValue) + ' ' + c.percentLabel, ...counts.map((item) => item.value + ' ' + item.label)].join(', ');
const nextNumber = milestones.length + 1;
useIsoLayoutEffect(() => {
if (typeof window === 'undefined' || !('IntersectionObserver' in window)) return;
if (window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
setMotion(true);
}, []);
React.useEffect(() => {
const root = rootRef.current;
if (!motion || !root) return;
const mark = (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => {
for (const entry of entries) {
if (entry.isIntersecting) {
entry.target.setAttribute('data-in', 'true');
observer.unobserve(entry.target);
}
}
};
const reveal = new IntersectionObserver(mark, { rootMargin: '0px 0px -8% 0px', threshold: 0.12 });
const meter = new IntersectionObserver(mark, { threshold: 0.6 });
root.querySelectorAll('[data-reveal]').forEach((el) => reveal.observe(el));
root.querySelectorAll('[data-meter]').forEach((el) => meter.observe(el));
return () => {
reveal.disconnect();
meter.disconnect();
};
}, [motion, showMeter, milestones.length]);
const action = href && !isDisabled ? (
<a className='fp2-btn' href={href} onClick={onAction}>
{label}
</a>
) : (
<button className='fp2-btn' type='button' disabled={isDisabled} onClick={onAction}>
{label}
</button>
);
return (
<section
ref={rootRef}
className={'cf-funding-progress-2' + (className ? ' ' + className : '')}
aria-labelledby={headingId}
data-state={state}
data-motion={motion ? 'on' : undefined}
>
<style>{STYLES}</style>
<div className='fp2-wrap'>
<header className='fp2-intro'>
<h2 id={headingId} className='fp2-h2'>{headline}</h2>
{lead ? <p className='fp2-lead'>{lead}</p> : null}
{founder ? <p className='fp2-founder'>{founder}</p> : null}
</header>
<ol className='fp2-list' aria-label={c.listLabel}>
{milestones.map((m, i) => (
<li key={m.title + i} className={'fp2-stop' + (i === milestones.length - 1 ? ' fp2-stop--lead' : '')}>
<div className='fp2-rail' aria-hidden='true'>
<span className='fp2-node fp2-node--done'>
<Check size={24} strokeWidth={3} />
</span>
</div>
<article className={'fp2-body' + (m.image ? ' fp2-body--photo' : '')} data-reveal=''>
{m.image ? (
<img className='fp2-photo' src={m.image} alt={m.imageAlt ?? ''} width={1260} height={540} loading='lazy' decoding='async' />
) : null}
<div className='fp2-head'>
<div>
<div className='fp2-tags'>
<span className='fp2-badge fp2-badge--done' aria-hidden='true'>
<Check size={18} strokeWidth={3} />
</span>
<span className='fp2-chip'>{c.fundedChip}{m.amount ? ' · ' + m.amount : ''}</span>
</div>
<h3 className='fp2-h3'>{m.title}</h3>
</div>
<p className='fp2-line'>{m.line}</p>
</div>
</article>
</li>
))}
<li className='fp2-stop fp2-stop--next'>
<div className='fp2-rail' aria-hidden='true'>
<span className='fp2-node fp2-node--next'>{nextNumber}</span>
</div>
<article className='fp2-stage' data-reveal=''>
{next.image ? (
<img className='fp2-photo' src={next.image} alt={next.imageAlt ?? ''} width={1260} height={540} loading='lazy' decoding='async' />
) : null}
<div className='fp2-head'>
<div>
<div className='fp2-tags'>
<span className='fp2-badge fp2-badge--next' aria-hidden='true'>{nextNumber}</span>
<span className='fp2-chip'>{c.nextChip}</span>
</div>
<h3 className='fp2-h3'>{next.title}</h3>
</div>
<p className='fp2-line'>{next.line}</p>
</div>
{showMeter ? (
<div className='fp2-meter' data-meter=''>
<div className='fp2-meter-top'>
{hasPercent ? (
<p className='fp2-pct'>
<span className='fp2-num'>{formatPct(pctValue)}</span>
<span className='fp2-pct-label'>{c.percentLabel}</span>
</p>
) : null}
{counts.length ? (
<ul className='fp2-counts'>
{counts.map((item) => (
<li key={item.label}>
<strong>{item.value}</strong> {item.label}
</li>
))}
</ul>
) : null}
</div>
{hasPercent ? (
<div
className='fp2-track'
role='progressbar'
aria-label={c.meterLabel.replace('{next}', next.title)}
aria-valuemin={0}
aria-valuemax={100}
aria-valuenow={Math.round(pct)}
aria-valuetext={valueText}
>
<span className='fp2-fill' style={{ '--pct': pct } as React.CSSProperties} />
</div>
) : null}
</div>
) : null}
<div className='fp2-pledge'>
<div className='fp2-offer'>
{price ? (
<p className='fp2-price'>
<strong>{price}</strong>
{priceSuffix ? <span className='fp2-price-suffix'>{priceSuffix}</span> : null}
</p>
) : null}
{price && priceNote ? <p className='fp2-price-note'>{priceNote}</p> : null}
{reasons.length ? <p className='fp2-reasons-title'>{reasonsTitle}</p> : null}
{reasons.length ? (
<ol className='fp2-reasons'>
{reasons.map((reason, i) => (
<li key={i}>
<span className='fp2-n'>{i + 1}.</span>
{reason}
</li>
))}
</ol>
) : null}
</div>
<div className='fp2-action'>
{action}
{reassurance ? (
<p className='fp2-reassure'>
<Lock className='fp2-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
</div>
</div>
</article>
</li>
</ol>
</div>
</section>
);
}
export default FundingProgress2;
const useIsoLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
function formatPct(value: number) {
return (Number.isInteger(value) ? String(value) : String(Number(value.toFixed(1)))) + '%';
}
const DEFAULT_COPY: FundingProgress2Copy = {
fundedChip: 'Funded',
nextChip: 'Your pledge builds this',
percentLabel: 'funded',
raisedLabel: 'raised',
goalLabel: 'goal',
backersLabel: 'founding members',
meterLabel: 'Funding progress toward {next}',
listLabel: 'What every pledge has built',
};
const DEFAULT_HEADLINE = (
<>
From one borrowed stove to <span className='fp2-em'>opening day</span>
</>
);
const DEFAULT_LEAD = '“We started with one borrowed stove and forty plates on a Sunday. Here’s what every pledge has built since, and what yours builds next.”';
const DEFAULT_MILESTONES: FundingMilestone[] = [
{ title: 'The first real oven', line: '“The night it fired up, I stopped borrowing my neighbour’s stove.”' },
{ title: 'The walk-in cooler', line: '“Now the farm donations stay fresh all week, not all afternoon.”' },
];
const DEFAULT_NEXT: FundingMilestone = {
title: 'Opening day',
line: '“The dining room is the last piece. Your pledge is how the doors open.”',
};
const DEFAULT_REASONS: React.ReactNode[] = [
'It goes straight to the dining room, the last thing before opening day.',
'Your name goes on the founders’ wall by the front door.',
'You get a seat at the opening-day dinner.',
];
const STYLES = `
.cf-funding-progress-2 {
--fp2-gutter: clamp(16px, 5vw, 48px);
--fp2-gap: clamp(48px, 6vw, 72px);
--fp2-ease: cubic-bezier(.2, .7, .2, 1);
--fp2-shadow: var(--shadow, oklch(0.22 0.03 260));
--fp2-soft: color-mix(in oklch, var(--band-ink) 84%, var(--band));
--fp2-rail: color-mix(in oklch, var(--band-ink) 34%, var(--band));
--fp2-em: color-mix(in oklab, var(--accent-fill, var(--accent)) 52%, var(--band-ink));
position: relative;
width: 100%;
overflow-x: clip;
background: var(--band);
color: var(--band-ink);
font-family: var(--font-body);
padding: clamp(56px, 8vw, 112px) var(--fp2-gutter) clamp(64px, 8.5vw, 120px);
}
.cf-funding-progress-2 *, .cf-funding-progress-2 *::before, .cf-funding-progress-2 *::after { box-sizing: border-box; }
.cf-funding-progress-2 .fp2-wrap { max-width: 1120px; margin: 0 auto; }
.cf-funding-progress-2 .fp2-intro { max-width: 52rem; margin: 0 0 clamp(40px, 5vw, 64px); }
.cf-funding-progress-2 .fp2-h2 {
margin: 0;
font-family: var(--font-display);
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;
color: var(--band-ink);
text-wrap: balance;
}
.cf-funding-progress-2 .fp2-em { color: var(--fp2-em); }
.cf-funding-progress-2 .fp2-lead {
margin: 16px 0 0;
max-width: 60ch;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--fp2-soft);
text-wrap: pretty;
}
.cf-funding-progress-2 .fp2-founder { margin: 12px 0 0; font-size: 0.9375rem; line-height: 1.4; font-weight: 600; color: var(--fp2-soft); }
.cf-funding-progress-2 .fp2-list { list-style: none; margin: 0; padding: 0; }
.cf-funding-progress-2 .fp2-stop {
display: grid;
grid-template-columns: 48px minmax(0, 1fr);
column-gap: clamp(24px, 3vw, 40px);
padding-bottom: var(--fp2-gap);
}
.cf-funding-progress-2 .fp2-stop--next { padding-bottom: 0; }
.cf-funding-progress-2 .fp2-rail { position: relative; }
.cf-funding-progress-2 .fp2-rail::after {
content: '';
position: absolute;
left: 50%;
top: 60px;
bottom: calc(12px - var(--fp2-gap));
width: 3px;
margin-left: -1.5px;
border-radius: 3px;
background: var(--fp2-rail);
}
.cf-funding-progress-2 .fp2-stop--lead .fp2-rail::after { background: var(--accent-fill, var(--accent)); }
.cf-funding-progress-2 .fp2-stop--next .fp2-rail::after { content: none; }
.cf-funding-progress-2 .fp2-node {
position: relative;
display: grid;
place-items: center;
width: 48px;
height: 48px;
border-radius: 999px;
box-shadow: var(--shadow-sm, 0 1px 3px oklch(0.22 0.03 260 / .3));
}
.cf-funding-progress-2 .fp2-node--done, .cf-funding-progress-2 .fp2-badge--done { background: var(--success); color: var(--success-ink, #fff); }
.cf-funding-progress-2 .fp2-node--next, .cf-funding-progress-2 .fp2-badge--next { background: var(--accent-fill, var(--accent)); color: var(--accent-fill-ink, var(--card)); }
.cf-funding-progress-2 .fp2-node--next {
font-family: var(--font-display);
font-weight: 800;
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1;
font-variant-numeric: tabular-nums;
}
.cf-funding-progress-2 .fp2-badge {
display: none;
place-items: center;
flex: none;
width: 32px;
height: 32px;
border-radius: 999px;
font-family: var(--font-display);
font-weight: 800;
font-size: 0.875rem;
line-height: 1;
font-variant-numeric: tabular-nums;
}
.cf-funding-progress-2 .fp2-body { min-width: 0; }
.cf-funding-progress-2 .fp2-photo {
display: block;
width: 100%;
height: auto;
aspect-ratio: 21 / 9;
object-fit: cover;
object-position: 50% 50%;
border-radius: 12px;
background: oklch(from var(--band-ink) l c h / .08);
}
.cf-funding-progress-2 .fp2-head {
display: grid;
grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
gap: 12px 40px;
align-items: start;
}
.cf-funding-progress-2 .fp2-photo + .fp2-head { margin-top: 24px; }
.cf-funding-progress-2 .fp2-body--photo {
display: grid;
grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
gap: 24px clamp(24px, 3.5vw, 48px);
align-items: start;
}
.cf-funding-progress-2 .fp2-body--photo .fp2-photo { aspect-ratio: 3 / 2; }
.cf-funding-progress-2 .fp2-body--photo .fp2-head { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 4px; }
.cf-funding-progress-2 .fp2-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cf-funding-progress-2 .fp2-chip {
display: inline-flex;
align-items: center;
min-height: 28px;
padding: 4px 12px;
border-radius: 999px;
font-size: 0.875rem;
line-height: 1.2;
font-weight: 800;
font-variant-numeric: tabular-nums;
background: oklch(from var(--band-ink) l c h / .12);
color: var(--band-ink);
}
.cf-funding-progress-2 .fp2-h3 {
margin: 12px 0 0;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: -0.01em;
text-transform: var(--display-case, none);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
color: var(--band-ink);
text-wrap: balance;
}
.cf-funding-progress-2 .fp2-line {
margin: 0;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
color: var(--fp2-soft);
text-wrap: pretty;
}
.cf-funding-progress-2 .fp2-stage {
min-width: 0;
background: var(--card);
color: var(--ink);
border: 1px solid var(--card-border, oklch(from var(--ink) l c h / .12));
border-radius: var(--card-radius, var(--radius, 14px));
box-shadow: var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(0.22 0.03 260 / .22), 0 12px 24px -8px oklch(0.22 0.03 260 / .32)));
padding: clamp(20px, 3vw, 32px);
}
.cf-funding-progress-2 .fp2-stage .fp2-photo { background: oklch(from var(--ink) l c h / .06); }
.cf-funding-progress-2 .fp2-stage .fp2-chip { background: var(--accent-fill, var(--accent)); color: var(--accent-fill-ink, var(--card)); }
.cf-funding-progress-2 .fp2-stage .fp2-h3, .cf-funding-progress-2 .fp2-stage .fp2-line { color: var(--ink); }
.cf-funding-progress-2 .fp2-meter { margin-top: clamp(28px, 3.5vw, 40px); }
.cf-funding-progress-2 .fp2-meter-top {
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-between;
gap: 8px 24px;
}
.cf-funding-progress-2 .fp2-pct { margin: 0; display: flex; align-items: baseline; gap: 12px; }
.cf-funding-progress-2 .fp2-num {
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: -0.03em;
font-size: clamp(2.5rem, 4.2vw, 3.75rem);
line-height: 1;
font-variant-numeric: tabular-nums;
color: var(--ink);
}
.cf-funding-progress-2 .fp2-pct-label { font-size: clamp(1.0625rem, 1.25vw, 1.125rem); font-weight: 700; color: var(--ink); }
.cf-funding-progress-2 .fp2-counts {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 4px 20px;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
color: var(--muted);
}
.cf-funding-progress-2 .fp2-counts strong { color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.cf-funding-progress-2 .fp2-track {
position: relative;
margin-top: 16px;
height: 20px;
border-radius: 999px;
overflow: hidden;
background: color-mix(in oklch, var(--ink) 9%, var(--card));
box-shadow: inset 0 1px 2px oklch(from var(--fp2-shadow) l c h / .22);
}
.cf-funding-progress-2 .fp2-fill {
display: block;
height: 100%;
width: calc(var(--pct, 0) * 1%);
border-radius: inherit;
background: linear-gradient(90deg, oklch(from var(--accent-fill, var(--accent)) calc(l - .03) c h), oklch(from var(--accent-fill, var(--accent)) calc(l + .06) c h));
box-shadow: inset 0 1px 0 oklch(from var(--accent-fill, var(--accent)) calc(l + .18) c h / .6);
}
.cf-funding-progress-2 .fp2-pledge {
margin-top: clamp(28px, 3.5vw, 40px);
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(300px, 440px);
gap: 28px clamp(24px, 4vw, 48px);
align-items: start;
padding: clamp(20px, 3vw, 32px);
border-radius: 12px;
background: color-mix(in oklch, var(--ink) 4%, var(--card));
border: 1px solid oklch(from var(--ink) l c h / .08);
}
.cf-funding-progress-2 .fp2-offer { min-width: 0; }
.cf-funding-progress-2 .fp2-price {
margin: 0;
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 4px 12px;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
letter-spacing: -0.01em;
text-transform: var(--display-case, none);
font-size: clamp(1.3125rem, 1.8vw, 1.625rem);
line-height: 1.15;
color: var(--ink);
text-wrap: balance;
}
.cf-funding-progress-2 .fp2-price strong {
font-weight: inherit;
font-size: clamp(2.5rem, 4.2vw, 3.75rem);
line-height: 1;
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
color: var(--ink);
}
.cf-funding-progress-2 .fp2-price-suffix { min-width: 0; }
.cf-funding-progress-2 .fp2-price-note { margin: 12px 0 0; max-width: 46ch; font-size: 0.9375rem; line-height: 1.4; font-weight: 600; color: var(--muted); text-wrap: pretty; }
.cf-funding-progress-2 .fp2-reasons-title { margin: 0; font-size: clamp(1.0625rem, 1.25vw, 1.125rem); line-height: 1.4; font-weight: 800; color: var(--ink); }
.cf-funding-progress-2 .fp2-offer > * + .fp2-reasons-title { margin-top: 24px; }
.cf-funding-progress-2 .fp2-reasons {
list-style: none;
margin: 12px 0 0;
padding: 0;
display: grid;
gap: 8px;
font-size: clamp(1.0625rem, 1.25vw, 1.125rem);
line-height: 1.5;
color: var(--ink);
text-wrap: pretty;
}
.cf-funding-progress-2 .fp2-reasons li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr); column-gap: 8px; }
.cf-funding-progress-2 .fp2-n { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; }
.cf-funding-progress-2 .fp2-action { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cf-funding-progress-2 .fp2-reassure { margin: 0; text-align: center; font-size: 0.9375rem; line-height: 1.4; font-weight: 600; color: var(--muted); text-wrap: pretty; }
.cf-funding-progress-2 .fp2-ico { display: inline-block; vertical-align: -0.15em; margin-inline-end: .4em; }
.cf-funding-progress-2 .fp2-btn {
--fp2-b: var(--button-bg, var(--cta));
--fp2-b2: var(--button-bg-2, var(--cta-2));
display: flex;
align-items: center;
justify-content: center;
width: 100%;
min-height: 72px;
margin: 0;
padding: 12px 28px;
border: 0;
border-radius: var(--button-radius, var(--radius, 12px));
cursor: pointer;
font-family: var(--button-font, var(--font-display));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
text-align: center;
text-wrap: balance;
text-decoration: none;
color: var(--button-ink, var(--cta-ink));
text-shadow: var(--button-text-shadow, none);
background: linear-gradient(oklch(from var(--fp2-b) calc(l + .04) c h), oklch(from var(--fp2-b2) calc(l - .02) c h));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--fp2-b) calc(l + .14) c h / .7), inset 0 -3px 0 oklch(from var(--fp2-b) calc(l - .16) c h), 0 1px 2px oklch(from var(--fp2-shadow) l c h / .3), 0 8px 16px -6px oklch(from var(--fp2-shadow) l c h / .45));
transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
-webkit-tap-highlight-color: transparent;
}
.cf-funding-progress-2 .fp2-btn:hover, .cf-funding-progress-2[data-state='hover'] .fp2-btn {
background: linear-gradient(oklch(from var(--fp2-b) calc(l - .01) c h), oklch(from var(--fp2-b2) calc(l - .07) c h));
box-shadow: inset 0 1px 0 oklch(from var(--fp2-b) calc(l + .1) c h / .6), inset 0 -3px 0 oklch(from var(--fp2-b) calc(l - .2) c h), 0 1px 2px oklch(from var(--fp2-shadow) l c h / .34), 0 12px 20px -8px oklch(from var(--fp2-shadow) l c h / .55);
transform: translateY(-1px);
}
.cf-funding-progress-2 .fp2-btn:active, .cf-funding-progress-2[data-state='active'] .fp2-btn {
background: linear-gradient(oklch(from var(--fp2-b) calc(l - .04) c h), oklch(from var(--fp2-b2) calc(l - .08) c h));
box-shadow: inset 0 2px 4px oklch(from var(--fp2-shadow) l c h / .35), inset 0 -2px 0 oklch(from var(--fp2-b) calc(l - .18) c h), 0 1px 1px oklch(from var(--fp2-shadow) l c h / .3);
transform: translateY(1px);
}
.cf-funding-progress-2 .fp2-btn:focus-visible { outline: 3px solid var(--field-focus, var(--accent)); outline-offset: 3px; }
.cf-funding-progress-2 .fp2-btn:disabled {
cursor: not-allowed;
transform: none;
background: var(--button-2-bg, var(--secondary));
color: var(--button-2-ink, var(--secondary-ink));
text-shadow: none;
box-shadow: var(--button-2-shadow, var(--shadow-sm));
}
.cf-funding-progress-2[data-motion='on'] [data-reveal] { transition: opacity .45s var(--fp2-ease), transform .45s var(--fp2-ease); }
.cf-funding-progress-2[data-motion='on'] [data-reveal]:not([data-in]) { opacity: .82; transform: translateY(8px); }
.cf-funding-progress-2[data-motion='on'] .fp2-fill { transition: width 1.6s var(--fp2-ease) .2s; }
.cf-funding-progress-2[data-motion='on'] .fp2-meter:not([data-in]) .fp2-fill { width: 0; }
@media (max-width: 980px) {
.cf-funding-progress-2 .fp2-pledge { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
.cf-funding-progress-2 .fp2-stop { grid-template-columns: minmax(0, 1fr); }
.cf-funding-progress-2 .fp2-rail { display: none; }
.cf-funding-progress-2 .fp2-badge { display: inline-grid; }
.cf-funding-progress-2 .fp2-body--photo { display: block; }
.cf-funding-progress-2 .fp2-pledge { padding: 20px 16px; gap: 24px; }
.cf-funding-progress-2 .fp2-photo {
width: calc(100% + 2 * var(--fp2-gutter));
max-width: none;
margin-inline: calc(-1 * var(--fp2-gutter));
border-radius: 0;
aspect-ratio: 3 / 2;
}
.cf-funding-progress-2 .fp2-head { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.cf-funding-progress-2 .fp2-photo + .fp2-head { margin-top: 20px; }
.cf-funding-progress-2 .fp2-stage {
margin-inline: calc(-1 * var(--fp2-gutter));
border-radius: 0;
border-left: 0;
border-right: 0;
padding: 20px var(--fp2-gutter) 28px;
}
.cf-funding-progress-2 .fp2-stage .fp2-photo { margin: -20px calc(-1 * var(--fp2-gutter)) 0; }
.cf-funding-progress-2 .fp2-btn { padding: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) {
.cf-funding-progress-2[data-motion='on'] [data-reveal], .cf-funding-progress-2[data-motion='on'] [data-reveal]:not([data-in]) { opacity: 1; transform: none; transition: none; }
.cf-funding-progress-2[data-motion='on'] .fp2-fill, .cf-funding-progress-2[data-motion='on'] .fp2-meter:not([data-in]) .fp2-fill { width: calc(var(--pct, 0) * 1%); transition: none; }
.cf-funding-progress-2 .fp2-btn { transition: none; }
.cf-funding-progress-2 .fp2-btn:hover, .cf-funding-progress-2 .fp2-btn:active { transform: none; }
}
`;
pieces/urgency/funding-progress-2/specimen.tsx 51 lines
import __studioImage00acd83e from "../assets/57908ad2be02ef71.webp";
import __studioImagec6b7c268 from "../assets/f65c7a9a96dbd78e.webp";
import __studioImage44e7b9b8 from "../assets/7389eff6625497e2.webp";
import FundingProgress2 from '../funding-progress-2';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled';
export default function FundingProgress2Specimen({ state = 'default' }: { state?: SpecimenState }) {
const milestones = [
{
title: 'The first real oven',
amount: '$6,200',
line: '“The night it fired up, I stopped borrowing my neighbour’s stove.”',
image: slot('item-1', __studioImage00acd83e),
imageAlt: 'A new six-burner range and oven in the community kitchen',
},
{
title: 'The walk-in cooler',
amount: '$14,500',
line: '“Now the farm donations stay fresh all week, not all afternoon.”',
image: slot('item-2', __studioImagec6b7c268),
imageAlt: 'An open walk-in cooler stocked with crates of fresh produce',
},
];
const next = {
title: 'Opening day',
line: '“The dining room is the last piece. Your pledge is how the doors open.”',
image: slot('item-3', __studioImage44e7b9b8),
imageAlt: 'Neighbours sharing a meal at long tables in the community dining room',
};
return (
<FundingProgress2
state={state}
founder='Maya Ortiz, founder of Riverside Community Kitchen'
milestones={milestones}
next={next}
percent={64}
raised='$38,400'
goal='$60,000'
backers='412'
price={defaults.sample.price}
reassurance={`Secure pledge · ${defaults.sample.price} one time`}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalFundingProgress2 |
React.ReactNode |
|
lead OptionalFundingProgress2 |
React.ReactNode |
|
founder OptionalFundingProgress2 |
string |
|
milestones OptionalFundingProgress2 |
FundingMilestone[] |
|
next OptionalFundingProgress2 |
FundingMilestone |
|
percent OptionalFundingProgress2 |
number |
|
raised OptionalFundingProgress2 |
string |
|
goal OptionalFundingProgress2 |
string |
|
backers OptionalFundingProgress2 |
string |
|
hideProof OptionalFundingProgress2 |
boolean |
|
price OptionalFundingProgress2 |
string |
|
priceSuffix OptionalFundingProgress2 |
string |
|
priceNote OptionalFundingProgress2 |
string |
|
reasonsTitle OptionalFundingProgress2 |
string |
|
reasons OptionalFundingProgress2 |
React.ReactNode[] |
|
label OptionalFundingProgress2 |
string |
|
reassurance OptionalFundingProgress2 |
string |
|
href OptionalFundingProgress2 |
string |
|
onAction OptionalFundingProgress2 |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalFundingProgress2 |
boolean |
|
state OptionalFundingProgress2 |
'default' | 'hover' | 'active' | 'disabled' |
|
copy OptionalFundingProgress2 |
Partial<FundingProgress2Copy> |
|
className OptionalFundingProgress2 |
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-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.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-3- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
57908ad2be02ef71.webp
image/webp · 126 KB
-
7389eff6625497e2.webp
image/webp · 140 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
f65c7a9a96dbd78e.webp
image/webp · 169 KB