Receipt Plan 1
Receipt plan: one plan printed like a till receipt from a slot on a dark mesh stage, so the offer reads plain and complete. A billing toggle with a quick count, dotted-leader items, a bold due-today total and one two-line action, signed off with the guarantee seal and a P.S.
Use it in a prompt
Use offer/receipt-plan from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/offer/receipt-plan.tsx. - Import it and pass your copy and images (Props tab):
import { ReceiptPlan } from "@/components/funneldna/offer/receipt-plan"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/receipt-plan/component.tsx 453 lines
// layout: certificate-document
// Receipt plan: one plan printed like a till receipt from a slot on a dark mesh stage, so the offer reads plain and complete. A billing toggle with a quick count, dotted-leader items, a bold due-today total and one two-line action, signed off with the guarantee seal and a P.S.
import * as React from 'react';
import { Loader2 } from 'lucide-react';
import { Divider, FX_HOST, Mesh } from '../fx/fx';
export type ReceiptPlanOption = {
id: string;
/** Toggle label, e.g. 'Yearly' */
label: string;
/** Headline price, e.g. '$8'; counts to the new value when the toggle changes */
price: string;
/** Line under the price, e.g. 'per month' */
period?: string;
/** Billing note, e.g. '$96 billed yearly' */
billed?: string;
/** Supplied regular price, struck after the billing note; omit when there is none */
regularPrice?: string;
/** Receipt total charged today, e.g. '$96' */
dueToday?: string;
/** Supplied offer tag for the receipt header; omit when there is none */
tag?: string;
/** Checkout destination for this plan (overrides href) */
href?: string;
};
export type ReceiptPlanItem = {
label: React.ReactNode;
/** 'included' (default), or 'soon' for a feature that is not live yet */
status?: 'included' | 'soon';
};
const DEFAULT_COPY = {
included: 'Included',
soon: 'Coming soon',
insteadOf: 'instead of',
dueToday: 'Due today',
busyLabel: 'One moment…',
toggleLabel: 'Choose how you pay',
};
export type ReceiptPlanProps = {
headline?: React.ReactNode;
lead?: React.ReactNode;
/** Plan name in the receipt header */
planLabel?: string;
/** Billing options; two or more show the toggle */
plans?: ReceiptPlanOption[];
/** id of the plan selected first */
defaultPlan?: string;
/** 4–7 receipt lines */
items?: ReceiptPlanItem[];
buttonLabel?: string;
/** Short benefit line inside the button, under the label */
buttonSubLabel?: string;
/** P.S. under the action, restating the guarantee or main benefit */
ps?: React.ReactNode;
/** seal-guarantee slot: transparent money-back seal art */
sealImage?: string;
sealAlt?: string;
href?: string;
onAction?: (plan: ReceiptPlanOption) => void;
onPlanChange?: (planId: string) => void;
/** Disables the button and shows the loader while checkout is busy */
busy?: boolean;
state?: 'default' | 'hover' | 'active' | 'disabled';
/** Colour of the angled edge: the token of the section that follows */
edgeTone?: React.ComponentProps<typeof Divider>['tone'];
copy?: Partial<typeof DEFAULT_COPY>;
className?: string;
};
const DEFAULT_PLANS: ReceiptPlanOption[] = [
{ id: 'yearly', label: 'Yearly', price: '$8', period: 'per month', billed: '$96 billed yearly', dueToday: '$96' },
{ id: 'monthly', label: 'Monthly', price: '$12', period: 'per month', billed: 'Billed monthly', dueToday: '$12' },
];
const DEFAULT_ITEMS: ReceiptPlanItem[] = [
{ label: 'Every feature, unlocked' },
{ label: 'Phone, tablet and web' },
{ label: 'Every update included' },
{ label: 'Help from real people' },
];
export function ReceiptPlan(props: ReceiptPlanProps) {
const {
headline = 'One simple plan.',
lead = 'Every feature, one price. Pick how you’d like to pay.',
planLabel = 'Full access',
plans = DEFAULT_PLANS,
defaultPlan,
items = DEFAULT_ITEMS,
buttonLabel = 'Get started',
buttonSubLabel,
ps,
sealImage,
sealAlt = 'Money-back guarantee seal',
href,
onAction,
onPlanChange,
busy = false,
state = 'default',
edgeTone = 'surface',
copy,
className,
} = props;
const c = { ...DEFAULT_COPY, ...copy };
const titleId = React.useId();
const [selected, setSelected] = React.useState<string | undefined>(() => defaultPlan ?? plans[0]?.id);
const optionRefs = React.useRef<(HTMLButtonElement | null)[]>([]);
const plan = plans.find((p) => p.id === selected) ?? plans[0];
const shownPrice = useCounted(plan?.price ?? '');
const shownDue = useCounted(plan?.dueToday ?? '');
if (!plan) return null;
const choose = (n: number, focus = false) => {
const idx = (n + plans.length) % plans.length;
const next = plans[idx];
if (!next) return;
setSelected(next.id);
onPlanChange?.(next.id);
if (focus) optionRefs.current[idx]?.focus();
};
const onKey = (e: React.KeyboardEvent<HTMLDivElement>) => {
const i = plans.findIndex((p) => p.id === plan.id);
let n: number;
if (e.key === 'ArrowRight' || e.key === 'ArrowDown') n = i + 1;
else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') n = i - 1;
else if (e.key === 'Home') n = 0;
else if (e.key === 'End') n = plans.length - 1;
else return;
e.preventDefault();
choose(n, true);
};
const price = splitCurrency(shownPrice);
const isBusy = busy || state === 'disabled';
const dest = plan.href ?? href;
const btnClass = 'crp-btn' + (state === 'hover' ? ' is-hover' : '') + (state === 'active' ? ' is-active' : '');
const btnInner = isBusy ? (
<span className='crp-btn-main'>
<Loader2 className='crp-spin' size={20} strokeWidth={2.5} aria-hidden='true' />
{c.busyLabel}
</span>
) : (
<>
<span className='crp-btn-main'>{buttonLabel}</span>
{buttonSubLabel ? <span className='crp-btn-sub'>{buttonSubLabel}</span> : null}
</>
);
return (
<section
className={['cf-receipt-plan', className].filter(Boolean).join(' ')}
style={FX_HOST}
aria-labelledby={titleId}
>
<style>{CSS}</style>
<Mesh variant='dark' />
<Divider shape='angle' tone={edgeTone} height={56} />
<div className='crp-inner'>
<h2 id={titleId} className='crp-title crp-r'>{headline}</h2>
{lead ? <p className='crp-lead crp-r crp-d1'>{lead}</p> : null}
{plans.length > 1 ? (
<div className='crp-toggle crp-r crp-d2' role='radiogroup' aria-label={c.toggleLabel} onKeyDown={onKey}>
{plans.map((p, i) => {
const on = p.id === plan.id;
return (
<button
key={p.id}
ref={(el) => {
optionRefs.current[i] = el;
}}
type='button'
role='radio'
aria-checked={on}
tabIndex={on ? 0 : -1}
className='crp-opt'
onClick={() => choose(i)}
>
{p.label}
</button>
);
})}
</div>
) : null}
<div className='crp-printer crp-r crp-d3'>
<span className='crp-slot' aria-hidden='true' />
<div className='crp-receipt'>
<div className='crp-head'>
<span className='crp-label'>{planLabel}</span>
{plan.tag ? <span className='crp-tag'>{plan.tag}</span> : null}
</div>
<div className='crp-pricebox'>
<div className='crp-amount' aria-hidden='true'>
{price.prefix ? <span className='crp-cur'>{price.prefix}</span> : null}
<span>{price.rest}</span>
</div>
<p className='crp-sr' aria-live='polite'>
{[plan.price, plan.period].filter(Boolean).join(' ')}
</p>
{plan.period ? <p className='crp-period'>{plan.period}</p> : null}
{plan.billed || plan.regularPrice ? (
<p className='crp-billed'>
{plan.billed}
{plan.regularPrice ? (
<>
{plan.billed ? ', ' : ''}
{c.insteadOf} <s>{plan.regularPrice}</s>
</>
) : null}
</p>
) : null}
</div>
{items.length ? (
<ul className='crp-items'>
{items.map((it, i) => {
const soon = it.status === 'soon';
return (
<li key={i} className={soon ? 'is-soon' : undefined}>
<span className='crp-item'>{it.label}</span>
<span className='crp-leader' aria-hidden='true' />
<span className='crp-status'>{soon ? c.soon : c.included}</span>
</li>
);
})}
</ul>
) : null}
{plan.dueToday ? (
<div className='crp-due'>
<span className='crp-due-label'>{c.dueToday}</span>
<span className='crp-due-value'>
<span aria-hidden='true'>{shownDue}</span>
<span className='crp-sr'>{plan.dueToday}</span>
</span>
</div>
) : null}
{dest && !isBusy ? (
<a className={btnClass} href={dest} onClick={() => onAction?.(plan)}>
{btnInner}
</a>
) : (
<button
type='button'
className={btnClass}
disabled={isBusy}
aria-busy={isBusy || undefined}
onClick={() => onAction?.(plan)}
>
{btnInner}
</button>
)}
</div>
</div>
{ps || sealImage ? (
<div className={'crp-ps crp-r crp-d4' + (sealImage ? '' : ' no-seal')}>
{sealImage ? (
<img className='crp-seal' src={sealImage} alt={sealAlt} width={80} height={80} loading='lazy' />
) : null}
{ps ? <p>{ps}</p> : null}
</div>
) : null}
</div>
</section>
);
}
export default ReceiptPlan;
type Amount = { prefix: string; n: number; decimals: number; grouping: boolean; suffix: string };
function parseAmount(raw: string): Amount | null {
const m = raw.match(/^([^0-9]*?)([0-9][0-9,]*(?:[.][0-9]+)?)(.*)$/);
if (!m) return null;
const num = m[2];
const n = parseFloat(num.replace(/,/g, ''));
if (!Number.isFinite(n)) return null;
return { prefix: m[1], n, decimals: num.split('.')[1]?.length ?? 0, grouping: num.includes(','), suffix: m[3] };
}
function formatAmount(target: Amount, n: number) {
const body = n.toLocaleString('en-US', {
minimumFractionDigits: target.decimals,
maximumFractionDigits: target.decimals,
useGrouping: target.grouping,
});
return target.prefix + body + target.suffix;
}
function splitCurrency(value: string) {
const m = value.match(/^([^0-9]*)(.*)$/);
const prefix = m ? m[1].trim() : '';
return { prefix, rest: m && prefix ? m[2] : value };
}
// Renders the real value first; on change, counts from the old value to the new one (skipped under reduced motion).
function useCounted(value: string): string {
const [frame, setFrame] = React.useState<string | null>(null);
const prev = React.useRef(value);
React.useLayoutEffect(() => {
const fromRaw = prev.current;
prev.current = value;
if (fromRaw === value) return;
const a = parseAmount(fromRaw);
const b = parseAmount(value);
const reduce =
typeof window !== 'undefined' && !!window.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
if (!a || !b || a.prefix !== b.prefix || a.suffix !== b.suffix || reduce) {
setFrame(null);
return;
}
let raf = 0;
const start = performance.now();
const dur = 380;
setFrame(fromRaw);
const tick = (now: number) => {
const p = Math.min(1, (now - start) / dur);
if (p >= 1) {
setFrame(null);
return;
}
const e = 1 - Math.pow(1 - p, 3);
setFrame(formatAmount(b, a.n + (b.n - a.n) * e));
raf = requestAnimationFrame(tick);
};
raf = requestAnimationFrame(tick);
return () => {
cancelAnimationFrame(raf);
setFrame(null);
};
}, [value]);
return frame ?? value;
}
const CSS = `
.cf-receipt-plan{
--crp-gutter:clamp(16px,5vw,48px);
--crp-edge:56px;
--crp-shadow:var(--shadow,oklch(0.22 0.03 256));
--crp-band:var(--band,oklch(0.27 0.067 256));
--crp-band-ink:var(--band-ink,#fff);
--crp-ink:var(--ink,#141d33);
--crp-card:var(--card,#fff);
position:relative;isolation:isolate;overflow:hidden;
background:var(--crp-band);color:var(--crp-band-ink);
font-family:var(--font-body,system-ui,sans-serif);
padding:clamp(56px,8vw,112px) var(--crp-gutter) calc(clamp(64px,8.5vw,120px) + var(--crp-edge));
}
.cf-receipt-plan *,.cf-receipt-plan *::before,.cf-receipt-plan *::after{box-sizing:border-box}
.cf-receipt-plan .crp-inner{position:relative;z-index:1;max-width:46rem;margin:0 auto;display:flex;flex-direction:column;align-items:center;text-align:center}
.cf-receipt-plan .crp-title{margin:0;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--crp-band-ink)}
.cf-receipt-plan .crp-lead{margin:16px 0 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;color:var(--crp-band-ink)}
.cf-receipt-plan .crp-toggle{margin-top:32px;display:inline-flex;gap:4px;padding:4px;border-radius:999px;background:oklch(from var(--crp-band-ink) l c h / 0.12);box-shadow:inset 0 1px 2px oklch(from var(--crp-shadow) l c h / 0.35)}
.cf-receipt-plan .crp-opt{appearance:none;border:0;margin:0;min-height:48px;min-width:112px;padding:0 24px;border-radius:999px;background:transparent;color:var(--crp-band-ink);font-family:var(--button-font,var(--font-body,inherit));font-size:1.0625rem;font-weight:var(--button-weight,800);line-height:1;cursor:pointer;transition:background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease}
.cf-receipt-plan .crp-opt:hover:not([aria-checked='true']){background:oklch(from var(--crp-band-ink) l c h / 0.12)}
.cf-receipt-plan .crp-opt:active:not([aria-checked='true']){transform:translateY(1px);background:oklch(from var(--crp-band-ink) l c h / 0.18)}
.cf-receipt-plan .crp-opt[aria-checked='true']{background:var(--crp-band-ink);color:var(--crp-band);box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--crp-shadow) l c h / 0.3)))}
.cf-receipt-plan .crp-opt:focus-visible{outline:3px solid oklch(from var(--crp-band-ink) l c h / 0.75);outline-offset:3px}
.cf-receipt-plan .crp-printer{position:relative;width:100%;max-width:520px;margin:40px auto 0;padding-top:8px}
.cf-receipt-plan .crp-slot{position:absolute;top:0;left:-24px;right:-24px;height:16px;border-radius:999px;background:oklch(from var(--crp-band) calc(l - 0.06) c h);border:1px solid oklch(from var(--crp-band-ink) l c h / 0.14);box-shadow:inset 0 3px 4px oklch(from var(--crp-shadow) calc(l - 0.06) c h / 0.6),inset 0 -1px 0 oklch(from var(--crp-band-ink) l c h / 0.18)}
.cf-receipt-plan .crp-receipt{position:relative;z-index:1;text-align:left;color:var(--crp-ink);background-color:var(--crp-card);background-image:linear-gradient(oklch(from var(--crp-shadow) l c h / 0.1),oklch(from var(--crp-shadow) l c h / 0) 18px);border:1px solid var(--card-border,oklch(from var(--crp-ink) l c h / 0.12));border-top:0;border-radius:2px 2px var(--card-radius,var(--radius,14px)) var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--crp-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--crp-shadow) l c h / 0.32)));padding:clamp(24px,3vw,32px) clamp(20px,3vw,32px) clamp(20px,3vw,32px)}
.cf-receipt-plan .crp-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 16px;padding-bottom:16px;border-bottom:1px solid oklch(from var(--crp-ink) l c h / 0.12)}
.cf-receipt-plan .crp-label,.cf-receipt-plan .crp-tag{font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase}
.cf-receipt-plan .crp-label{color:var(--muted,#4b5563)}
.cf-receipt-plan .crp-tag{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;white-space:nowrap;background:var(--accent-fill,var(--accent,oklch(0.5 0.17 257)));color:var(--accent-fill-ink,var(--crp-card));animation:crp-pop .3s cubic-bezier(.2,.7,.2,1) both}
.cf-receipt-plan .crp-pricebox{padding:24px 0;text-align:center;border-bottom:1px solid oklch(from var(--crp-ink) l c h / 0.12)}
.cf-receipt-plan .crp-amount{display:inline-flex;align-items:flex-start;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(--crp-ink)}
.cf-receipt-plan .crp-cur{font-size:.5em;margin-top:.12em;margin-right:.06em;letter-spacing:0}
.cf-receipt-plan .crp-period{margin:12px 0 0;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:700;color:var(--crp-ink)}
.cf-receipt-plan .crp-billed{margin:8px 0 0;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted,#4b5563);font-variant-numeric:tabular-nums;text-wrap:pretty}
.cf-receipt-plan .crp-billed s{text-decoration-line:line-through;text-decoration-color:var(--danger,oklch(0.5 0.17 27));text-decoration-thickness:2px}
.cf-receipt-plan .crp-items{list-style:none;margin:0;padding:24px 0 0;display:flex;flex-direction:column;gap:12px}
.cf-receipt-plan .crp-items li{display:flex;align-items:flex-end;gap:12px}
.cf-receipt-plan .crp-item{flex:0 1 auto;min-width:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.4;font-weight:500;color:var(--crp-ink);text-wrap:pretty}
.cf-receipt-plan .crp-leader{flex:1 0 24px;height:2px;margin-bottom:7px;background-image:radial-gradient(circle,oklch(from var(--crp-ink) l c h / 0.38) 1px,transparent 1.3px);background-size:6px 2px;background-repeat:repeat-x;background-position:left center}
.cf-receipt-plan .crp-status{flex:none;font-size:.875rem;line-height:1.7;font-weight:800;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;color:var(--success,oklch(0.5 0.14 150))}
.cf-receipt-plan li.is-soon .crp-status,.cf-receipt-plan li.is-soon .crp-item{color:var(--muted,#4b5563)}
.cf-receipt-plan .crp-due{margin-top:24px;display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:12px 16px;border-radius:10px;background:color-mix(in oklch,var(--crp-ink) 4%,var(--crp-card))}
.cf-receipt-plan .crp-due-label{font-size:1.0625rem;line-height:1.4;font-weight:800;color:var(--crp-ink)}
.cf-receipt-plan .crp-due-value{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;font-variant-numeric:tabular-nums;color:var(--crp-ink)}
.cf-receipt-plan .crp-btn{
--crp-bg:var(--button-bg,var(--cta,oklch(0.576 0.209 29.5)));
--crp-bg2:var(--button-bg-2,var(--cta-2,oklch(0.506 0.206 29.5)));
appearance:none;margin:24px 0 0;width:100%;min-height:72px;padding:12px 24px;
display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
border:0;border-radius:var(--button-radius,var(--radius,12px));
background:linear-gradient(oklch(from var(--crp-bg) calc(l + 0.04) c h),oklch(from var(--crp-bg2) calc(l - 0.02) c h));
color:var(--button-ink,var(--cta-ink,#fff));font-family:var(--button-font,var(--font-display,inherit));
text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);
text-align:center;text-decoration:none;cursor:pointer;
box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--crp-bg) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--crp-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--crp-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--crp-shadow) l c h / 0.45));
transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.cf-receipt-plan .crp-due + .crp-btn{margin-top:16px}
.cf-receipt-plan .crp-btn-main{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;font-weight:var(--button-weight,800);text-wrap:balance}
.cf-receipt-plan .crp-btn-sub{font-family:var(--font-body,inherit);font-size:.9375rem;line-height:1.4;font-weight:600;text-transform:none;letter-spacing:0;text-wrap:pretty}
.cf-receipt-plan .crp-btn:hover:not(:disabled),.cf-receipt-plan .crp-btn.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--crp-bg) calc(l - 0.01) c h),oklch(from var(--crp-bg2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--crp-bg) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--crp-bg) calc(l - 0.2) c h),0 1px 2px oklch(from var(--crp-shadow) l c h / 0.32),0 10px 18px -6px oklch(from var(--crp-shadow) l c h / 0.55)}
.cf-receipt-plan .crp-btn:active:not(:disabled),.cf-receipt-plan .crp-btn.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--crp-bg) calc(l - 0.04) c h),oklch(from var(--crp-bg2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--crp-bg) calc(l - 0.24) c h / 0.55),inset 0 -2px 0 oklch(from var(--crp-bg) calc(l - 0.16) c h),0 1px 1px oklch(from var(--crp-shadow) l c h / 0.3)}
.cf-receipt-plan .crp-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent,oklch(0.5 0.17 257))) l c h / 0.6);outline-offset:3px}
.cf-receipt-plan .crp-btn:disabled{cursor:not-allowed;filter:saturate(.6);box-shadow:inset 0 1px 0 oklch(from var(--crp-bg) calc(l + 0.14) c h / 0.5),0 1px 2px oklch(from var(--crp-shadow) l c h / 0.25)}
.cf-receipt-plan .crp-spin{flex:none;animation:crp-spin .8s linear infinite}
.cf-receipt-plan .crp-ps{margin:32px auto 0;width:100%;max-width:440px;display:flex;align-items:center;gap:16px;text-align:left}
.cf-receipt-plan .crp-ps.no-seal{justify-content:center;text-align:center}
.cf-receipt-plan .crp-seal{flex:none;width:80px;height:80px;object-fit:contain;border-radius:0;filter:drop-shadow(0 2px 3px oklch(from var(--crp-shadow) l c h / 0.45)) drop-shadow(0 10px 12px oklch(from var(--crp-shadow) l c h / 0.3))}
.cf-receipt-plan .crp-ps p{margin:0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;font-weight:400;text-wrap:pretty;color:var(--crp-band-ink)}
.cf-receipt-plan .crp-ps strong{font-weight:800}
.cf-receipt-plan .crp-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-receipt-plan .crp-r{animation:crp-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-receipt-plan .crp-d1{animation-delay:.07s}
.cf-receipt-plan .crp-d2{animation-delay:.14s}
.cf-receipt-plan .crp-d3{animation-delay:.21s}
.cf-receipt-plan .crp-d4{animation-delay:.28s}
@keyframes crp-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes crp-spin{to{transform:rotate(360deg)}}
@keyframes crp-pop{from{transform:scale(.9)}to{transform:none}}
@media (max-width:480px){
.cf-receipt-plan{--crp-gutter:16px}
.cf-receipt-plan .crp-slot{left:-8px;right:-8px}
.cf-receipt-plan .crp-opt{min-width:0;padding:0 24px}
.cf-receipt-plan .crp-receipt{padding-left:20px;padding-right:20px}
.cf-receipt-plan .crp-items li{gap:8px}
.cf-receipt-plan .crp-leader{flex-basis:12px}
.cf-receipt-plan .crp-status{letter-spacing:.04em}
.cf-receipt-plan .crp-btn{padding:12px 16px}
.cf-receipt-plan .crp-btn-main{font-size:1.125rem}
.cf-receipt-plan .crp-seal{width:64px;height:64px}
}
@media (prefers-reduced-motion:reduce){
.cf-receipt-plan .crp-r,.cf-receipt-plan .crp-spin,.cf-receipt-plan .crp-tag{animation:none}
.cf-receipt-plan .crp-btn,.cf-receipt-plan .crp-opt{transition:none}
.cf-receipt-plan .crp-btn:active:not(:disabled),.cf-receipt-plan .crp-btn.is-active:not(:disabled),.cf-receipt-plan .crp-opt:active{transform:none}
}
`;
pieces/offer/receipt-plan/specimen.tsx 58 lines
import __studioImageeb038fce from "../assets/531b4d6ab46da489.webp";
// Specimen: Pennywise, a fictional family budgeting app, sold as one plan printed like a receipt.
import { ReceiptPlan, type ReceiptPlanProps } from '../receipt-plan';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled'];
export default function ReceiptPlanSpecimen({ state = 'default' }: { state?: ReceiptPlanProps['state'] }) {
return (
<ReceiptPlan
state={state}
headline='One simple plan.'
lead='Every Pennywise feature for the whole household. No tiers, no add-ons, no surprise fees.'
planLabel='Pennywise Family'
plans={[
{
id: 'yearly',
label: 'Yearly',
price: '$8',
period: 'per month',
billed: '$96 billed yearly',
regularPrice: '$144',
dueToday: '$96',
tag: 'Best value',
},
{
id: 'monthly',
label: 'Monthly',
price: '$12',
period: 'per month',
billed: 'Billed monthly, cancel anytime',
dueToday: '$12',
},
]}
items={[
{ label: 'Link every bank, card and savings account' },
{ label: 'Shared budgets for up to 6 family members' },
{ label: 'Allowance tracker for the kids' },
{ label: 'Bill reminders before they’re due' },
{ label: 'iPhone, Android and web' },
{ label: 'Receipt scanning', status: 'soon' },
]}
buttonLabel='Start my family budget'
buttonSubLabel='Set up in about 5 minutes'
ps={
<>
<strong>P.S.</strong> Try Pennywise for 30 days. If money doesn’t feel calmer at home, we’ll refund every penny.
</>
}
sealImage={slot(
'seal-guarantee',
__studioImageeb038fce
)}
sealAlt={`${defaults.sample.guarantee} seal`}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalReceiptPlan |
React.ReactNode |
|
lead OptionalReceiptPlan |
React.ReactNode |
|
planLabel OptionalReceiptPlan |
string |
|
plans OptionalReceiptPlan |
ReceiptPlanOption[] |
|
defaultPlan OptionalReceiptPlan |
string |
|
items OptionalReceiptPlan |
ReceiptPlanItem[] |
|
buttonLabel OptionalReceiptPlan |
string |
|
buttonSubLabel OptionalReceiptPlan |
string |
|
ps OptionalReceiptPlan |
React.ReactNode |
|
sealImage OptionalReceiptPlan |
string |
|
sealAlt OptionalReceiptPlan |
string |
|
href OptionalReceiptPlan |
string |
|
onAction OptionalReceiptPlan |
(plan: ReceiptPlanOption) => void |
|
onPlanChange OptionalReceiptPlan |
(planId: string) => void |
|
busy OptionalReceiptPlan |
boolean |
|
state OptionalReceiptPlan |
'default' | 'hover' | 'active' | 'disabled' |
|
edgeTone OptionalReceiptPlan |
React.ComponentProps<typeof Divider>['tone'] |
|
copy OptionalReceiptPlan |
Partial<typeof DEFAULT_COPY> |
|
className OptionalReceiptPlan |
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-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.
seal-guarantee- The money-back guarantee seal, on a transparent background.
-
531b4d6ab46da489.webp
image/webp · 315 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB