Cart Recovery 1
Cart recovery band: welcomes a returning shopper back to the cart they left, then walks a lit path
Use it in a prompt
Use offer/cart-recovery 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/cart-recovery.tsx. - Import it and pass your copy and images (Props tab):
import { CartRecovery } from "@/components/funneldna/offer/cart-recovery"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/cart-recovery/component.tsx 404 lines
// layout: path-to-action
// Cart recovery band: welcomes a returning shopper back to the cart they left, then walks a lit path
// (cart, what it’s worth, guarantee) that ends on one “Complete my order” button.
import * as React from 'react';
import { CreditCard, Gift, Lock, ShieldCheck, ShoppingCart, Tag } from 'lucide-react';
import type { LucideIcon } from 'lucide-react';
import { FX_HOST, Pattern } from '../fx/fx';
export type CartRecoveryItem = {
name: string;
/** One short line on what the item does for the buyer. */
detail?: string;
/** Supplied value of this item, e.g. $49. */
value?: string;
/** item-n slot image (product photo). */
image?: string;
imageAlt?: string;
};
export type CartRecoveryIncentive = {
/** Only a real, supplied incentive (a bonus or discount the offer actually has). */
title: React.ReactNode;
detail?: string;
/** Optional coupon code shown as a chip. */
code?: string;
};
export type CartRecoveryProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string;
/** 1 when this band opens the return page, 2 when it sits lower. */
headingLevel?: 1 | 2;
lead?: string;
productName?: string;
items?: CartRecoveryItem[];
/** Template, {count} is replaced with the number of items. */
itemCount?: string;
itemCountOne?: string;
/** Template, {value} is replaced with the item value. */
itemValue?: string;
valueHeading?: string;
/** Supplied total value, shown first and big. */
totalValue?: string;
valueTurn?: string;
todayLabel?: string;
/** Today’s price, revealed under the value. */
price?: string;
priceNote?: string;
incentive?: CartRecoveryIncentive;
incentiveCodeLabel?: string;
guaranteeHeading?: string;
guaranteeText?: React.ReactNode;
/** seal-guarantee slot image, transparent background. */
guaranteeImage?: string;
guaranteeImageAlt?: string;
actionHeading?: string;
actionText?: React.ReactNode;
/** product slot image, transparent background. */
productImage?: string;
productImageAlt?: string;
label?: string;
reassurance?: string;
href?: string;
onAction?: () => void;
disabled?: boolean;
state?: 'default' | 'hover' | 'active' | 'disabled';
className?: string;
};
export function CartRecovery(props: CartRecoveryProps) {
const {
headline = 'You left something behind',
highlight = 'something behind',
headingLevel = 1,
lead = 'Your kit is still in your cart. Finish your order and start planning your first funnel today.',
productName = 'The Funnel Starter Kit',
items = DEFAULT_ITEMS,
itemCount = '{count} items waiting in your cart',
itemCountOne = '1 item waiting in your cart',
itemValue = '{value} value',
valueHeading = 'Your whole kit is worth',
totalValue = '$97',
valueTurn = 'But you won’t pay that.',
todayLabel = 'Finish your order today for',
price = '$47',
priceNote = 'One payment · Lifetime access',
incentive,
incentiveCodeLabel = 'Code',
guaranteeHeading = 'Try it for 30 days, risk free',
guaranteeText = DEFAULT_GUARANTEE,
guaranteeImage,
guaranteeImageAlt = '30-day money-back guarantee seal',
actionHeading = 'Pick up right where you left off',
actionText = 'Your kit is one step away. Click the button below to get instant access.',
productImage,
productImageAlt = 'The Funnel Starter Kit',
label = 'Complete my order',
reassurance = 'Secure checkout · Instant download',
href,
onAction,
disabled = false,
state = 'default',
className,
} = props;
const titleId = React.useId();
const Heading = (headingLevel === 2 ? 'h2' : 'h1') as 'h1' | 'h2';
const isDisabled = disabled || state === 'disabled';
const forced = state === 'hover' || state === 'active' ? state : undefined;
const countText = (items.length === 1 ? itemCountOne : itemCount).replace('{count}', String(items.length));
// Signature: the trail lights up stop by stop as the visitor reads toward the button.
const [reached, setReached] = React.useState(-1);
const stops = React.useRef<Array<HTMLLIElement | null>>([]);
const register = React.useCallback((i: number, el: HTMLLIElement | null) => {
stops.current[i] = el;
}, []);
React.useEffect(() => {
const reduce = typeof window.matchMedia === 'function' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
if (reduce || typeof IntersectionObserver === 'undefined') {
setReached(3);
return;
}
const io = new IntersectionObserver(
(entries) => {
for (const entry of entries) {
if (!entry.isIntersecting) continue;
const i = Number((entry.target as HTMLElement).dataset.stop);
setReached((r) => Math.max(r, i));
io.unobserve(entry.target);
}
},
{ rootMargin: '0px 0px -12% 0px', threshold: 0.2 },
);
stops.current.forEach((el) => {
if (el) io.observe(el);
});
return () => io.disconnect();
}, []);
const handleClick = (event: React.MouseEvent) => {
if (isDisabled) {
event.preventDefault();
return;
}
onAction?.();
};
return (
<section className={['cf-cart-recovery', className].filter(Boolean).join(' ')} style={FX_HOST} aria-labelledby={titleId}>
<style>{CSS}</style>
<Pattern name='grid' fade='top' />
<div className='cf-cart-recovery__inner'>
<header className='cf-cart-recovery__head'>
<Heading id={titleId} className='cf-cart-recovery__title'>
{markPhrase(headline, highlight)}
</Heading>
{lead ? <p className='cf-cart-recovery__lead'>{lead}</p> : null}
</header>
<ol className='cf-cart-recovery__path'>
<Stop index={0} reached={reached} icon={ShoppingCart} register={register}>
<div className='cf-cart-recovery__card cf-cart-recovery__cart'>
<h3 className='cf-cart-recovery__h3'>{productName}</h3>
<p className='cf-cart-recovery__meta'>{countText}</p>
<ul className='cf-cart-recovery__items'>
{items.map((item, i) => (
<li key={item.name + i} className='cf-cart-recovery__item' data-thumb={item.image ? '' : undefined}>
{item.image ? (
<span className='cf-cart-recovery__thumb'>
<img src={item.image} alt={item.imageAlt ?? item.name} width={64} height={64} loading='lazy' decoding='async' />
</span>
) : null}
<span className='cf-cart-recovery__itext'>
<span className='cf-cart-recovery__iname'>{item.name}</span>
{item.detail ? <span className='cf-cart-recovery__idetail'>{item.detail}</span> : null}
{item.value ? <span className='cf-cart-recovery__ivalue'>{itemValue.replace('{value}', item.value)}</span> : null}
</span>
</li>
))}
</ul>
</div>
</Stop>
<Stop index={1} reached={reached} icon={Tag} register={register}>
<div className='cf-cart-recovery__value'>
<h3 className='cf-cart-recovery__h3'>{valueHeading}</h3>
<p className='cf-cart-recovery__num cf-cart-recovery__num--value'>{totalValue}</p>
<p className='cf-cart-recovery__turn'>{valueTurn}</p>
<div className='cf-cart-recovery__today'>
<p className='cf-cart-recovery__today-label'>{todayLabel}</p>
<p className='cf-cart-recovery__num cf-cart-recovery__num--price'>{price}</p>
{priceNote ? <p className='cf-cart-recovery__note'>{priceNote}</p> : null}
</div>
{incentive ? (
<div className='cf-cart-recovery__incentive'>
<Gift className='cf-cart-recovery__incentive-icon' size={20} strokeWidth={2.5} aria-hidden='true' />
<div>
<p className='cf-cart-recovery__incentive-title'>{incentive.title}</p>
{incentive.detail ? <p className='cf-cart-recovery__incentive-detail'>{incentive.detail}</p> : null}
{incentive.code ? (
<p className='cf-cart-recovery__code'>
<span>{incentiveCodeLabel}</span>
<span className='cf-cart-recovery__chip'>{incentive.code}</span>
</p>
) : null}
</div>
</div>
) : null}
</div>
</Stop>
<Stop index={2} reached={reached} icon={ShieldCheck} register={register}>
<div className='cf-cart-recovery__guarantee'>
{guaranteeImage ? (
<img className='cf-cart-recovery__seal' src={guaranteeImage} alt={guaranteeImageAlt} width={104} height={104} loading='lazy' decoding='async' />
) : null}
<h3 className='cf-cart-recovery__h3'>{guaranteeHeading}</h3>
<p className='cf-cart-recovery__text'>{guaranteeText}</p>
</div>
</Stop>
<Stop index={3} reached={reached} icon={CreditCard} register={register} last>
<div className='cf-cart-recovery__card cf-cart-recovery__action'>
{productImage ? (
<img className='cf-cart-recovery__product' src={productImage} alt={productImageAlt} width={320} height={150} loading='lazy' decoding='async' />
) : null}
<h3 className='cf-cart-recovery__h3'>{actionHeading}</h3>
<p className='cf-cart-recovery__action-text'>{actionText}</p>
{href ? (
<a
className='cf-cart-recovery__btn'
data-state={forced}
href={isDisabled ? undefined : href}
aria-disabled={isDisabled || undefined}
tabIndex={isDisabled ? -1 : undefined}
onClick={handleClick}
>
{label}
</a>
) : (
<button type='button' className='cf-cart-recovery__btn' data-state={forced} disabled={isDisabled} onClick={handleClick}>
{label}
</button>
)}
{reassurance ? (
<p className='cf-cart-recovery__reassure'>
<Lock className='cf-cart-recovery__inl' size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
</div>
</Stop>
</ol>
</div>
</section>
);
}
export default CartRecovery;
type StopProps = {
index: number;
reached: number;
icon: LucideIcon;
register: (i: number, el: HTMLLIElement | null) => void;
last?: boolean;
children: React.ReactNode;
};
function Stop({ index, reached, icon: Icon, register, last, children }: StopProps) {
return (
<li
ref={(el) => {
register(index, el);
}}
data-stop={index}
className={last ? 'cf-cart-recovery__stop cf-cart-recovery__stop--last' : 'cf-cart-recovery__stop'}
style={{ '--i': index } as React.CSSProperties}
>
<span className='cf-cart-recovery__node' data-on={reached >= index ? '' : undefined} aria-hidden='true'>
<Icon size={20} strokeWidth={2.5} />
</span>
{last ? null : <span className='cf-cart-recovery__seg' data-on={reached > index ? '' : undefined} aria-hidden='true' />}
<div className='cf-cart-recovery__body'>{children}</div>
</li>
);
}
function markPhrase(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-cart-recovery__mark'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
const DEFAULT_ITEMS: CartRecoveryItem[] = [
{ name: 'Funnel Planning Guide', detail: 'Map your offer and the pages your funnel needs.', value: '$49' },
{ name: 'Page Copy Workbook', detail: 'Draft your headline, offer, and call to action.', value: '$29' },
{ name: 'Launch Checklist', detail: 'Review the links, forms, and next steps before launch.', value: '$19' },
];
const DEFAULT_GUARANTEE: React.ReactNode = (
<>
Get the kit and put it to work. If it isn’t right for you, ask within 30 days and <strong>you get every penny back</strong>.
</>
);
const CSS = `
.cf-cart-recovery{--cr-gap:32px;--cr-ease:cubic-bezier(.2,.7,.2,1);--cr-shadow:var(--shadow,oklch(0.22 0.03 260));--cr-hair:oklch(from var(--ink,#1b2333) l c h / .12);--cr-marker:color-mix(in oklch,var(--marker,#fae37c) 82%,var(--surface,#ffffff));position:relative;isolation:isolate;overflow:hidden;background:var(--surface,#ffffff);color:var(--ink,#1b2333);font-family:var(--font-body,system-ui,sans-serif);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-cart-recovery *,.cf-cart-recovery *::before,.cf-cart-recovery *::after{box-sizing:border-box}
:where(.cf-cart-recovery p){margin:0}
.cf-cart-recovery__inner{position:relative;z-index:1;max-width:1120px;margin:0 auto}
.cf-cart-recovery__head{max-width:46rem;margin:0 auto;text-align:center}
.cf-cart-recovery__title{margin:0 0 clamp(14px,1.6vw,22px);font-family:var(--font-display,inherit);font-size:clamp(2.5rem,5.4vw,4.875rem);line-height:1.04;font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);color:var(--ink,#1b2333);text-wrap:balance}
.cf-cart-recovery__mark{background-image:linear-gradient(transparent 52%,var(--cr-marker) 52%,var(--cr-marker) 92%,transparent 92%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0 .1em;margin:0 -.04em;border-radius:.12em .2em .14em .22em}
.cf-cart-recovery__lead{margin:0 auto;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted,#4a5568);text-wrap:pretty}
.cf-cart-recovery__path{list-style:none;margin:clamp(40px,5vw,64px) auto 0;padding:0;max-width:46rem;display:grid;gap:var(--cr-gap)}
.cf-cart-recovery__stop{position:relative;display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:16px;align-items:start;animation:cfcr-rise .45s var(--cr-ease) both;animation-delay:min(calc(var(--i) * .07s),.28s)}
.cf-cart-recovery__node{position:relative;z-index:1;width:40px;height:40px;border-radius:999px;display:grid;place-items:center;background:color-mix(in oklch,var(--ink,#1b2333) 6%,var(--surface,#ffffff));color:var(--muted,#4a5568);box-shadow:inset 0 0 0 1px var(--cr-hair);transition:background-color .3s ease calc(var(--i) * .3s),color .3s ease calc(var(--i) * .3s),box-shadow .2s ease}
.cf-cart-recovery__node[data-on]{background:var(--accent-fill,var(--accent,#2f5fd0));color:var(--accent-fill-ink,var(--card,#ffffff));box-shadow:0 1px 2px oklch(from var(--cr-shadow) l c h / .3),0 4px 8px -3px oklch(from var(--cr-shadow) l c h / .35);animation:cfcr-pop .3s var(--cr-ease) calc(var(--i) * .3s) both}
.cf-cart-recovery__stop:hover .cf-cart-recovery__node,.cf-cart-recovery__stop:focus-within .cf-cart-recovery__node{box-shadow:inset 0 0 0 1px var(--cr-hair),0 0 0 4px oklch(from var(--accent-fill,var(--accent,#2f5fd0)) l c h / .2)}
.cf-cart-recovery__stop:hover .cf-cart-recovery__node[data-on],.cf-cart-recovery__stop:focus-within .cf-cart-recovery__node[data-on]{box-shadow:0 1px 2px oklch(from var(--cr-shadow) l c h / .3),0 0 0 4px oklch(from var(--accent-fill,var(--accent,#2f5fd0)) l c h / .22)}
.cf-cart-recovery__seg{position:absolute;left:18.5px;top:46px;bottom:calc(6px - var(--cr-gap));width:3px;border-radius:3px;background:var(--cr-hair);overflow:hidden}
.cf-cart-recovery__seg::after{content:'';position:absolute;inset:0;border-radius:inherit;background:var(--accent-fill,var(--accent,#2f5fd0));transform:scaleY(0);transform-origin:top;transition:transform .3s var(--cr-ease) calc(var(--i) * .3s + .05s)}
.cf-cart-recovery__seg[data-on]::after{transform:none}
.cf-cart-recovery__body{min-width:0}
.cf-cart-recovery__value,.cf-cart-recovery__guarantee{padding-top:6px}
.cf-cart-recovery__h3{margin:0 0 8px;font-family:var(--font-display,inherit);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);color:inherit;text-wrap:balance}
.cf-cart-recovery__card{background:var(--card,#ffffff);color:var(--ink,#1b2333);border:1px solid var(--card-border,oklch(from var(--ink,#1b2333) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-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)));padding:clamp(20px,2.4vw,28px)}
.cf-cart-recovery__meta{font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted,#4a5568)}
.cf-cart-recovery__items{list-style:none;margin:16px 0 0;padding:0}
.cf-cart-recovery__item{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;align-items:start;padding:14px 0;border-top:1px solid var(--cr-hair)}
.cf-cart-recovery__item[data-thumb]{grid-template-columns:64px minmax(0,1fr)}
.cf-cart-recovery__item:last-child{padding-bottom:0}
.cf-cart-recovery__thumb{display:block;width:64px;height:64px;border-radius:8px;overflow:hidden;background:color-mix(in oklch,var(--ink,#1b2333) 4%,var(--card,#ffffff))}
.cf-cart-recovery__thumb img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;transition:transform .3s var(--cr-ease)}
.cf-cart-recovery__item:hover .cf-cart-recovery__thumb img{transform:scale(1.05)}
.cf-cart-recovery__itext{display:grid;gap:2px;min-width:0}
.cf-cart-recovery__iname{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:700;color:var(--ink,#1b2333);text-wrap:balance}
.cf-cart-recovery__idetail{font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--muted,#4a5568);text-wrap:pretty}
.cf-cart-recovery__ivalue{margin-top:4px;font-size:.875rem;line-height:1.2;font-weight:800;color:var(--ink,#1b2333);font-variant-numeric:tabular-nums}
.cf-cart-recovery__num{font-family:var(--font-display,inherit);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;font-weight:var(--display-weight,800);letter-spacing:-0.03em;font-variant-numeric:tabular-nums}
.cf-cart-recovery__num--value{margin:8px 0 14px;color:var(--muted,#4a5568)}
.cf-cart-recovery__turn{margin:0 0 16px;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.3;font-weight:800;color:var(--ink,#1b2333);text-wrap:balance}
.cf-cart-recovery__today{padding:16px 18px;border-radius:10px;background:color-mix(in oklch,var(--ink,#1b2333) 4%,var(--surface,#ffffff))}
.cf-cart-recovery__today-label{font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--ink,#1b2333)}
.cf-cart-recovery__num--price{margin:12px 0 14px;color:var(--accent,#2f5fd0)}
.cf-cart-recovery__note{font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted,#4a5568);text-wrap:pretty}
.cf-cart-recovery__incentive{display:grid;grid-template-columns:20px minmax(0,1fr);gap:12px;margin-top:12px;padding:14px 16px;border-radius:10px;background:color-mix(in oklch,var(--accent,#2f5fd0) 10%,var(--surface,#ffffff));color:var(--ink,#1b2333)}
.cf-cart-recovery__incentive-icon{margin-top:2px;color:var(--accent,#2f5fd0)}
.cf-cart-recovery__incentive-title{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.3;font-weight:800;text-wrap:balance}
.cf-cart-recovery__incentive-detail{margin-top:4px;font-size:.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-cart-recovery__code{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;font-size:.875rem;line-height:1.2;font-weight:800}
.cf-cart-recovery__chip{display:inline-flex;align-items:center;min-height:28px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink,#1b2333) 6%,var(--card,#ffffff));color:var(--ink,#1b2333);letter-spacing:.06em;font-variant-numeric:tabular-nums}
.cf-cart-recovery__seal{display:block;width:80px;height:80px;object-fit:contain;margin:0 0 14px;filter:drop-shadow(0 2px 3px oklch(from var(--cr-shadow) l c h / .28)) drop-shadow(0 8px 12px oklch(from var(--cr-shadow) l c h / .18))}
.cf-cart-recovery__text{font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink,#1b2333);text-wrap:pretty}
.cf-cart-recovery__text strong{font-weight:800}
.cf-cart-recovery__action{text-align:center;border-color:oklch(from var(--accent-fill,var(--accent,#2f5fd0)) l c h / .45);box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / .22),0 12px 24px -8px oklch(0.22 0.03 260 / .32)))}
.cf-cart-recovery__product{display:block;width:100%;height:clamp(120px,11vw,150px);object-fit:contain;margin:0 0 16px;filter:drop-shadow(0 2px 3px oklch(from var(--cr-shadow) l c h / .26)) drop-shadow(0 10px 14px oklch(from var(--cr-shadow) l c h / .2))}
.cf-cart-recovery__action-text{margin:0 auto;max-width:32ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink,#1b2333);text-wrap:pretty}
.cf-cart-recovery__btn{--cr-b:var(--button-bg,var(--cta,#d2382c));--cr-b2:var(--button-bg-2,var(--cta-2,var(--button-bg,var(--cta,#b52d23))));position:relative;display:flex;align-items:center;justify-content:center;width:100%;min-height:64px;margin-top:20px;padding:12px 20px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--cr-b) calc(l + .04) c h),oklch(from var(--cr-b2) calc(l - .02) c h));color:var(--button-ink,var(--cta-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.3vw,1.25rem);line-height:1.15;letter-spacing:-0.005em;text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cr-b) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--cr-b) calc(l - .16) c h),0 1px 2px oklch(from var(--cr-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--cr-shadow) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
.cf-cart-recovery__btn:hover:not(:disabled):not([aria-disabled=true]),.cf-cart-recovery__btn[data-state=hover]{transform:translateY(-1px);background:linear-gradient(oklch(from var(--cr-b) calc(l - .01) c h),oklch(from var(--cr-b2) calc(l - .07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--cr-b) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--cr-b) calc(l - .2) c h),0 1px 2px oklch(from var(--cr-shadow) l c h / .34),0 12px 20px -8px oklch(from var(--cr-shadow) l c h / .55))}
.cf-cart-recovery__btn:active:not(:disabled):not([aria-disabled=true]),.cf-cart-recovery__btn[data-state=active]{transform:translateY(1px);background:linear-gradient(oklch(from var(--cr-b) calc(l - .04) c h),oklch(from var(--cr-b2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--cr-b) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--cr-b) calc(l - .16) c h),0 1px 2px oklch(from var(--cr-shadow) l c h / .3)}
.cf-cart-recovery__btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent,#2f5fd0)) l c h / .55);outline-offset:3px}
.cf-cart-recovery__btn:disabled,.cf-cart-recovery__btn[aria-disabled=true]{cursor:not-allowed;transform:none;background:var(--button-2-bg,var(--secondary,#e6e9ef));color:var(--button-2-ink,var(--secondary-ink,#1b2333));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / .2)))}
.cf-cart-recovery__reassure{margin-top:12px;font-size:.9375rem;line-height:1.4;font-weight:600;color:var(--muted,#4a5568);text-wrap:pretty}
.cf-cart-recovery__inl{display:inline-block;vertical-align:-0.15em;margin-inline-end:.4em}
@media (max-width:560px){
.cf-cart-recovery__stop--last{grid-template-columns:minmax(0,1fr);row-gap:16px}
.cf-cart-recovery__btn{padding:12px 16px}
}
@media (max-width:480px){
.cf-cart-recovery__stop{column-gap:14px}
.cf-cart-recovery__item[data-thumb]{grid-template-columns:56px minmax(0,1fr);gap:12px}
.cf-cart-recovery__thumb{width:56px;height:56px}
}
@media (min-width:1180px){
.cf-cart-recovery{--cr-gap:24px}
.cf-cart-recovery__path{max-width:none;grid-template-columns:minmax(0,1.45fr) minmax(0,.95fr) minmax(0,.95fr) minmax(0,1.35fr)}
.cf-cart-recovery__stop{grid-template-columns:minmax(0,1fr);row-gap:20px}
.cf-cart-recovery__seg{left:46px;top:18.5px;right:calc(6px - var(--cr-gap));bottom:auto;width:auto;height:3px}
.cf-cart-recovery__seg::after{transform:scaleX(0);transform-origin:left}
.cf-cart-recovery__value,.cf-cart-recovery__guarantee{padding-top:29px}
.cf-cart-recovery__guarantee{padding-top:13px}
.cf-cart-recovery__seal{width:104px;height:104px}
}
@media (prefers-reduced-motion:reduce){
.cf-cart-recovery__stop,.cf-cart-recovery__node[data-on]{animation:none}
.cf-cart-recovery__node,.cf-cart-recovery__seg::after,.cf-cart-recovery__btn,.cf-cart-recovery__thumb img{transition:none}
.cf-cart-recovery__btn:hover:not(:disabled):not([aria-disabled=true]),.cf-cart-recovery__btn[data-state=hover],.cf-cart-recovery__btn:active:not(:disabled):not([aria-disabled=true]),.cf-cart-recovery__btn[data-state=active]{transform:none}
.cf-cart-recovery__item:hover .cf-cart-recovery__thumb img{transform:none}
}
@keyframes cfcr-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cfcr-pop{from{transform:scale(.9)}to{transform:none}}
`;
pieces/offer/cart-recovery/specimen.tsx 32 lines
import __studioImage0f36977f from "../assets/971fee094e926bad.webp";
import __studioImaged642695a from "../assets/9cc250ae822c4170.webp";
import { CartRecovery, type CartRecoveryProps } from '../cart-recovery';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled'];
export default function CartRecoverySpecimen({ state }: { state?: CartRecoveryProps['state'] }) {
const s = defaults.sample;
return (
<CartRecovery
state={state}
productName={s.name}
lead={`${s.name} is still in your cart. Finish your order and start planning your first funnel today.`}
items={s.items.map((item, i) => ({
name: item.name,
detail: item.detail,
value: item.value,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
totalValue={s.regularPrice}
price={s.price}
priceNote={s.note}
guaranteeImage={slot('seal-guarantee', __studioImage0f36977f)}
productImage={slot('product', __studioImaged642695a)}
productImageAlt={s.name}
reassurance={s.sublabel}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalCartRecovery |
string |
|
highlight OptionalCartRecovery |
string |
|
headingLevel OptionalCartRecovery |
1 | 2 |
|
lead OptionalCartRecovery |
string |
|
productName OptionalCartRecovery |
string |
|
items OptionalCartRecovery |
CartRecoveryItem[] |
|
itemCount OptionalCartRecovery |
string |
|
itemCountOne OptionalCartRecovery |
string |
|
itemValue OptionalCartRecovery |
string |
|
valueHeading OptionalCartRecovery |
string |
|
totalValue OptionalCartRecovery |
string |
|
valueTurn OptionalCartRecovery |
string |
|
todayLabel OptionalCartRecovery |
string |
|
price OptionalCartRecovery |
string |
|
priceNote OptionalCartRecovery |
string |
|
incentive OptionalCartRecovery |
CartRecoveryIncentive |
|
incentiveCodeLabel OptionalCartRecovery |
string |
|
guaranteeHeading OptionalCartRecovery |
string |
|
guaranteeText OptionalCartRecovery |
React.ReactNode |
|
guaranteeImage OptionalCartRecovery |
string |
|
guaranteeImageAlt OptionalCartRecovery |
string |
|
actionHeading OptionalCartRecovery |
string |
|
actionText OptionalCartRecovery |
React.ReactNode |
|
productImage OptionalCartRecovery |
string |
|
productImageAlt OptionalCartRecovery |
string |
|
label OptionalCartRecovery |
string |
|
reassurance OptionalCartRecovery |
string |
|
href OptionalCartRecovery |
string |
|
onAction OptionalCartRecovery |
() => void |
|
disabled OptionalCartRecovery |
boolean |
|
state OptionalCartRecovery |
'default' | 'hover' | 'active' | 'disabled' |
|
className OptionalCartRecovery |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
product- The main product shot or cover (ebook, kit, bottle).
seal-guarantee- The money-back guarantee seal, on a transparent background.
-
971fee094e926bad.webp
image/webp · 305 KB
-
9cc250ae822c4170.webp
image/webp · 169 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB