Save Offer 2
Cancellation save from the member's coach: a cut-out coach beside a first-person note offers a free reset call or a pause instead of a discount, with an optional reveal of the member's own progress.
Use it in a prompt
Use offer/save-offer-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/offer/save-offer-2.tsx. - Import it and pass your copy and images (Props tab):
import { SaveOffer2 } from "@/components/funneldna/offer/save-offer-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/save-offer-2/component.tsx 461 lines
// layout: presenter-cutout
// Cancellation save from the member's coach: a cut-out coach beside a first-person note offers a free reset call or a pause instead of a discount, with an optional reveal of the member's own progress.
import * as React from 'react';
import { CalendarDays, ChevronDown, CircleAlert, Pause, PhoneCall, TrendingUp } from 'lucide-react';
import { FX_HOST, Glow } from '../fx/fx';
export type SaveOffer2Option = {
/** Passed to onAction when the member keeps this option. */
id: string;
title: string;
detail?: string;
/** Short fact chip on the tile, e.g. '15 min · Free'. */
tag?: string;
icon?: 'call' | 'pause' | 'calendar';
/** The button's answer to the question while this option is chosen. */
actionLabel: string;
/** Optional destination for the keep button while this option is chosen. */
href?: string;
};
export type SaveOffer2Progress = {
/** One short line above the numbers. */
intro?: string;
/** The member's real numbers only, e.g. { value: '38', label: 'sessions logged' }. */
stats?: { value: string; label: string }[];
/** Where the member is in their plan. */
stage?: { name: string; current: number; total: number };
};
export type SaveOffer2Props = {
headline?: React.ReactNode;
/** The coach's first-person note, one paragraph per entry. */
note?: React.ReactNode[];
coachName?: string;
coachRole?: string;
/** presenter-cutout slot: the coach on a transparent background. */
coachImage?: string;
coachImageAlt?: string;
/** The question the keep button answers. */
question?: string;
options?: SaveOffer2Option[];
/** Option id chosen at first; null starts with none. Defaults to the first option. */
defaultSelected?: string | null;
/** Button label while no option is chosen. */
keepLabel?: string;
cancelLabel?: string;
cancelHref?: string;
onCancel?: () => void;
/** Called with the chosen option id when the member keeps it. */
onAction?: (optionId: string) => void;
/** Supplied progress summary; the reveal is hidden entirely without it. */
progress?: SaveOffer2Progress;
progressLabel?: string;
/** Placeholders: {current}, {total}, {name}. */
stageTemplate?: string;
defaultProgressOpen?: boolean;
psLabel?: string;
ps?: React.ReactNode;
errorText?: string;
disabled?: boolean;
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error';
className?: string;
};
const DEFAULT_HEADLINE = (
<>
Before you go, can I <span className='so2-em'>help you restart?</span>
</>
);
const DEFAULT_NOTE: React.ReactNode[] = [
`I saw your cancel request, and I get it. Weeks get busy, training slips, and starting again can feel harder than stopping.`,
`So before you go, let me help you get back on track. No discount, no hard sell. Pick whichever fits your life right now.`,
];
const DEFAULT_OPTIONS: SaveOffer2Option[] = [
{
id: 'call',
title: 'A free 15-minute reset call',
detail: `We'll look at what got in the way and plan one simple next step.`,
tag: '15 min · Free',
icon: 'call',
actionLabel: 'Yes, book my reset call',
},
{
id: 'pause',
title: 'Pause instead of cancelling',
detail: `Take a break and come back to your plan when you're ready.`,
icon: 'pause',
actionLabel: 'Yes, pause my membership',
},
];
const ICONS = { call: PhoneCall, pause: Pause, calendar: CalendarDays };
export function SaveOffer2(props: SaveOffer2Props) {
const {
headline = DEFAULT_HEADLINE,
note = DEFAULT_NOTE,
coachName = 'Maya Ellis',
coachRole = 'Head coach, North Ridge Strength Coaching',
coachImage,
coachImageAlt,
question = 'Which would help more right now?',
options = DEFAULT_OPTIONS,
defaultSelected,
keepLabel = 'Keep my membership',
cancelLabel = 'Continue cancelling',
cancelHref,
onCancel,
onAction,
progress,
progressLabel = `See what you've built so far`,
stageTemplate = `You're in phase {current} of {total}: {name}`,
defaultProgressOpen = false,
psLabel = 'P.S.',
ps = `The reset call is free and there's nothing to sign. If it doesn't help, you can still cancel afterwards.`,
errorText = 'Pick one of the options above to keep your membership.',
disabled = false,
state = 'default',
className,
} = props;
const uid = React.useId();
const headId = `${uid}-head`;
const toggleId = `${uid}-toggle`;
const panelId = `${uid}-panel`;
const errId = `${uid}-err`;
const groupName = `${uid}-save`;
const firstChoice = defaultSelected === undefined ? options[0]?.id ?? null : defaultSelected;
const [selected, setSelected] = React.useState<string | null>(state === 'error' ? null : firstChoice);
const [error, setError] = React.useState(state === 'error');
const [open, setOpen] = React.useState(defaultProgressOpen);
const firstRadio = React.useRef<HTMLInputElement>(null);
React.useEffect(() => {
if (state === 'error') {
setSelected(null);
setError(true);
}
}, [state]);
const isDisabled = disabled || state === 'disabled';
const chosen = options.find((o) => o.id === selected);
const stats = (progress?.stats ?? []).filter((s) => s.value);
const stage = progress?.stage && progress.stage.total > 0 ? progress.stage : undefined;
const hasProgress = stats.length > 0 || Boolean(stage);
const segs = stage ? Math.min(Math.max(Math.round(stage.total), 1), 12) : 0;
const done = stage ? Math.min(Math.max(Math.round(stage.current), 0), segs) : 0;
const stageText = stage
? stageTemplate
.replace('{current}', String(stage.current))
.replace('{total}', String(stage.total))
.replace('{name}', stage.name)
: '';
const initials = coachName
.trim()
.split(' ')
.filter(Boolean)
.map((w) => w.charAt(0))
.slice(0, 2)
.join('')
.toUpperCase();
const forced = state === 'hover' ? ' is-hover' : state === 'active' ? ' is-active' : '';
function keep(event: React.MouseEvent<HTMLElement>) {
if (isDisabled) {
event.preventDefault();
return;
}
if (!chosen) {
event.preventDefault();
setError(true);
firstRadio.current?.focus();
return;
}
onAction?.(chosen.id);
}
const keepClass = `so2-keep${forced}`;
const keepEl =
chosen?.href && !isDisabled ? (
<a className={keepClass} href={chosen.href} onClick={keep}>
{chosen.actionLabel}
</a>
) : (
<button type='button' className={keepClass} disabled={isDisabled} onClick={keep}>
{chosen ? chosen.actionLabel : keepLabel}
</button>
);
return (
<section
className={['cf-save-offer-2', className].filter(Boolean).join(' ')}
aria-labelledby={headId}
>
<style>{CSS}</style>
<div className='so2-wrap'>
<div className='so2-coach' style={FX_HOST}>
<Glow />
<div className='so2-id'>
<p className='so2-name'>{coachName}</p>
{coachRole ? <p className='so2-role'>{coachRole}</p> : null}
</div>
<div className='so2-figure'>
{coachImage ? (
<img src={coachImage} alt={coachImageAlt ?? coachName} width={640} height={640} decoding='async' />
) : (
<span className='so2-mono' aria-hidden='true'>
{initials}
</span>
)}
</div>
<div className='so2-avatar' aria-hidden='true'>
{coachImage ? (
<img src={coachImage} alt='' width={176} height={176} decoding='async' />
) : (
<span className='so2-mono'>{initials}</span>
)}
</div>
</div>
<div className='so2-note'>
<h2 id={headId} className='so2-h'>
{headline}
</h2>
{note.length ? (
<div className='so2-copy'>
{note.map((p, i) => (
<p key={i}>{p}</p>
))}
</div>
) : null}
{hasProgress ? (
<div className='so2-reveal' data-open={open ? 'true' : 'false'}>
<button
type='button'
id={toggleId}
className='so2-toggle'
aria-expanded={open}
aria-controls={panelId}
onClick={() => setOpen((v) => !v)}
>
<span className='so2-toggle-icon'>
<TrendingUp size={20} strokeWidth={2.5} aria-hidden='true' />
</span>
<span className='so2-toggle-text'>{progressLabel}</span>
<ChevronDown className='so2-chev' size={20} strokeWidth={2.5} aria-hidden='true' />
</button>
<div className='so2-reveal-body' id={panelId} role='region' aria-labelledby={toggleId}>
<div className='so2-reveal-inner'>
<div className='so2-reveal-pad'>
{progress?.intro ? <p className='so2-intro'>{progress.intro}</p> : null}
{stats.length ? (
<dl className='so2-stats'>
{stats.map((s, i) => (
<div className='so2-stat' key={i}>
<dt>{s.label}</dt>
<dd>{s.value}</dd>
</div>
))}
</dl>
) : null}
{stage ? (
<div className='so2-stage'>
<p className='so2-stage-text'>{stageText}</p>
<div className='so2-track' aria-hidden='true'>
{Array.from({ length: segs }, (_, i) => (
<span
key={i}
className={'so2-seg' + (i < done ? ' is-done' : '')}
style={{ '--d': `${Math.min(i * 0.07, 0.28)}s` } as React.CSSProperties}
>
<span className='so2-seg-fill' />
</span>
))}
</div>
</div>
) : null}
</div>
</div>
</div>
</div>
) : null}
<fieldset className={'so2-options' + (error ? ' is-error' : '')} aria-describedby={error ? errId : undefined}>
<legend className='so2-q'>{question}</legend>
<div className='so2-tiles'>
{options.map((o, i) => {
const Icon = ICONS[o.icon ?? 'call'];
return (
<label
className='so2-tile'
key={o.id}
style={{ '--i': `${Math.min(0.07 + i * 0.07, 0.28)}s` } as React.CSSProperties}
>
<input
ref={i === 0 ? firstRadio : undefined}
type='radio'
name={groupName}
value={o.id}
checked={selected === o.id}
aria-invalid={error || undefined}
onChange={() => {
setSelected(o.id);
setError(false);
}}
/>
<span className='so2-face'>
<span className='so2-face-top'>
<span className='so2-ico'>
<Icon size={20} strokeWidth={2.5} aria-hidden='true' />
</span>
<span className='so2-dot' aria-hidden='true' />
</span>
<span className='so2-title'>{o.title}</span>
{o.detail ? <span className='so2-detail'>{o.detail}</span> : null}
{o.tag ? <span className='so2-tag'>{o.tag}</span> : null}
</span>
</label>
);
})}
</div>
{error ? (
<p id={errId} className='so2-error' role='alert'>
<CircleAlert className='so2-inline-ico' size={16} strokeWidth={2.5} aria-hidden='true' />
{errorText}
</p>
) : null}
</fieldset>
<div className='so2-actions'>
{keepEl}
{cancelHref ? (
<a className='so2-cancel' href={cancelHref} onClick={() => onCancel?.()}>
{cancelLabel}
</a>
) : (
<button type='button' className='so2-cancel' onClick={() => onCancel?.()}>
{cancelLabel}
</button>
)}
</div>
{ps ? (
<p className='so2-ps'>
<strong>{psLabel}</strong> {ps}
</p>
) : null}
</div>
</div>
</section>
);
}
export default SaveOffer2;
const CSS = `
.cf-save-offer-2{--so2-pt:clamp(56px,8vw,112px);--so2-pb:clamp(64px,8.5vw,120px);--so2-gutter:clamp(16px,5vw,48px);--so2-col:clamp(300px,32vw,420px);--so2-shadow:var(--shadow,oklch(0.22 0.03 260));--so2-line:oklch(from var(--ink) l c h / 0.12);--so2-well:color-mix(in oklch,var(--ink) 4%,var(--card));--so2-focus:var(--field-focus,var(--accent));position:relative;box-sizing:border-box;width:100%;overflow:clip;padding:var(--so2-pt) var(--so2-gutter) var(--so2-pb);background:var(--surface);color:var(--ink);font-family:var(--font-body);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5}
.cf-save-offer-2 *,.cf-save-offer-2 *::before,.cf-save-offer-2 *::after{box-sizing:border-box}
.cf-save-offer-2 p{margin:0}
.cf-save-offer-2 .so2-wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr)}
.cf-save-offer-2 .so2-coach{position:relative;display:flex;align-items:center;gap:16px;margin:calc(-1 * var(--so2-pt)) calc(-1 * var(--so2-gutter)) 0;padding:28px var(--so2-gutter) 56px;background:var(--band);color:var(--band-ink)}
.cf-save-offer-2 .so2-id{position:relative;z-index:1;min-width:0}
.cf-save-offer-2 .so2-name{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;color:var(--band-ink);text-wrap:balance}
.cf-save-offer-2 .so2-role{margin-top:4px;font-size:0.9375rem;line-height:1.4;font-weight:500;color:var(--band-ink);text-wrap:pretty}
.cf-save-offer-2 .so2-figure{display:none}
.cf-save-offer-2 .so2-avatar{position:relative;z-index:1;order:-1;flex:0 0 auto;width:88px;height:88px;border-radius:999px;overflow:hidden;display:grid;place-items:center;background:oklch(from var(--band) calc(l + 0.1) c h);filter:drop-shadow(0 2px 3px oklch(from var(--so2-shadow) l c h / 0.45))}
.cf-save-offer-2 .so2-avatar img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 0%;transform:scale(1.3);transform-origin:50% 14%}
.cf-save-offer-2 .so2-mono{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:2rem;line-height:1;letter-spacing:-0.02em;color:var(--band-ink)}
.cf-save-offer-2 .so2-note{position:relative;z-index:1;margin-top:-32px;padding:clamp(20px,3vw,36px);background:var(--card);color:var(--ink);border:1px solid var(--card-border,var(--so2-line));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 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)));animation:so2-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cf-save-offer-2 .so2-note::before{content:'';position:absolute;top:-12px;left:33px;width:22px;height:22px;background:var(--card);border-top:1px solid var(--card-border,var(--so2-line));border-left:1px solid var(--card-border,var(--so2-line));border-top-left-radius:4px;transform:rotate(45deg)}
.cf-save-offer-2 .so2-h{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);color:var(--ink);text-wrap:balance}
.cf-save-offer-2 .so2-em{color:var(--accent)}
.cf-save-offer-2 .so2-copy{margin-top:16px;display:grid;gap:12px;max-width:62ch}
.cf-save-offer-2 .so2-copy p{text-wrap:pretty}
.cf-save-offer-2 .so2-reveal{margin-top:24px;border-radius:10px;background:var(--so2-well);border:1px solid oklch(from var(--ink) l c h / 0.1);transition:background .16s ease}
.cf-save-offer-2 .so2-reveal:has(.so2-toggle:hover){background:color-mix(in oklch,var(--ink) 7%,var(--card))}
.cf-save-offer-2 .so2-toggle{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;margin:0;padding:12px 16px;border:0;border-radius:10px;background:none;color:var(--ink);font-family:var(--font-body);font-size:inherit;font-weight:700;line-height:1.3;text-align:left;cursor:pointer}
.cf-save-offer-2 .so2-toggle:focus-visible{outline:3px solid var(--so2-focus);outline-offset:2px}
.cf-save-offer-2 .so2-toggle-icon{flex:0 0 auto;width:40px;height:40px;border-radius:999px;display:grid;place-items:center;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));transition:transform .16s ease}
.cf-save-offer-2 .so2-toggle:active .so2-toggle-icon{transform:scale(.94)}
.cf-save-offer-2 .so2-toggle-text{flex:1 1 auto;min-width:0;text-wrap:pretty}
.cf-save-offer-2 .so2-chev{flex:0 0 auto;color:var(--muted);transition:transform .25s cubic-bezier(.2,.7,.2,1)}
.cf-save-offer-2 .so2-reveal[data-open='true'] .so2-chev{transform:rotate(180deg)}
.cf-save-offer-2 .so2-reveal-body{display:grid;grid-template-rows:0fr;transition:grid-template-rows .4s cubic-bezier(.2,.7,.2,1)}
.cf-save-offer-2 .so2-reveal[data-open='true'] .so2-reveal-body{grid-template-rows:1fr}
.cf-save-offer-2 .so2-reveal-inner{min-height:0;overflow:hidden;visibility:hidden;transition:visibility 0s linear .4s}
.cf-save-offer-2 .so2-reveal[data-open='true'] .so2-reveal-inner{visibility:visible;transition-delay:0s}
.cf-save-offer-2 .so2-reveal-pad{margin:0 16px;padding:16px 0 20px;border-top:1px solid oklch(from var(--ink) l c h / 0.1)}
.cf-save-offer-2 .so2-intro{margin-bottom:16px;font-size:0.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-save-offer-2 .so2-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,96px),1fr));gap:16px;margin:0}
.cf-save-offer-2 .so2-stat{display:flex;flex-direction:column-reverse;gap:12px;min-width:0}
.cf-save-offer-2 .so2-stat dd{margin:0;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:-0.03em;font-variant-numeric:tabular-nums;color:var(--ink);overflow-wrap:anywhere}
.cf-save-offer-2 .so2-stat dt{font-size:0.9375rem;line-height:1.4;font-weight:600;color:var(--muted);text-wrap:pretty}
.cf-save-offer-2 .so2-stats + .so2-stage{margin-top:24px}
.cf-save-offer-2 .so2-stage-text{font-size:0.9375rem;line-height:1.4;font-weight:700;color:var(--ink);text-wrap:pretty}
.cf-save-offer-2 .so2-track{display:flex;gap:6px;margin-top:12px}
.cf-save-offer-2 .so2-seg{position:relative;flex:1 1 0;height:10px;border-radius:999px;overflow:hidden;background:color-mix(in oklch,var(--ink) 12%,var(--card))}
.cf-save-offer-2 .so2-seg-fill{position:absolute;inset:0;border-radius:inherit;background:var(--accent-fill,var(--accent));transform:scaleX(0);transform-origin:left center;transition:transform .5s cubic-bezier(.2,.7,.2,1) var(--d,0s)}
.cf-save-offer-2 .so2-reveal[data-open='true'] .so2-seg.is-done .so2-seg-fill{transform:none}
.cf-save-offer-2 .so2-options{min-width:0;margin:32px 0 0;padding:0;border:0}
.cf-save-offer-2 .so2-q{padding:0;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;letter-spacing:-0.01em;color:var(--ink);text-wrap:balance}
.cf-save-offer-2 .so2-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;margin-top:16px}
.cf-save-offer-2 .so2-tile{position:relative;display:block;cursor:pointer;animation:so2-rise .45s cubic-bezier(.2,.7,.2,1) var(--i,0s) both}
.cf-save-offer-2 .so2-tile input{position:absolute;top:0;left:0;width:1px;height:1px;margin:0;opacity:0;pointer-events:none}
.cf-save-offer-2 .so2-face{display:flex;flex-direction:column;align-items:flex-start;gap:8px;height:100%;padding:16px 16px 18px;border-radius:var(--radius,12px);background:var(--so2-well);border:1.5px solid oklch(from var(--ink) l c h / 0.14);transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease}
.cf-save-offer-2 .so2-face-top{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:4px}
.cf-save-offer-2 .so2-ico{width:40px;height:40px;border-radius:999px;display:grid;place-items:center;background:var(--secondary,color-mix(in oklch,var(--ink) 9%,var(--card)));color:var(--secondary-ink,var(--ink));transition:background .16s ease,color .16s ease}
.cf-save-offer-2 .so2-dot{width:24px;height:24px;border-radius:999px;display:grid;place-items:center;background:var(--card);border:2px solid oklch(from var(--ink) l c h / 0.35);transition:background .16s ease,border-color .16s ease}
.cf-save-offer-2 .so2-dot::after{content:'';width:8px;height:8px;border-radius:999px;background:var(--accent-fill-ink,var(--card));transform:scale(0);transition:transform .16s ease}
.cf-save-offer-2 .so2-title{font-family:var(--font-display);font-weight:800;font-size:1.125rem;line-height:1.2;color:var(--ink);text-wrap:pretty}
.cf-save-offer-2 .so2-detail{font-size:0.9375rem;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-save-offer-2 .so2-tag{display:inline-flex;align-items:center;min-height:28px;margin-top:4px;padding:4px 12px;border-radius:999px;background:var(--secondary,color-mix(in oklch,var(--ink) 8%,var(--card)));color:var(--secondary-ink,var(--ink));font-size:0.875rem;font-weight:800;line-height:1.2}
.cf-save-offer-2 .so2-tile:hover input:not(:checked) + .so2-face{background:color-mix(in oklch,var(--ink) 7%,var(--card));border-color:oklch(from var(--ink) l c h / 0.26)}
.cf-save-offer-2 .so2-tile input:checked + .so2-face{background:color-mix(in oklch,var(--accent) 10%,var(--card));border-color:var(--accent);box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32));transform:translateY(-3px)}
.cf-save-offer-2 .so2-tile input:checked + .so2-face .so2-ico{background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
.cf-save-offer-2 .so2-tile input:checked + .so2-face .so2-dot{background:var(--accent-fill,var(--accent));border-color:var(--accent-fill,var(--accent))}
.cf-save-offer-2 .so2-tile input:checked + .so2-face .so2-dot::after{transform:scale(1)}
.cf-save-offer-2 .so2-tile input:checked + .so2-face .so2-detail{color:var(--ink)}
.cf-save-offer-2 .so2-tile:active .so2-face{transform:translateY(0) scale(.99)}
.cf-save-offer-2 .so2-tile input:focus-visible + .so2-face{outline:3px solid var(--so2-focus);outline-offset:3px}
.cf-save-offer-2 .so2-options.is-error .so2-face{border-color:var(--danger)}
.cf-save-offer-2 .so2-error{margin-top:12px;font-size:0.9375rem;line-height:1.4;font-weight:700;color:var(--danger);text-wrap:pretty}
.cf-save-offer-2 .so2-inline-ico{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-save-offer-2 .so2-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 28px;margin-top:24px}
.cf-save-offer-2 .so2-keep{--so2-bb:var(--button-bg,var(--cta));--so2-bb2:var(--button-bg-2,var(--cta-2));display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:64px;padding:12px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--so2-bb) calc(l + 0.04) c h),oklch(from var(--so2-bb2) calc(l - 0.02) c h));color:var(--button-ink,var(--cta-ink));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-decoration:none;text-wrap:balance;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--so2-bb) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--so2-bb) calc(l - 0.16) c h),0 1px 2px oklch(from var(--so2-shadow) l c h / 0.3),0 8px 16px -6px oklch(from var(--so2-shadow) l c h / 0.45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-save-offer-2 .so2-keep:hover:not(:disabled),.cf-save-offer-2 .so2-keep.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--so2-bb) calc(l - 0.01) c h),oklch(from var(--so2-bb2) calc(l - 0.07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--so2-bb) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--so2-bb) calc(l - 0.2) c h),0 1px 2px oklch(from var(--so2-shadow) l c h / 0.32),0 10px 20px -6px oklch(from var(--so2-shadow) l c h / 0.55))}
.cf-save-offer-2 .so2-keep:active:not(:disabled),.cf-save-offer-2 .so2-keep.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--so2-bb) calc(l - 0.05) c h),oklch(from var(--so2-bb2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--so2-bb) calc(l - 0.24) c h / 0.55),inset 0 -2px 0 oklch(from var(--so2-bb) calc(l - 0.16) c h),0 1px 1px oklch(from var(--so2-shadow) l c h / 0.3)}
.cf-save-offer-2 .so2-keep:focus-visible{outline:3px solid var(--so2-focus);outline-offset:3px}
.cf-save-offer-2 .so2-keep:disabled{background:var(--secondary,color-mix(in oklch,var(--ink) 8%,var(--card)));color:var(--secondary-ink,var(--ink));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / 0.2)));cursor:not-allowed;transform:none}
.cf-save-offer-2 .so2-cancel{display:inline-flex;align-items:center;min-height:44px;padding:8px 4px;border:0;border-radius:6px;background:none;color:var(--muted);font-family:var(--font-body);font-size:0.9375rem;font-weight:600;line-height:1.4;text-decoration:underline;text-decoration-color:oklch(from var(--muted) l c h / 0.5);text-underline-offset:0.18em;cursor:pointer}
.cf-save-offer-2 .so2-cancel:hover{color:var(--ink);text-decoration-color:currentColor}
.cf-save-offer-2 .so2-cancel:focus-visible{outline:3px solid var(--so2-focus);outline-offset:2px}
.cf-save-offer-2 .so2-ps{margin-top:24px;padding-top:20px;border-top:1px solid oklch(from var(--ink) l c h / 0.1);color:var(--ink);text-wrap:pretty;max-width:62ch}
.cf-save-offer-2 .so2-ps strong{font-family:var(--font-display);font-weight:800}
@media (max-width:559px){
.cf-save-offer-2 .so2-actions{flex-direction:column;align-items:stretch}
.cf-save-offer-2 .so2-keep{width:100%}
.cf-save-offer-2 .so2-cancel{align-self:center}
}
@media (min-width:960px){
.cf-save-offer-2 .so2-wrap{grid-template-columns:var(--so2-col) minmax(0,1fr);column-gap:clamp(32px,5vw,72px);align-items:start}
.cf-save-offer-2 .so2-coach{align-self:stretch;flex-direction:column;align-items:stretch;justify-content:flex-end;gap:16px;margin:calc(-1 * var(--so2-pt)) 0 calc(-1 * var(--so2-pb));padding:var(--so2-pt) 0 0;background:var(--band);color:var(--band-ink);border-image:linear-gradient(var(--band),var(--band)) 0 fill / 0 / 0 24px 0 100vw}
.cf-save-offer-2 .so2-id{padding:0 8px}
.cf-save-offer-2 .so2-avatar{display:none}
.cf-save-offer-2 .so2-figure{display:block;position:relative;z-index:1;width:100%;aspect-ratio:1 / 1;margin-bottom:0;animation:so2-rise .45s cubic-bezier(.2,.7,.2,1) .07s both}
.cf-save-offer-2 .so2-figure img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;object-position:50% 100%;filter:drop-shadow(0 2px 3px oklch(from var(--so2-shadow) l c h / 0.35)) drop-shadow(0 14px 18px oklch(from var(--so2-shadow) l c h / 0.3))}
.cf-save-offer-2 .so2-figure .so2-mono{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);width:160px;height:160px;border-radius:999px;display:grid;place-items:center;background:oklch(from var(--band) calc(l + 0.1) c h);font-size:3.75rem}
.cf-save-offer-2 .so2-note{margin-top:0}
.cf-save-offer-2 .so2-note::before{top:auto;bottom:calc(var(--so2-col) * 0.82 - var(--so2-pb) - 11px);left:-12px;border-top:0;border-top-left-radius:0;border-bottom:1px solid var(--card-border,var(--so2-line));border-bottom-left-radius:4px}
}
@keyframes so2-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
.cf-save-offer-2 .so2-note,.cf-save-offer-2 .so2-figure,.cf-save-offer-2 .so2-tile{animation:none}
.cf-save-offer-2 .so2-keep,.cf-save-offer-2 .so2-face,.cf-save-offer-2 .so2-ico,.cf-save-offer-2 .so2-dot,.cf-save-offer-2 .so2-dot::after,.cf-save-offer-2 .so2-reveal,.cf-save-offer-2 .so2-toggle-icon,.cf-save-offer-2 .so2-chev,.cf-save-offer-2 .so2-reveal-body,.cf-save-offer-2 .so2-reveal-inner,.cf-save-offer-2 .so2-seg-fill{transition:none}
.cf-save-offer-2 .so2-seg.is-done .so2-seg-fill{transform:none}
}
`;
pieces/offer/save-offer-2/specimen.tsx 49 lines
import __studioImage495db44a from "../assets/2b4438ca7b0b3161.webp";
import { SaveOffer2 } from '../save-offer-2';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled', 'error'];
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'error';
export default function SaveOffer2Specimen({ state = 'default' }: { state?: SpecimenState }) {
return (
<SaveOffer2
state={state}
coachName='Maya Ellis'
coachRole='Head coach, North Ridge Strength Coaching'
coachImage={slot(
'presenter-cutout',
__studioImage495db44a
)}
coachImageAlt='Maya Ellis, head coach at North Ridge Strength Coaching'
options={[
{
id: 'call',
title: 'A free 15-minute reset call',
detail: `We'll look at what got in the way and plan one simple next step together.`,
tag: '15 min · Free',
icon: 'call',
actionLabel: 'Yes, book my reset call',
},
{
id: 'pause',
title: 'Pause instead of cancelling',
detail: 'Hold your membership for up to 30 days, then pick up where you left off.',
tag: 'Up to 30 days',
icon: 'pause',
actionLabel: 'Yes, pause my membership',
},
]}
progress={{
intro: `Here's your record at North Ridge so far.`,
stats: [
{ value: '38', label: 'sessions logged' },
{ value: '12', label: 'weeks on your plan' },
{ value: '4', label: 'new personal bests' },
],
stage: { name: 'Strength Base', current: 2, total: 3 },
}}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalSaveOffer2 |
React.ReactNode |
|
note OptionalSaveOffer2 |
React.ReactNode[] |
|
coachName OptionalSaveOffer2 |
string |
|
coachRole OptionalSaveOffer2 |
string |
|
coachImage OptionalSaveOffer2 |
string |
|
coachImageAlt OptionalSaveOffer2 |
string |
|
question OptionalSaveOffer2 |
string |
|
options OptionalSaveOffer2 |
SaveOffer2Option[] |
|
defaultSelected OptionalSaveOffer2 |
string | null |
|
keepLabel OptionalSaveOffer2 |
string |
|
cancelLabel OptionalSaveOffer2 |
string |
|
cancelHref OptionalSaveOffer2 |
string |
|
onCancel OptionalSaveOffer2 |
() => void |
|
onAction OptionalSaveOffer2 |
(optionId: string) => void |
|
progress OptionalSaveOffer2 |
SaveOffer2Progress |
|
progressLabel OptionalSaveOffer2 |
string |
|
stageTemplate OptionalSaveOffer2 |
string |
|
defaultProgressOpen OptionalSaveOffer2 |
boolean |
|
psLabel OptionalSaveOffer2 |
string |
|
ps OptionalSaveOffer2 |
React.ReactNode |
|
errorText OptionalSaveOffer2 |
string |
|
disabled OptionalSaveOffer2 |
boolean |
|
state OptionalSaveOffer2 |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalSaveOffer2 |
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.
presenter-cutout- The presenter on a transparent background.
-
2b4438ca7b0b3161.webp
image/webp · 157 KB