Save Offer 1
Cancellation save: an honest keep / lose ledger that rewrites live between cancelling everything and the lighter plan, beside one keep action and an always-visible way out.
Use it in a prompt
Use offer/save-offer 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/save-offer.tsx. - Import it and pass your copy and images (Props tab):
import { SaveOffer } from "@/components/funneldna/offer/save-offer"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/save-offer/component.tsx 385 lines
// layout: split-contrast
// Cancellation save: an honest keep / lose ledger that rewrites live between cancelling everything and the lighter plan, beside one keep action and an always-visible way out.
import * as React from "react";
import { Check, X } from "lucide-react";
export type SaveOfferMark = "keep" | "lose";
export type SaveOfferMode = "cancel" | "downgrade";
export type SaveOfferLine = {
/** What the member has today, e.g. "Your saved lessons". */
label: string;
/** What happens to it if they cancel everything. */
cancel: { status: SaveOfferMark; detail: string };
/** What happens to it on the lighter plan. */
downgrade: { status: SaveOfferMark; detail: string };
};
export type SaveOfferProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string;
lead?: string;
/** Accessible name of the two-way toggle. */
toggleLabel?: string;
/** Toggle segments: a small lead-in word over the bold choice. */
options?: Record<SaveOfferMode, { kicker: string; label: string }>;
lines?: SaveOfferLine[];
/** Status word after each ledger line (spoken, and shown as a tag on wide screens). */
markLabels?: Record<SaveOfferMark, string>;
/** Screen-reader suffix after each line label; "{status}" is replaced with the mark label. */
statusTemplate?: string;
billLabel?: string;
/** Monthly figure for each choice; supplied prices only. */
monthly?: Record<SaveOfferMode, string>;
/** Line under the bill label for each choice. */
billCaption?: Record<SaveOfferMode, string>;
/** Unit after the monthly figure, e.g. "/month". */
perMonth?: string;
/** Optional line with today's price, e.g. "You pay $29 a month today." */
currentNote?: string;
/** Slot "scene": the after-state photo on the save side. */
sceneImage?: string;
sceneAlt?: string;
offerHeadline?: string;
/** Word before the price, e.g. "Just". */
priceLead?: string;
price?: string;
priceUnit?: string;
/** The value said in words beside the price. */
priceWords?: string;
reason?: string;
/** Keep button label: the outcome as the verb. */
label?: string;
/** Reassurance line under the keep button. */
note?: string;
/** Always-visible way out, kept quiet so it never competes with the keep button. */
declineLabel?: string;
/** Keep destination; renders the keep action as a link. */
href?: string;
/** Keep click handler (also fires before an href navigates). */
onAction?: () => void;
/** Decline destination; renders the way out as a link. */
declineHref?: string;
/** Decline click handler (also fires before a declineHref navigates). */
onDecline?: () => void;
/** Choice shown first in the ledger. */
defaultMode?: SaveOfferMode;
/** Called whenever the member switches choices. */
onModeChange?: (mode: SaveOfferMode) => void;
/** Forced keep-button state for previews; "disabled" also disables it. */
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
export function SaveOffer(props: SaveOfferProps) {
const {
headline = "Here’s exactly what cancelling ends",
highlight = "exactly what cancelling ends",
lead = "Switch between your two choices and watch every line change. Nothing hidden.",
toggleLabel = "Compare your choices",
options = {
cancel: { kicker: "Cancel", label: "Everything" },
downgrade: { kicker: "Switch to", label: "Lessons only" },
},
lines = DEFAULT_LINES,
markLabels = { keep: "Stays", lose: "Ends" },
statusTemplate = ": {status}",
billLabel = "Your monthly bill",
monthly = { cancel: "$0", downgrade: "$9" },
billCaption = {
cancel: "After this billing period, with every line marked Ends gone.",
downgrade: "On Lessons only, from your next bill.",
},
perMonth = "/month",
currentNote = "You pay $29 a month today.",
sceneImage,
sceneAlt = "",
offerHeadline = "Keep your lessons for less",
priceLead = "Just",
price = "$9",
priceUnit = "a month",
priceWords = "$20 less than you pay now",
reason = "Lessons only keeps your library, your progress and your member rate. You just step back from the community extras.",
label = "Keep my lessons",
note = "Same login. Switch back to Everything whenever you like.",
declineLabel = "Continue cancelling",
href,
onAction,
declineHref,
onDecline,
defaultMode = "cancel",
onModeChange,
state = "default",
className,
} = props;
const [mode, setMode] = React.useState<SaveOfferMode>(defaultMode);
const optionRefs = React.useRef<Array<HTMLButtonElement | null>>([]);
const baseId = React.useId();
const ledgerId = baseId + "-ledger";
const headingId = baseId + "-heading";
const choose = (next: SaveOfferMode, focus = false) => {
setMode(next);
onModeChange?.(next);
if (focus) optionRefs.current[MODES.indexOf(next)]?.focus();
};
const onToggleKey = (event: React.KeyboardEvent<HTMLButtonElement>) => {
const index = MODES.indexOf(mode);
let next = -1;
if (event.key === "ArrowRight" || event.key === "ArrowDown") next = (index + 1) % MODES.length;
else if (event.key === "ArrowLeft" || event.key === "ArrowUp") next = (index - 1 + MODES.length) % MODES.length;
else if (event.key === "Home") next = 0;
else if (event.key === "End") next = MODES.length - 1;
if (next < 0) return;
event.preventDefault();
choose(MODES[next], true);
};
const disabled = state === "disabled";
const forced = state === "hover" ? " is-hover" : state === "active" ? " is-active" : "";
const keepClass = "cf-so-keep" + forced;
const handleKeep = () => {
if (!disabled) onAction?.();
};
return (
<section className={["cf-save-offer", className].filter(Boolean).join(" ")} aria-labelledby={headingId}>
<style>{CSS}</style>
<div className="cf-so-wrap">
<div className="cf-so-frame">
<div className="cf-so-inventory">
<h2 className="cf-so-h" id={headingId}>
{withMarker(headline, highlight)}
</h2>
{lead ? <p className="cf-so-lead">{lead}</p> : null}
<div className="cf-so-toggle" role="radiogroup" aria-label={toggleLabel} data-mode={mode}>
<span className="cf-so-thumb" aria-hidden="true" />
{MODES.map((m, i) => (
<button
key={m}
ref={(el) => {
optionRefs.current[i] = el;
}}
type="button"
role="radio"
aria-checked={mode === m}
aria-controls={ledgerId}
tabIndex={mode === m ? 0 : -1}
className="cf-so-opt"
onClick={() => choose(m)}
onKeyDown={onToggleKey}
>
<span className="cf-so-opt-k">{options[m].kicker}</span>
<span className="cf-so-opt-l">{options[m].label}</span>
</button>
))}
</div>
<ul className="cf-so-ledger" id={ledgerId}>
{lines.map((line, i) => {
const row = line[mode];
return (
<li
key={mode + "-" + i}
className="cf-so-row"
style={{ animationDelay: Math.min(i * 0.07, 0.28) + "s" }}
>
<span className={"cf-so-badge is-" + row.status} aria-hidden="true">
{row.status === "keep" ? <Check size={16} strokeWidth={3} /> : <X size={16} strokeWidth={3} />}
</span>
<span className="cf-so-text">
<span className="cf-so-label">
{line.label}
<span className="cf-so-sr">{statusTemplate.replace("{status}", markLabels[row.status])}</span>
</span>
<span className="cf-so-detail">{row.detail}</span>
</span>
<span className={"cf-so-tag is-" + row.status} aria-hidden="true">
{markLabels[row.status]}
</span>
</li>
);
})}
</ul>
<div className="cf-so-bill">
<p className="cf-so-bill-copy">
<span className="cf-so-bill-label">{billLabel}</span>
<span className="cf-so-bill-cap">{billCaption[mode]}</span>
{currentNote ? <span className="cf-so-bill-cap">{currentNote}</span> : null}
</p>
<p className="cf-so-amount" aria-live="polite">
<span key={mode} className="cf-so-num">
{monthly[mode]}
</span>
<span className="cf-so-per">{perMonth}</span>
</p>
</div>
</div>
<div className="cf-so-save">
{sceneImage ? (
<img
className="cf-so-photo"
src={sceneImage}
alt={sceneAlt}
width={1200}
height={750}
loading="lazy"
decoding="async"
/>
) : null}
<h3 className="cf-so-offer-h">{offerHeadline}</h3>
<p className="cf-so-price">
<span className="cf-so-price-main">
{priceLead ? priceLead + " " : ""}
{price}
{priceUnit ? <span className="cf-so-price-unit"> {priceUnit}</span> : null}
</span>
{priceWords ? <span className="cf-so-price-words">{priceWords}</span> : null}
</p>
{reason ? <p className="cf-so-reason">{reason}</p> : null}
<div className="cf-so-actions">
{href && !disabled ? (
<a className={keepClass} href={href} onClick={handleKeep}>
{label}
</a>
) : (
<button type="button" className={keepClass} disabled={disabled} onClick={handleKeep}>
{label}
</button>
)}
{note ? <p className="cf-so-note">{note}</p> : null}
{declineHref ? (
<a className="cf-so-decline" href={declineHref} onClick={() => onDecline?.()}>
{declineLabel}
</a>
) : (
<button type="button" className="cf-so-decline" onClick={() => onDecline?.()}>
{declineLabel}
</button>
)}
</div>
</div>
</div>
</div>
</section>
);
}
export default SaveOffer;
const MODES: SaveOfferMode[] = ["cancel", "downgrade"];
const DEFAULT_LINES: SaveOfferLine[] = [
{
label: "Your saved lessons",
cancel: { status: "lose", detail: "Saved lessons and practice playlists leave your library." },
downgrade: { status: "keep", detail: "Every saved lesson and playlist stays right where it is." },
},
{
label: "Your course progress",
cancel: { status: "lose", detail: "Your place in each course is cleared." },
downgrade: { status: "keep", detail: "Pick up each course exactly where you stopped." },
},
{
label: "Community and live jam nights",
cancel: { status: "lose", detail: "Forum access and live jam nights end." },
downgrade: { status: "lose", detail: "Forum and live jam nights aren’t part of this plan." },
},
{
label: "Your member price",
cancel: { status: "lose", detail: "Coming back later means the standard price." },
downgrade: { status: "keep", detail: "Your member rate carries over to Lessons only." },
},
{
label: "Your account and receipts",
cancel: { status: "keep", detail: "Your login and billing history stay on file." },
downgrade: { status: "keep", detail: "Same login, same billing history." },
},
];
/** Wraps the first occurrence of `phrase` in `text` with the marker stroke. */
function withMarker(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="cf-so-mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
// Status badges keep a white glyph on the solid status fill (theme contract, status icon badges).
// The reduced-motion rule keeps !important: `.cf-save-offer *` (0,1,0) must beat the (0,2,0) animation rules.
const CSS = `
.cf-save-offer{--so-marker:color-mix(in oklch,var(--marker,#fae37c) 78%,transparent);--so-glyph:var(--badge-glyph,#fff);background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-save-offer *,.cf-save-offer *::before,.cf-save-offer *::after{box-sizing:border-box}
.cf-save-offer .cf-so-wrap{max-width:1120px;margin:0 auto}
.cf-save-offer .cf-so-frame{display:grid;grid-template-columns:minmax(0,1fr);background:var(--card);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(from var(--shadow,oklch(0.22 0.03 260)) l c h / .22),0 12px 24px -8px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .32)));overflow:hidden}
@media (min-width:960px){.cf-save-offer .cf-so-frame{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}}
.cf-save-offer .cf-so-inventory{background:var(--card);color:var(--ink);padding:clamp(24px,4vw,48px);min-width:0}
.cf-save-offer .cf-so-save{background:var(--band);color:var(--band-ink);padding:clamp(24px,4vw,48px);display:flex;flex-direction:column;min-width:0}
.cf-save-offer .cf-so-h{margin:0 0 16px;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(--ink);text-wrap:balance}
.cf-save-offer .cf-so-mark{background-image:linear-gradient(var(--so-marker),var(--so-marker));background-repeat:no-repeat;background-size:100% .72em;background-position:0 80%;padding:0 .1em;margin:0 -.04em;border-radius:.18em .42em .3em .24em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-save-offer .cf-so-lead{margin:0 0 28px;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-save-offer .cf-so-toggle{position:relative;display:grid;grid-template-columns:1fr 1fr;max-width:460px;margin:0 0 16px;padding:4px;border-radius:calc(var(--button-radius,var(--radius,12px)) + 4px);background:color-mix(in oklch,var(--ink) 6%,var(--card))}
.cf-save-offer .cf-so-thumb{position:absolute;top:4px;bottom:4px;left:4px;width:calc(50% - 4px);border-radius:var(--button-radius,var(--radius,12px));background:var(--card);border:1px solid color-mix(in oklch,var(--accent) 40%,var(--card));box-shadow:var(--shadow-sm,0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .18),0 1px 3px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .14));transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.cf-save-offer .cf-so-toggle[data-mode='downgrade'] .cf-so-thumb{transform:translateX(100%)}
.cf-save-offer .cf-so-opt{position:relative;z-index:1;appearance:none;margin:0;border:0;background:transparent;border-radius:var(--button-radius,var(--radius,12px));min-height:60px;padding:8px 12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-family:var(--font-body);color:var(--ink);text-align:center;cursor:pointer;transition:background-color .16s ease,transform .16s ease}
.cf-save-offer .cf-so-opt[aria-checked='true']{color:var(--ink)}
.cf-save-offer .cf-so-opt-k{font-size:.875rem;font-weight:600;line-height:1.2}
.cf-save-offer .cf-so-opt-l{font-family:var(--button-font,var(--font-display));font-size:1.0625rem;font-weight:var(--button-weight,800);line-height:1.2;white-space:nowrap}
.cf-save-offer .cf-so-opt[aria-checked='true'] .cf-so-opt-l{color:var(--accent)}
.cf-save-offer .cf-so-opt[aria-checked='false']:hover{background:color-mix(in oklch,var(--ink) 5%,transparent)}
.cf-save-offer .cf-so-opt:active{transform:scale(.98)}
.cf-save-offer .cf-so-opt:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-save-offer .cf-so-ledger{list-style:none;margin:0;padding:0}
.cf-save-offer .cf-so-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;column-gap:16px;align-items:start;padding:16px 0;border-top:1px solid oklch(from var(--ink) l c h / .12);animation:cf-so-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-save-offer .cf-so-row:first-child{border-top:0;padding-top:8px}
.cf-save-offer .cf-so-badge{width:28px;height:28px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--so-glyph);animation:cf-so-pop .3s ease both}
.cf-save-offer .cf-so-badge.is-keep{background:var(--success);background:oklch(from var(--success) min(l, .56) c h)}
.cf-save-offer .cf-so-badge.is-lose{background:var(--danger);background:oklch(from var(--danger) min(l, .56) c h)}
.cf-save-offer .cf-so-text{min-width:0}
.cf-save-offer .cf-so-label{display:block;padding-top:2px;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:700;line-height:1.35;color:var(--ink);text-wrap:pretty}
.cf-save-offer .cf-so-detail{display:block;margin-top:4px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
.cf-save-offer .cf-so-tag{padding-top:5px;font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap}
.cf-save-offer .cf-so-tag.is-keep{color:var(--success)}
.cf-save-offer .cf-so-tag.is-lose{color:var(--danger)}
.cf-save-offer .cf-so-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-save-offer .cf-so-bill{margin-top:16px;display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px;padding:clamp(16px,2.5vw,24px);border-radius:max(0px,calc(var(--card-radius,var(--radius,14px)) - 4px));background:color-mix(in oklch,var(--ink) 4%,var(--card))}
.cf-save-offer .cf-so-bill-copy{margin:0;min-width:0;flex:1 1 220px}
.cf-save-offer .cf-so-bill-label{display:block;font-size:clamp(1.0625rem,1.25vw,1.125rem);font-weight:800;line-height:1.3;color:var(--ink)}
.cf-save-offer .cf-so-bill-cap{display:block;margin-top:4px;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--ink);text-wrap:pretty}
.cf-save-offer .cf-so-amount{margin:0;display:flex;align-items:baseline;gap:6px;font-family:var(--font-display);color:var(--ink);white-space:nowrap}
.cf-save-offer .cf-so-num{display:inline-block;font-size:clamp(2.5rem,4.2vw,3.75rem);font-weight:var(--display-weight,800);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;animation:cf-so-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-save-offer .cf-so-per{font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700}
.cf-save-offer .cf-so-photo{display:block;width:100%;aspect-ratio:16/10;height:auto;object-fit:cover;object-position:center 55%;border-radius:var(--radius,12px);margin:0 0 28px}
@media (min-width:960px){.cf-save-offer .cf-so-photo{aspect-ratio:auto;flex:1 1 240px;min-height:240px;height:0}}
.cf-save-offer .cf-so-offer-h{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-.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-save-offer .cf-so-price{margin:0 0 24px;display:flex;flex-direction:column;align-items:flex-start;gap:20px}
.cf-save-offer .cf-so-price-main{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--band-ink);white-space:nowrap}
.cf-save-offer .cf-so-price-unit{font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:700;letter-spacing:0}
.cf-save-offer .cf-so-price-words{display:inline-flex;align-items:center;min-height:30px;padding:4px 12px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .12);color:var(--band-ink);font-size:.875rem;font-weight:800;line-height:1.2}
.cf-save-offer .cf-so-reason{margin:0 0 28px;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--band-ink);text-wrap:pretty}
.cf-save-offer .cf-so-actions{margin-top:auto;display:flex;flex-direction:column;gap:12px}
.cf-save-offer .cf-so-keep{appearance:none;margin:0;border:0;width:100%;min-height:64px;padding:12px 28px;display:inline-flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;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;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3),0 8px 16px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-save-offer .cf-so-keep:hover:not(:disabled),.cf-save-offer .cf-so-keep.is-hover{transform:translateY(-1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .34),0 10px 20px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .52))}
.cf-save-offer .cf-so-keep:active:not(:disabled),.cf-save-offer .cf-so-keep.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .16) c h / .6),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3)}
.cf-save-offer .cf-so-keep:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-save-offer .cf-so-keep: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:none}
.cf-save-offer .cf-so-note{margin:0;text-align:center;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--band-ink);text-wrap:pretty}
.cf-save-offer .cf-so-decline{align-self:center;appearance:none;margin:0;border:0;background:none;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border-radius:8px;font-family:var(--font-body);font-size:1rem;font-weight:600;line-height:1.3;color:color-mix(in oklab,var(--band-ink) 84%,var(--band));text-decoration:underline;text-decoration-color:oklch(from var(--band-ink) l c h / .45);text-underline-offset:.18em;cursor:pointer;transition:color .16s ease}
.cf-save-offer .cf-so-decline:hover{color:var(--band-ink);text-decoration-color:var(--band-ink)}
.cf-save-offer .cf-so-decline:focus-visible{outline:3px solid var(--band-ink);outline-offset:2px}
@media (max-width:600px){.cf-save-offer .cf-so-toggle{max-width:none}.cf-save-offer .cf-so-opt{padding:8px 6px}.cf-save-offer .cf-so-opt-l{font-size:1rem}.cf-save-offer .cf-so-row{grid-template-columns:28px minmax(0,1fr);column-gap:12px}.cf-save-offer .cf-so-tag{display:none}}
@keyframes cf-so-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-so-pop{from{transform:scale(.9)}to{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.cf-save-offer *{animation:none!important;transition:none!important}}
`;
pieces/offer/save-offer/specimen.tsx 24 lines
// Specimen: Fretwork Guitar Club cancellation save, the honest ledger beside the Lessons only plan.
import * as React from "react";
import { SaveOffer, type SaveOfferProps } from "../save-offer";
import { slot } from "../../slots";
import sceneImage from "../assets/1147f49ccc5027a6.webp";
export const states = ["default", "hover", "active", "disabled"];
type SpecimenState = NonNullable<SaveOfferProps["state"]>;
export default function SaveOfferSpecimen({ state = "default" }: { state?: SpecimenState }) {
return (
<SaveOffer
state={state}
lead="Switch between your two choices and watch every line of your Fretwork Guitar Club membership change. Nothing hidden."
monthly={{ cancel: "$0", downgrade: "$9" }}
currentNote="You pay $29 a month today."
price="$9"
priceWords="$20 less than you pay now"
sceneImage={slot("scene", sceneImage)}
sceneAlt="An acoustic guitar on its stand beside a tablet, ready for tonight’s lesson"
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalSaveOffer |
string |
|
highlight OptionalSaveOffer |
string |
|
lead OptionalSaveOffer |
string |
|
toggleLabel OptionalSaveOffer |
string |
|
options OptionalSaveOffer |
Record<SaveOfferMode, { kicker: string; label: string }> |
|
lines OptionalSaveOffer |
SaveOfferLine[] |
|
markLabels OptionalSaveOffer |
Record<SaveOfferMark, string> |
|
statusTemplate OptionalSaveOffer |
string |
|
billLabel OptionalSaveOffer |
string |
|
monthly OptionalSaveOffer |
Record<SaveOfferMode, string> |
|
billCaption OptionalSaveOffer |
Record<SaveOfferMode, string> |
|
perMonth OptionalSaveOffer |
string |
|
currentNote OptionalSaveOffer |
string |
|
sceneImage OptionalSaveOffer |
string |
|
sceneAlt OptionalSaveOffer |
string |
|
offerHeadline OptionalSaveOffer |
string |
|
priceLead OptionalSaveOffer |
string |
|
price OptionalSaveOffer |
string |
|
priceUnit OptionalSaveOffer |
string |
|
priceWords OptionalSaveOffer |
string |
|
reason OptionalSaveOffer |
string |
|
label OptionalSaveOffer |
string |
|
note OptionalSaveOffer |
string |
|
declineLabel OptionalSaveOffer |
string |
|
href OptionalSaveOffer |
string |
|
onAction OptionalSaveOffer |
() => void |
|
declineHref OptionalSaveOffer |
string |
|
onDecline OptionalSaveOffer |
() => void |
|
defaultMode OptionalSaveOffer |
SaveOfferMode |
|
onModeChange OptionalSaveOffer |
(mode: SaveOfferMode) => void |
|
state OptionalSaveOffer |
"default" | "hover" | "active" | "disabled" |
|
className OptionalSaveOffer |
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- 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.
-
1147f49ccc5027a6.webp
image/webp · 61.3 KB