Cancel Save 2
Cancellation save block, the two doors. The light half lets the member step their seats down and see the smaller monthly price on a hang tag. The dark half says plainly what cancelling means and has an honest, full-size cancel button. Both doors call onAction with the choice.
Use it in a prompt
Use checkout/cancel-save-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/checkout/cancel-save-2.tsx. - Import it and pass your copy and images (Props tab):
import { CancelSave2 } from "@/components/funneldna/checkout/cancel-save-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/cancel-save-2/component.tsx 488 lines
// layout: split-contrast
// Cancellation save block, the two doors. The light half lets the member step their seats down and see the smaller monthly price on a hang tag. The dark half says plainly what cancelling means and has an honest, full-size cancel button. Both doors call onAction with the choice.
// Theme: every colour reads the contract and role tokens. The cancel button sits on --band, so it is an outline built from --band-ink instead of --button-2-*, which a theme tunes for light surfaces. The marker is --marker mixed into --surface in oklab, so light ink stays readable on dark themes.
import React from 'react';
import { AlertCircle, CalendarX, CreditCard, Download, Loader2, Minus, Plus, User, Users } from 'lucide-react';
import { Texture, FX_HOST } from '../fx/fx';
import topo from '../fx/textures/topo';
export type LeaveFact = {
icon?: 'date' | 'team' | 'export' | 'billing';
text: React.ReactNode;
};
export type CancelSave2Choice =
| { choice: 'stay'; seats: number; monthly?: number; monthlyLabel?: string }
| { choice: 'cancel' };
export type CancelSave2Props = {
headline?: React.ReactNode;
highlight?: string; // phrase inside a string headline that gets the marker stroke
lead?: string;
productImage?: string; // slot product: cut-out illustration of the smaller plan on a transparent background
productImageAlt?: string;
seatsLabel?: string;
seatPrice?: number; // price per seat per month; without it the hang tag is hidden
currentSeats?: number;
currentMonthly?: number; // what they pay today; defaults to currentSeats x seatPrice
minSeats?: number;
maxSeats?: number; // defaults to currentSeats
initialSeats?: number; // defaults to one seat fewer than today
currency?: string; // ISO currency code, e.g. USD
locale?: string;
perMonth?: string; // suffix after a price, e.g. /mo
removeSeatLabel?: string;
addSeatLabel?: string;
tagTitle?: string; // uses {seats}
tagTitleOne?: string;
wasLabel?: string; // screen-reader word before the struck price
savingsLine?: string; // uses {amount}
sameLine?: string; // shown when the new price equals today
stayLabel?: string; // uses {seats} and {price}
stayLabelOne?: string; // uses {price}
stayLabelNoPrice?: string; // uses {seats}
stayNote?: string; // one plain line under the stay button
orLabel?: string;
leaveHeadline?: React.ReactNode;
leaveLead?: string;
endDate?: string; // the date the account closes, shown in bold
endsLine?: string; // uses {date}
endsLineNoDate?: string;
teamLine?: string;
exportLine?: string;
leaveFacts?: LeaveFact[]; // replaces the three default facts
cancelLabel?: string;
cancelNote?: string;
error?: string; // inline message under the stay button
errorDefault?: string; // message shown by the error state
busy?: 'stay' | 'cancel'; // spinner on that button, both disabled
disabled?: boolean;
onAction?: (choice: CancelSave2Choice) => void;
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error';
className?: string;
};
const ICONS = { date: CalendarX, team: Users, export: Download, billing: CreditCard };
export function CancelSave2(props: CancelSave2Props) {
const {
headline = 'Keep the plan that fits the team you have now',
highlight = 'the team you have now',
lead = 'Fewer people this season? Drop the seats you don’t use and keep everything you’ve built.',
productImage,
productImageAlt = 'A smaller team working together at one desk',
seatsLabel = 'Seats you need now',
seatPrice,
currentSeats = 5,
currentMonthly,
minSeats = 1,
maxSeats,
initialSeats,
currency = 'USD',
locale = 'en-US',
perMonth = '/mo',
removeSeatLabel = 'Remove a seat',
addSeatLabel = 'Add a seat',
tagTitle = 'Your {seats}-seat plan',
tagTitleOne = 'Your 1-seat plan',
wasLabel = 'Was',
savingsLine = 'You keep {amount} a month',
sameLine = 'Same as you pay today',
stayLabel = 'Keep {seats} seats for {price}',
stayLabelOne = 'Keep 1 seat for {price}',
stayLabelNoPrice = 'Keep {seats} seats',
stayNote = 'Your new price starts on your next invoice.',
orLabel = 'or',
leaveHeadline = 'Leaving? Here’s exactly what happens',
leaveLead = 'No hoops. If leaving is right for your team, the button is right here.',
endDate,
endsLine = 'Your account closes on {date}.',
endsLineNoDate = 'Your account closes at the end of your billing period.',
teamLine = 'Everyone on your team loses access that day.',
exportLine = 'You can export all of your data until then.',
leaveFacts,
cancelLabel = 'Cancel my plan',
cancelNote,
error,
errorDefault = 'We couldn’t update your plan. Please try again.',
busy,
disabled = false,
onAction,
state = 'default',
className,
} = props;
const uid = React.useId();
const headId = uid + '-stay';
const leaveId = uid + '-leave';
const seatsId = uid + '-seats';
const min = Math.max(1, Math.floor(minSeats));
const max = Math.max(min, Math.floor(maxSeats ?? currentSeats));
const [seats, setSeats] = React.useState(() => clamp(initialSeats ?? currentSeats - 1, min, max));
const [swing, setSwing] = React.useState<0 | 1 | 2>(0);
const value = clamp(seats, min, max);
const off = disabled || state === 'disabled' || Boolean(busy);
const message = error ?? (state === 'error' ? errorDefault : undefined);
const step = (delta: number) => {
const next = clamp(value + delta, min, max);
if (off || next === value) return;
setSeats(next);
setSwing((s) => (s === 1 ? 2 : 1));
};
const hasPrice = typeof seatPrice === 'number' && Number.isFinite(seatPrice);
const monthly = hasPrice ? round(value * (seatPrice as number)) : undefined;
const was = currentMonthly ?? (hasPrice ? round(currentSeats * (seatPrice as number)) : undefined);
const saving = monthly !== undefined && was !== undefined ? round(was - monthly) : 0;
const priceText = monthly !== undefined ? money(monthly, currency, locale) : '';
const monthlyLabel = monthly !== undefined ? priceText + perMonth : undefined;
const label =
monthly === undefined
? fill(stayLabelNoPrice, { seats: value })
: fill(value === 1 ? stayLabelOne : stayLabel, { seats: value, price: monthlyLabel ?? '' });
const seatTotal = Math.max(currentSeats, max);
const showStrip = seatTotal > 0 && seatTotal <= 16;
const facts: LeaveFact[] = leaveFacts ?? [
{ icon: 'date', text: endDate ? withDate(endsLine, endDate) : endsLineNoDate },
{ icon: 'team', text: teamLine },
{ icon: 'export', text: exportLine },
];
return (
<section
className={['cf-cancel-save-2', className].filter(Boolean).join(' ')}
data-state={state}
aria-labelledby={headId}
>
<style>{CSS}</style>
<div className='cs2-stay'>
<div className='cs2-stay-in'>
<h2 id={headId} className='cs2-h cs2-rise'>
{marked(headline, highlight)}
</h2>
{lead ? (
<p className='cs2-lead cs2-rise' style={{ '--i': 1 } as React.CSSProperties}>
{lead}
</p>
) : null}
<div
className={'cs2-build cs2-rise' + (productImage ? '' : ' is-solo')}
style={{ '--i': 2 } as React.CSSProperties}
>
{productImage ? (
<img
className='cs2-art'
src={productImage}
alt={productImageAlt}
width={208}
height={208}
loading='lazy'
decoding='async'
/>
) : null}
<div className='cs2-dial'>
<p id={seatsId} className='cs2-label'>
{seatsLabel}
</p>
{showStrip ? (
<div className='cs2-strip' aria-hidden='true'>
{Array.from({ length: seatTotal }, (_, i) => (
<User
key={i}
size={20}
strokeWidth={2.5}
className={'cs2-seat' + (i < value ? '' : ' is-off')}
/>
))}
</div>
) : null}
<div className='cs2-stepper' role='group' aria-labelledby={seatsId}>
<button
type='button'
className='cs2-step'
aria-label={removeSeatLabel}
disabled={off || value <= min}
onClick={() => step(-1)}
>
<Minus size={24} strokeWidth={2.5} aria-hidden='true' />
</button>
<span className='cs2-count' aria-live={monthly === undefined ? 'polite' : undefined}>
{value}
</span>
<button
type='button'
className='cs2-step'
aria-label={addSeatLabel}
disabled={off || value >= max}
onClick={() => step(1)}
>
<Plus size={24} strokeWidth={2.5} aria-hidden='true' />
</button>
</div>
{monthly !== undefined ? (
<div className='cs2-hang' data-swing={swing || undefined}>
<span className='cs2-string' aria-hidden='true' />
<div className='cs2-tag'>
<div className='cs2-tag-in' aria-live='polite' aria-atomic='true'>
<p className='cs2-tag-title'>{fill(value === 1 ? tagTitleOne : tagTitle, { seats: value })}</p>
{saving > 0 && was !== undefined ? (
<p className='cs2-was'>
<span className='cs2-sr'>{wasLabel} </span>
<s>
{money(was, currency, locale)}
{perMonth}
</s>
</p>
) : null}
<p className='cs2-price'>
{priceText}
<span className='cs2-per'>{perMonth}</span>
</p>
<p className={'cs2-save' + (saving > 0 ? '' : ' is-same')}>
{saving > 0 ? fill(savingsLine, { amount: money(saving, currency, locale) }) : sameLine}
</p>
</div>
</div>
</div>
) : null}
</div>
</div>
<div className='cs2-act cs2-rise' style={{ '--i': 3 } as React.CSSProperties}>
<button
type='button'
className='cs2-cta'
disabled={off}
aria-busy={busy === 'stay' || undefined}
onClick={() => onAction?.({ choice: 'stay', seats: value, monthly, monthlyLabel })}
>
{busy === 'stay' ? <Loader2 className='cs2-spin' size={20} strokeWidth={2.5} aria-hidden='true' /> : null}
<span>{label}</span>
</button>
{stayNote ? <p className='cs2-note'>{stayNote}</p> : null}
{message ? (
<p className='cs2-error' role='alert'>
<AlertCircle className='cs2-ic' size={18} strokeWidth={2.5} aria-hidden='true' />
{message}
</p>
) : null}
</div>
</div>
</div>
<div className='cs2-leave' role='region' aria-labelledby={leaveId}>
<div className='cs2-fx' aria-hidden='true'>
<div className='cs2-fx-host' style={{ ...FX_HOST, position: 'absolute', inset: 0 }}>
<Texture src={topo} tone='band-ink' />
</div>
</div>
<span className='cs2-or' aria-hidden='true'>
{orLabel}
</span>
<div className='cs2-leave-in cs2-rise' style={{ '--i': 1 } as React.CSSProperties}>
<h2 id={leaveId} className='cs2-lh'>
{leaveHeadline}
</h2>
{leaveLead ? <p className='cs2-llead'>{leaveLead}</p> : null}
<ul className='cs2-facts'>
{facts.map((f, i) => {
const Icon = ICONS[f.icon ?? 'date'];
return (
<li key={i}>
<span className='cs2-disc' aria-hidden='true'>
<Icon size={20} strokeWidth={2.5} />
</span>
<span className='cs2-fact'>{f.text}</span>
</li>
);
})}
</ul>
<button
type='button'
className='cs2-leave-btn'
disabled={off}
aria-busy={busy === 'cancel' || undefined}
onClick={() => onAction?.({ choice: 'cancel' })}
>
{busy === 'cancel' ? <Loader2 className='cs2-spin' size={20} strokeWidth={2.5} aria-hidden='true' /> : null}
<span>{cancelLabel}</span>
</button>
{cancelNote ? <p className='cs2-lnote'>{cancelNote}</p> : null}
</div>
</div>
</section>
);
}
export default CancelSave2;
function clamp(n: number, lo: number, hi: number) {
return Math.min(hi, Math.max(lo, Math.round(n)));
}
function round(n: number) {
return Math.round(n * 100) / 100;
}
function money(n: number, currency: string, locale: string) {
const whole = Number.isInteger(n);
try {
return new Intl.NumberFormat(locale, {
style: 'currency',
currency,
minimumFractionDigits: whole ? 0 : 2,
maximumFractionDigits: whole ? 0 : 2,
}).format(n);
} catch {
return String(n);
}
}
function fill(tpl: string, vars: Record<string, string | number>) {
return Object.keys(vars).reduce((s, k) => s.split('{' + k + '}').join(String(vars[k])), tpl);
}
function marked(h: React.ReactNode, phrase?: string) {
if (typeof h !== 'string' || !phrase) return h;
const at = h.indexOf(phrase);
if (at < 0) return h;
return (
<>
{h.slice(0, at)}
<span className='cs2-mark'>{phrase}</span>
{h.slice(at + phrase.length)}
</>
);
}
function withDate(tpl: string, date: string) {
return tpl.split('{date}').map((part, i) => (
<React.Fragment key={i}>
{i > 0 ? <strong>{date}</strong> : null}
{part}
</React.Fragment>
));
}
const CSS = `
.cf-cancel-save-2{
--cs2-gutter:clamp(16px,5vw,48px);
--cs2-split:clamp(32px,5vw,72px);
--cs2-pt:clamp(56px,8vw,112px);
--cs2-pb:clamp(64px,8.5vw,120px);
--cs2-bg:var(--button-bg,var(--cta,#d92d20));
--cs2-bg2:var(--button-bg-2,var(--cta-2,#b42318));
--cs2-btn-ink:var(--button-ink,var(--cta-ink,#ffffff));
--cs2-shadow:var(--shadow,oklch(0.22 0.03 260));
--cs2-focus:var(--field-focus,var(--accent,#1d4ed8));
--cs2-marker:color-mix(in oklab,var(--marker,#fae37c) 62%,var(--surface,#ffffff));
position:relative;
display:grid;
grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);
font-family:var(--font-body,system-ui,sans-serif);
color:var(--ink,#101828);
}
.cf-cancel-save-2 *,.cf-cancel-save-2 *::before,.cf-cancel-save-2 *::after{box-sizing:border-box;}
.cf-cancel-save-2 p{margin:0;}
.cf-cancel-save-2 .cs2-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-cancel-save-2 .cs2-stay{background:var(--surface,#ffffff);color:var(--ink,#101828);padding:var(--cs2-pt) var(--cs2-split) var(--cs2-pb) var(--cs2-gutter);}
.cf-cancel-save-2 .cs2-stay-in{max-width:640px;margin-left:auto;}
.cf-cancel-save-2 .cs2-h{margin:0 0 16px;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink,#101828);}
.cf-cancel-save-2 .cs2-mark{padding:0 .1em;margin:0 -.04em;background-image:linear-gradient(transparent 42%,var(--cs2-marker) 42%,var(--cs2-marker) 92%,transparent 92%);border-radius:.18em .42em .3em .5em;-webkit-box-decoration-break:clone;box-decoration-break:clone;}
.cf-cancel-save-2 .cs2-lead{font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted,#475467);max-width:60ch;text-wrap:pretty;}
.cf-cancel-save-2 .cs2-build{--cs2-art:clamp(96px,14vw,208px);margin-top:32px;display:grid;grid-template-columns:var(--cs2-art) minmax(0,1fr);gap:clamp(16px,2vw,24px);align-items:start;}
.cf-cancel-save-2 .cs2-build.is-solo{grid-template-columns:minmax(0,1fr);}
.cf-cancel-save-2 .cs2-art{display:block;width:var(--cs2-art);height:auto;aspect-ratio:1;object-fit:contain;margin-top:36px;filter:drop-shadow(0 2px 3px oklch(from var(--cs2-shadow) l c h / .28)) drop-shadow(0 12px 14px oklch(from var(--cs2-shadow) l c h / .18));}
.cf-cancel-save-2 .cs2-dial{min-width:0;display:flex;flex-direction:column;align-items:center;text-align:center;}
.cf-cancel-save-2 .cs2-label{margin-bottom:12px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:700;color:var(--label-ink,var(--ink,#101828));text-wrap:balance;}
.cf-cancel-save-2 .cs2-strip{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 6px;max-width:260px;margin-bottom:12px;}
.cf-cancel-save-2 .cs2-seat{color:var(--accent,#1d4ed8);transition:color .16s ease;}
.cf-cancel-save-2 .cs2-seat.is-off{color:oklch(from var(--ink,#101828) l c h / .26);}
.cf-cancel-save-2 .cs2-stepper{position:relative;z-index:2;display:inline-grid;grid-template-columns:60px minmax(2.4ch,auto) 60px;align-items:center;gap:4px;padding:6px;min-height:72px;background:var(--field,#ffffff);border:1px solid var(--field-border,color-mix(in oklch,var(--ink,#101828) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / .2));}
.cf-cancel-save-2 .cs2-step{appearance:none;border:0;margin:0;width:60px;height:60px;display:inline-flex;align-items:center;justify-content:center;border-radius:max(4px,calc(var(--field-radius,var(--radius,12px)) - 4px));background:var(--secondary,oklch(0.93 0.015 264));color:var(--secondary-ink,#101828);cursor:pointer;transition:transform .16s ease,background .16s ease,box-shadow .16s ease;}
.cf-cancel-save-2 .cs2-step:hover:not(:disabled){background:oklch(from var(--secondary,oklch(0.93 0.015 264)) calc(l - .05) c h);}
.cf-cancel-save-2 .cs2-step:active:not(:disabled){transform:scale(.95);background:oklch(from var(--secondary,oklch(0.93 0.015 264)) calc(l - .09) c h);}
.cf-cancel-save-2 .cs2-step:focus-visible{outline:2px solid var(--cs2-focus);outline-offset:1px;box-shadow:0 0 0 5px oklch(from var(--cs2-focus) l c h / .35);}
.cf-cancel-save-2 .cs2-step:disabled{opacity:.38;cursor:not-allowed;}
.cf-cancel-save-2 .cs2-count{padding:0 8px;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:-.03em;font-variant-numeric:lining-nums tabular-nums;color:var(--field-ink,#101828);text-align:center;}
.cf-cancel-save-2 .cs2-hang{position:relative;width:min(100%,280px);padding-top:28px;transform-origin:50% 0;}
.cf-cancel-save-2 .cs2-hang[data-swing='1']{animation:cs2-swing-a .7s cubic-bezier(.3,.7,.3,1);}
.cf-cancel-save-2 .cs2-hang[data-swing='2']{animation:cs2-swing-b .7s cubic-bezier(.3,.7,.3,1);}
.cf-cancel-save-2 .cs2-string{position:absolute;z-index:2;left:50%;top:-2px;width:2px;height:31px;margin-left:-1px;border-radius:2px;background:oklch(from var(--ink,#101828) l c h / .42);}
.cf-cancel-save-2 .cs2-string::after{content:'';position:absolute;left:50%;bottom:-5px;width:10px;height:10px;margin-left:-5px;border-radius:999px;background:var(--accent-fill,var(--accent,#1d4ed8));border:2px solid var(--card,#ffffff);}
.cf-cancel-save-2 .cs2-tag{position:relative;padding:clamp(20px,3vw,28px) clamp(20px,3vw,28px) clamp(20px,3vw,26px);background:color-mix(in oklch,var(--accent,#1d4ed8) 8%,var(--card,#ffffff));color:var(--ink,#101828);border:1px solid oklch(from var(--accent,#1d4ed8) l c h / .3);border-radius:var(--card-radius,var(--radius,14px));box-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));text-align:center;}
.cf-cancel-save-2 .cs2-tag-title{margin-bottom:12px;font-size:.875rem;line-height:1.2;font-weight:800;color:var(--muted,#475467);}
.cf-cancel-save-2 .cs2-was{margin-bottom:14px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.2;font-weight:700;color:var(--muted,#475467);font-variant-numeric:lining-nums tabular-nums;}
.cf-cancel-save-2 .cs2-was s{position:relative;display:inline-block;text-decoration:none;}
.cf-cancel-save-2 .cs2-was s::after{content:'';position:absolute;left:-4%;right:-4%;top:50%;height:.16em;margin-top:-.08em;border-radius:999px;background:var(--danger,#b42318);transform:rotate(-4deg);}
.cf-cancel-save-2 .cs2-price{display:flex;justify-content:center;align-items:baseline;gap:2px;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:-.03em;font-variant-numeric:lining-nums tabular-nums;color:var(--ink,#101828);}
.cf-cancel-save-2 .cs2-per{font-size:clamp(1.125rem,1.5vw,1.375rem);letter-spacing:0;font-weight:700;color:var(--muted,#475467);}
.cf-cancel-save-2 .cs2-save{margin-top:20px;font-size:.9375rem;line-height:1.4;font-weight:700;color:var(--success,#067647);text-wrap:pretty;}
.cf-cancel-save-2 .cs2-save.is-same{color:var(--muted,#475467);}
.cf-cancel-save-2 .cs2-act{margin-top:32px;display:grid;gap:12px;}
.cf-cancel-save-2 .cs2-cta{appearance:none;border:0;margin:0;width:100%;min-height:72px;padding:12px 28px;display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;color:var(--cs2-btn-ink);text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--cs2-bg) calc(l + .04) c h),oklch(from var(--cs2-bg2) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cs2-bg) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--cs2-bg) calc(l - .16) c h),0 1px 2px oklch(from var(--cs2-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--cs2-shadow) l c h / .45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease;}
.cf-cancel-save-2 .cs2-cta:hover:not(:disabled),.cf-cancel-save-2[data-state='hover'] .cs2-cta:not(:disabled){background:linear-gradient(oklch(from var(--cs2-bg) calc(l - .01) c h),oklch(from var(--cs2-bg2) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--cs2-bg) calc(l + .12) c h / .65),inset 0 -3px 0 oklch(from var(--cs2-bg) calc(l - .2) c h),0 1px 2px oklch(from var(--cs2-shadow) l c h / .34),0 10px 18px -6px oklch(from var(--cs2-shadow) l c h / .52);}
.cf-cancel-save-2 .cs2-cta:active:not(:disabled),.cf-cancel-save-2[data-state='active'] .cs2-cta:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--cs2-bg) calc(l - .06) c h),oklch(from var(--cs2-bg2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--cs2-bg) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--cs2-bg) calc(l - .16) c h),0 1px 1px oklch(from var(--cs2-shadow) l c h / .3);}
.cf-cancel-save-2 .cs2-cta:focus-visible{outline:3px solid var(--cs2-focus);outline-offset:3px;}
.cf-cancel-save-2 .cs2-cta:disabled{cursor:not-allowed;background:var(--secondary,oklch(0.93 0.015 264));color:var(--secondary-ink,#101828);text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / .2)));}
.cf-cancel-save-2 .cs2-cta[aria-busy='true']:disabled{cursor:progress;color:var(--cs2-btn-ink);text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--cs2-bg) calc(l + .04) c h),oklch(from var(--cs2-bg2) calc(l - .02) c h));}
.cf-cancel-save-2 .cs2-note{font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted,#475467);text-align:center;text-wrap:pretty;}
.cf-cancel-save-2 .cs2-error{padding:12px 16px;border-radius:10px;background:var(--danger-soft,oklch(0.93 0.024 27));color:var(--danger,#b42318);font-size:.9375rem;line-height:1.4;font-weight:600;text-wrap:pretty;}
.cf-cancel-save-2 .cs2-ic{display:inline-block;vertical-align:-0.2em;margin-inline-end:.4em;}
.cf-cancel-save-2 .cs2-leave{position:relative;background:var(--band,#14213d);color:var(--band-ink,#ffffff);padding:var(--cs2-pt) var(--cs2-gutter) var(--cs2-pb) var(--cs2-split);}
.cf-cancel-save-2 .cs2-leave-in{position:relative;z-index:1;max-width:460px;}
.cf-cancel-save-2 .cs2-fx{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;}
.cf-cancel-save-2 .cs2-or{position:absolute;z-index:3;left:0;top:50%;width:56px;height:56px;margin:-28px 0 0 -28px;display:grid;place-items:center;border-radius:999px;background:var(--card,#ffffff);color:var(--ink,#101828);border:1px solid var(--card-border,oklch(from var(--ink,#101828) l c h / .12));box-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));font-family:var(--font-display,inherit);font-weight:800;font-size:.875rem;line-height:1;text-transform:uppercase;letter-spacing:.08em;}
.cf-cancel-save-2 .cs2-lh{margin:0 0 12px;font-family:var(--font-display,inherit);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;text-wrap:balance;color:var(--band-ink,#ffffff);}
.cf-cancel-save-2 .cs2-llead{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--band-ink,#ffffff);text-wrap:pretty;}
.cf-cancel-save-2 .cs2-facts{list-style:none;margin:24px 0 0;padding:0;display:grid;gap:16px;}
.cf-cancel-save-2 .cs2-facts li{display:grid;grid-template-columns:40px minmax(0,1fr);gap:16px;align-items:start;}
.cf-cancel-save-2 .cs2-disc{width:40px;height:40px;border-radius:999px;display:grid;place-items:center;background:oklch(from var(--band-ink,#ffffff) l c h / .12);color:var(--band-ink,#ffffff);}
.cf-cancel-save-2 .cs2-fact{padding-top:7px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--band-ink,#ffffff);text-wrap:pretty;}
.cf-cancel-save-2 .cs2-fact strong{font-weight:800;}
.cf-cancel-save-2 .cs2-leave-btn{appearance:none;margin:32px 0 0;width:100%;min-height:64px;padding:12px 28px;display:inline-flex;align-items:center;justify-content:center;gap:10px;border-radius:var(--button-radius,var(--radius,12px));border:1.5px solid oklch(from var(--band-ink,#ffffff) l c h / .55);background:oklch(from var(--band-ink,#ffffff) l c h / .08);color:var(--band-ink,#ffffff);font-family:var(--button-font,var(--font-display,inherit));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;cursor:pointer;box-shadow:0 1px 2px oklch(from var(--cs2-shadow) l c h / .35);transition:transform .16s ease,background .16s ease,border-color .16s ease;}
.cf-cancel-save-2 .cs2-leave-btn:hover:not(:disabled){background:oklch(from var(--band-ink,#ffffff) l c h / .16);border-color:oklch(from var(--band-ink,#ffffff) l c h / .85);}
.cf-cancel-save-2 .cs2-leave-btn:active:not(:disabled){transform:translateY(1px);background:oklch(from var(--band-ink,#ffffff) l c h / .05);}
.cf-cancel-save-2 .cs2-leave-btn:focus-visible{outline:3px solid var(--band-ink,#ffffff);outline-offset:3px;}
.cf-cancel-save-2 .cs2-leave-btn:disabled{cursor:not-allowed;opacity:.55;}
.cf-cancel-save-2 .cs2-leave-btn[aria-busy='true']:disabled{cursor:progress;opacity:1;}
.cf-cancel-save-2 .cs2-lnote{margin-top:12px;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--band-ink,#ffffff);text-align:center;text-wrap:pretty;}
.cf-cancel-save-2 .cs2-rise{animation:cs2-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0) * .07s);}
.cf-cancel-save-2 .cs2-spin{animation:cs2-spin .8s linear infinite;}
@keyframes cs2-rise{from{opacity:.82;transform:translateY(8px);}to{opacity:1;transform:none;}}
@keyframes cs2-spin{to{transform:rotate(360deg);}}
@keyframes cs2-swing-a{0%{transform:rotate(0deg);}22%{transform:rotate(2.6deg);}50%{transform:rotate(-1.7deg);}76%{transform:rotate(.7deg);}100%{transform:rotate(0deg);}}
@keyframes cs2-swing-b{0%{transform:rotate(0deg);}22%{transform:rotate(2.6deg);}50%{transform:rotate(-1.7deg);}76%{transform:rotate(.7deg);}100%{transform:rotate(0deg);}}
@media (max-width:900px){
.cf-cancel-save-2{grid-template-columns:minmax(0,1fr);}
.cf-cancel-save-2 .cs2-stay{padding:var(--cs2-pt) var(--cs2-gutter) var(--cs2-pb);}
.cf-cancel-save-2 .cs2-leave{padding:clamp(64px,10vw,96px) var(--cs2-gutter) var(--cs2-pb);}
.cf-cancel-save-2 .cs2-stay-in,.cf-cancel-save-2 .cs2-leave-in{max-width:640px;margin-inline:auto;}
.cf-cancel-save-2 .cs2-or{left:50%;top:0;}
}
@media (max-width:560px){
.cf-cancel-save-2 .cs2-build{--cs2-art:136px;grid-template-columns:minmax(0,1fr);justify-items:center;gap:8px;margin-top:24px;}
.cf-cancel-save-2 .cs2-art{margin-top:0;}
.cf-cancel-save-2 .cs2-dial{width:100%;}
}
@media (prefers-reduced-motion:reduce){
.cf-cancel-save-2 .cs2-rise,.cf-cancel-save-2 .cs2-hang,.cf-cancel-save-2 .cs2-spin{animation:none;}
.cf-cancel-save-2 *{transition:none;}
}
`;
pieces/checkout/cancel-save-2/specimen.tsx 32 lines
import __studioImagee0e9a78e from "../assets/29443a5e6140e9c9.webp";
import React from 'react';
import { CancelSave2 } from '../cancel-save-2';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export default function CancelSave2Specimen({ state = 'default' }: { state?: SpecimenState }) {
return (
<CancelSave2
state={state}
headline='Keep Ledgerloft running for the team you have today'
highlight='the team you have today'
lead='Smaller agency this season? Drop the seats you don’t use. Every client, invoice and payment reminder stays right where it is.'
productImage={slot(
'product',
__studioImagee0e9a78e
)}
productImageAlt='A smaller agency team of three working together at one desk'
seatsLabel='Seats your agency needs now'
seatPrice={12}
currentSeats={8}
initialSeats={5}
stayNote='Your new price starts on your next invoice. Add seats back anytime.'
leaveHeadline='Leaving Ledgerloft? Here’s exactly what happens'
endDate='December 14, 2026'
exportLine='Export every invoice, client and payment record as CSV until then.'
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalCancelSave2 |
React.ReactNode |
|
highlight OptionalCancelSave2 |
string |
|
lead OptionalCancelSave2 |
string |
|
productImage OptionalCancelSave2 |
string |
|
productImageAlt OptionalCancelSave2 |
string |
|
seatsLabel OptionalCancelSave2 |
string |
|
seatPrice OptionalCancelSave2 |
number |
|
currentSeats OptionalCancelSave2 |
number |
|
currentMonthly OptionalCancelSave2 |
number |
|
minSeats OptionalCancelSave2 |
number |
|
maxSeats OptionalCancelSave2 |
number |
|
initialSeats OptionalCancelSave2 |
number |
|
currency OptionalCancelSave2 |
string |
|
locale OptionalCancelSave2 |
string |
|
perMonth OptionalCancelSave2 |
string |
|
removeSeatLabel OptionalCancelSave2 |
string |
|
addSeatLabel OptionalCancelSave2 |
string |
|
tagTitle OptionalCancelSave2 |
string |
|
tagTitleOne OptionalCancelSave2 |
string |
|
wasLabel OptionalCancelSave2 |
string |
|
savingsLine OptionalCancelSave2 |
string |
|
sameLine OptionalCancelSave2 |
string |
|
stayLabel OptionalCancelSave2 |
string |
|
stayLabelOne OptionalCancelSave2 |
string |
|
stayLabelNoPrice OptionalCancelSave2 |
string |
|
stayNote OptionalCancelSave2 |
string |
|
orLabel OptionalCancelSave2 |
string |
|
leaveHeadline OptionalCancelSave2 |
React.ReactNode |
|
leaveLead OptionalCancelSave2 |
string |
|
endDate OptionalCancelSave2 |
string |
|
endsLine OptionalCancelSave2 |
string |
|
endsLineNoDate OptionalCancelSave2 |
string |
|
teamLine OptionalCancelSave2 |
string |
|
exportLine OptionalCancelSave2 |
string |
|
leaveFacts OptionalCancelSave2 |
LeaveFact[] |
|
cancelLabel OptionalCancelSave2 |
string |
|
cancelNote OptionalCancelSave2 |
string |
|
error OptionalCancelSave2 |
string |
|
errorDefault OptionalCancelSave2 |
string |
|
busy OptionalCancelSave2 |
'stay' | 'cancel' |
|
disabled OptionalCancelSave2 |
boolean |
|
onAction OptionalCancelSave2 |
(choice: CancelSave2Choice) => void |
|
state OptionalCancelSave2 |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalCancelSave2 |
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- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- 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.
product- The main product shot or cover (ebook, kit, bottle).
-
29443a5e6140e9c9.webp
image/webp · 154 KB
-
a57ca5c86a05001f.webp
image/webp · 108 KB