Stack Recap 1
Stack recap: lists every item with its value in a letter voice, strikes the total, clips today's saving as a coupon and closes on the price with a risk-first buy button.
Use it in a prompt
Use content/stack-recap 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/content/stack-recap.tsx. - Import it and pass your copy and images (Props tab):
import { StackRecap } from "@/components/funneldna/content/stack-recap"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/stack-recap/component.tsx 367 lines
// layout: sticky-offer-side
// Stack recap: lists every item with its value in a letter voice, strikes the total, clips today's saving as a coupon and closes on the price with a risk-first buy button.
import * as React from "react"
import { Scissors, ShieldCheck } from "lucide-react"
export type StackRecapItem = {
/** Item name, shown as the row heading */
name: string
/** One-line description under the name */
detail?: string
/** Stand-alone value of this item, e.g. "$49" */
value?: string
/** Item photo (slot item-n), shown as a rounded tile */
image?: string
/** Alt text for the photo; defaults to the item name */
imageAlt?: string
}
export type StackRecapProps = {
/** Recap headline */
headline?: string
/** Phrase inside the headline that gets the marker stroke */
highlight?: string
/** Letter salutation above the intro */
salutation?: string
/** Short letter paragraphs before the items */
intro?: string[]
/** Every item in the stack, in the order they are recapped */
items?: StackRecapItem[]
/** Small word after each item's value */
valueLabel?: string
/** Closing line of the letter, before the signature */
signOff?: string
/** Owner's name in the signature face; hidden when empty */
signatureName?: string
/** Owner's role under the signature; hidden when empty */
signatureRole?: string
/** Offer name heading the price card */
productName?: string
/** Label before the struck total value */
totalLabel?: string
/** Combined value, shown struck through */
totalValue?: string
/** Saving carried by the coupon; computed from totalValue and price when omitted, hidden when empty */
saving?: string
/** Coupon headline; {saving} is replaced */
couponText?: string
/** Small line under the coupon headline */
couponNote?: string
/** Line above today's price */
todayLabel?: string
price?: string
/** Payment terms under the price */
priceNote?: string
/** Risk reversal that leads the action */
riskLead?: string
/** Rest of the risk reversal after the lead */
riskText?: string
/** Button label; {price} is replaced */
label?: string
/** Small line inside the button under the label */
sublabel?: string
/** Underlined text link under the button; hidden when empty */
linkLabel?: string
/** Checkout destination for the button and link */
href?: string
/** Called when the button or link is clicked */
onAction?: (event: React.MouseEvent<HTMLElement>) => void
disabled?: boolean
state?: "default" | "hover" | "active" | "disabled"
className?: string
}
export function StackRecap({
headline = "Let’s recap everything you get",
highlight = "everything you get",
salutation = "Dear friend,",
intro = DEFAULT_INTRO,
items = DEFAULT_ITEMS,
valueLabel = "value",
signOff = "To your first launch,",
signatureName = "",
signatureRole = "",
productName = "The Funnel Starter Kit",
totalLabel = "Total value",
totalValue = "$97",
saving,
couponText = "{saving} off",
couponNote = "the total value, clipped for you today",
todayLabel = "Today, the complete kit",
price = "$47",
priceNote = "One payment · Lifetime access",
riskLead = "Try it for 30 days.",
riskText = "If it isn’t right for you, ask for your money back.",
label = "Try The Kit For {price}",
sublabel = "Secure checkout · Instant download",
linkLabel = "Add to cart",
href,
onAction,
disabled = false,
state = "default",
className,
}: StackRecapProps) {
const uid = React.useId()
const titleId = `${uid}-title`
const offerTitleId = `${uid}-offer`
const isDisabled = disabled || state === "disabled"
const forcedState = state === "hover" || state === "active" ? state : undefined
const savingText = saving ?? computeSaving(totalValue, price)
const couponHeadline = savingText ? fill(couponText, { saving: savingText }) : ""
const buttonLabel = fill(label, { price })
const rootClass = ["cf-stack-recap", className].filter(Boolean).join(" ")
const asLink = Boolean(href) && !isDisabled
const buttonInner = (
<>
<span className="cf-stack-recap__btn-main">{buttonLabel}</span>
{sublabel ? <span className="cf-stack-recap__btn-sub">{sublabel}</span> : null}
</>
)
return (
<div className={rootClass}>
<style>{CSS}</style>
<div className="cf-stack-recap__main">
<h2 id={titleId} className="cf-stack-recap__title">
{markPhrase(headline, highlight)}
</h2>
{salutation || intro.length > 0 ? (
<div className="cf-stack-recap__letter">
{salutation ? <p className="cf-stack-recap__salute">{salutation}</p> : null}
{intro.map((paragraph, i) => (
<p key={i}>{paragraph}</p>
))}
</div>
) : null}
<ul className="cf-stack-recap__list" aria-labelledby={titleId}>
{items.map((item, i) => (
<li
key={`${item.name}-${i}`}
className={item.image ? "cf-stack-recap__item" : "cf-stack-recap__item cf-stack-recap__item--plain"}
style={{ ["--i" as string]: i } as React.CSSProperties}
>
{item.image ? (
<img
className="cf-stack-recap__thumb"
src={item.image}
alt={item.imageAlt ?? item.name}
width={192}
height={192}
loading="lazy"
decoding="async"
/>
) : null}
<div className="cf-stack-recap__copy">
<h3 className="cf-stack-recap__name">{item.name}</h3>
{item.detail ? <p className="cf-stack-recap__detail">{item.detail}</p> : null}
</div>
{item.value ? (
<p className="cf-stack-recap__value">
<span className="cf-stack-recap__amt">{item.value}</span>
<span className="cf-stack-recap__amt-label">{valueLabel}</span>
</p>
) : null}
</li>
))}
</ul>
{signOff || signatureName ? (
<div className="cf-stack-recap__signoff">
{signOff ? <p className="cf-stack-recap__closing">{signOff}</p> : null}
{signatureName ? <p className="cf-stack-recap__sig">{signatureName}</p> : null}
{signatureRole ? <p className="cf-stack-recap__role">{signatureRole}</p> : null}
</div>
) : null}
</div>
<div className="cf-stack-recap__aside">
<div className="cf-stack-recap__offer" role="group" aria-labelledby={offerTitleId}>
<h3 id={offerTitleId} className="cf-stack-recap__product">
{productName}
</h3>
{totalValue ? (
<p className="cf-stack-recap__total">
<span>{totalLabel}</span>
<s className="cf-stack-recap__was">{totalValue}</s>
</p>
) : null}
{couponHeadline ? (
<div className="cf-stack-recap__coupon">
<span className="cf-stack-recap__scissors" aria-hidden="true">
<Scissors />
</span>
<p className="cf-stack-recap__save">{couponHeadline}</p>
{couponNote ? <p className="cf-stack-recap__save-note">{couponNote}</p> : null}
</div>
) : null}
{todayLabel ? <p className="cf-stack-recap__today">{todayLabel}</p> : null}
<p className="cf-stack-recap__price">{price}</p>
{priceNote ? <p className="cf-stack-recap__note">{priceNote}</p> : null}
{riskLead || riskText ? (
<p className="cf-stack-recap__risk">
<ShieldCheck className="cf-stack-recap__risk-icon" aria-hidden="true" />
<span>
{riskLead ? <strong>{riskLead}</strong> : null}
{riskLead && riskText ? " " : null}
{riskText}
</span>
</p>
) : null}
{asLink ? (
<a className="cf-stack-recap__btn" href={href} data-state={forcedState} onClick={onAction}>
{buttonInner}
</a>
) : (
<button
type="button"
className="cf-stack-recap__btn"
data-state={forcedState}
disabled={isDisabled}
onClick={onAction}
>
{buttonInner}
</button>
)}
{linkLabel ? (
asLink ? (
<a className="cf-stack-recap__link" href={href} onClick={onAction}>
{linkLabel}
</a>
) : (
<button type="button" className="cf-stack-recap__link" disabled={isDisabled} onClick={onAction}>
{linkLabel}
</button>
)
) : null}
</div>
</div>
</div>
)
}
export default StackRecap
const DEFAULT_INTRO = [
"Before you decide, here’s every piece of the kit in one place, with what each one is worth on its own.",
"Picture your first funnel planned, written and checked before launch. This is what gets you there.",
]
const DEFAULT_ITEMS: StackRecapItem[] = [
{ 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" },
]
/** Replaces each named {placeholder} in a copy template with its value. */
function fill(template: string, values: Record<string, string>) {
return Object.keys(values).reduce((out, key) => out.split(`{${key}}`).join(values[key]), template)
}
/** Reads a leading currency symbol and amount from text such as "$1,297". */
function parseMoney(text: string) {
const match = text.match(/^\s*([^\d\s.,-]*)\s*([\d,]+(?:\.\d+)?)/)
if (!match) return null
const amount = Number(match[2].replace(/,/g, ""))
return Number.isFinite(amount) ? { symbol: match[1], amount } : null
}
/** Total minus price in the same currency; empty when it can't be worked out or isn't a saving. */
function computeSaving(total: string, price: string) {
const was = parseMoney(total)
const now = parseMoney(price)
if (!was || !now || was.symbol !== now.symbol || was.amount <= now.amount) return ""
const diff = was.amount - now.amount
const digits = Number.isInteger(diff) ? 0 : 2
return `${was.symbol}${diff.toLocaleString("en-US", { minimumFractionDigits: digits, maximumFractionDigits: digits })}`
}
/** Wraps the first occurrence of phrase in the marker span. */
function markPhrase(text: string, phrase: string) {
if (!phrase) return text
const at = text.indexOf(phrase)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className="cf-stack-recap__mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
// Theme notes: every colour reads a contract token or an OKLCH recipe on one. The only hex is the documented
// marker default inside var(--marker, …). The signature face comes from --signature-face, else the display face.
const CSS = `
.cf-stack-recap{--sr-shadow:var(--shadow,oklch(0.22 0.03 260));--sr-line:oklch(from var(--ink) l c h / 0.12);--sr-well:color-mix(in oklch,var(--ink) 5%,var(--card));--sr-soft-ink:color-mix(in oklch,var(--ink) 78%,var(--card));--signature-font:var(--signature-face,var(--font-display));display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(2.25rem,4vw,3.75rem);align-items:start;width:100%;color:var(--ink);font-family:var(--font-body);font-size:1rem;line-height:1.55}
.cf-stack-recap *,.cf-stack-recap *::before,.cf-stack-recap *::after{box-sizing:border-box}
.cf-stack-recap :where(h2,h3,p,ul){margin:0;padding:0}
.cf-stack-recap__main{min-width:0}
.cf-stack-recap__title{margin-bottom:clamp(1rem,1.6vw,1.3rem);font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.02em);font-size:clamp(2.125rem,1.35rem + 2.9vw,3.5rem);line-height:1.05;color:var(--ink);text-wrap:balance}
.cf-stack-recap__mark{padding:0 .06em;margin:0 -.03em;border-radius:.18em .32em .22em .28em;background-image:linear-gradient(to bottom,transparent 50%,color-mix(in oklch,var(--marker,#fae37c) 85%,transparent) 50%,color-mix(in oklch,var(--marker,#fae37c) 85%,transparent) 94%,transparent 94%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-stack-recap__letter{max-width:62ch;margin-bottom:clamp(1.5rem,3vw,2.25rem)}
.cf-stack-recap__letter p{font-size:1.125rem;line-height:1.6;color:var(--ink);text-wrap:pretty}
.cf-stack-recap__letter p+p{margin-top:.7rem}
.cf-stack-recap__salute{font-weight:700}
.cf-stack-recap__list{list-style:none;overflow:hidden;border:1px solid var(--card-border,color-mix(in oklch,var(--ink) 12%,transparent));border-radius:var(--card-radius,var(--radius,14px));background:var(--card);color:var(--ink);box-shadow:var(--card-shadow,var(--shadow-sm,0 1px 1px oklch(from var(--sr-shadow) l c h / 0.18),0 1px 3px oklch(from var(--sr-shadow) l c h / 0.14)))}
.cf-stack-recap__item{display:grid;grid-template-columns:clamp(72px,7vw,96px) minmax(0,1fr) auto;column-gap:clamp(1rem,2vw,1.4rem);align-items:start;padding:clamp(1rem,1.8vw,1.25rem) clamp(1rem,2.2vw,1.5rem);border-top:1px solid var(--sr-line);transition:background-color .2s ease}
.cf-stack-recap__item:first-child{border-top:0}
.cf-stack-recap__item:hover{background:color-mix(in oklch,var(--ink) 2.5%,var(--card))}
.cf-stack-recap__item--plain{grid-template-columns:minmax(0,1fr) auto}
.cf-stack-recap__thumb{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:cover;object-position:center;border-radius:calc(var(--card-radius,var(--radius,14px)) * .6);outline:1px solid oklch(from var(--ink) l c h / 0.08);outline-offset:-1px;transition:transform .3s cubic-bezier(.2,.7,.2,1)}
.cf-stack-recap__item:hover .cf-stack-recap__thumb{transform:translateY(-2px)}
.cf-stack-recap__copy{min-width:0;padding-top:.2rem}
.cf-stack-recap__name{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.1875rem,1.05rem + .5vw,1.375rem);line-height:1.2;color:var(--ink);text-wrap:balance}
.cf-stack-recap__detail{margin-top:.35rem;font-size:1.0625rem;line-height:1.45;color:var(--muted);text-wrap:pretty}
.cf-stack-recap__value{display:inline-flex;align-items:baseline;gap:.35rem;margin-top:.15rem;padding:.4rem .8rem;border-radius:999px;background:var(--sr-well);white-space:nowrap;font-variant-numeric:tabular-nums}
.cf-stack-recap__amt{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.25rem;line-height:1.1;color:var(--ink)}
.cf-stack-recap__amt-label{font-size:.875rem;font-weight:600;line-height:1.1;color:var(--sr-soft-ink)}
.cf-stack-recap__signoff{margin-top:clamp(1.5rem,3vw,2rem)}
.cf-stack-recap__closing{font-size:1.125rem;line-height:1.5;color:var(--ink)}
.cf-stack-recap__sig{margin-top:.9rem;font-family:var(--signature-font);font-weight:400;font-size:clamp(2.5rem,2rem + 1.6vw,3.25rem);line-height:1.15;color:var(--signature-ink,var(--accent))}
.cf-stack-recap__role{margin-top:.85rem;font-size:.9375rem;color:var(--muted)}
.cf-stack-recap__aside{min-width:0;width:100%;max-width:34rem;justify-self:center}
.cf-stack-recap__offer{position:relative;width:100%;margin-inline:auto;padding:clamp(1.4rem,3vw,2.1rem) clamp(1.15rem,2.6vw,1.9rem);border:1px solid var(--card-border,color-mix(in oklch,var(--ink) 12%,transparent));border-radius:var(--card-radius,var(--radius,14px));background:var(--card);color:var(--ink);text-align:center;box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--sr-shadow) l c h / 0.22),0 12px 24px -8px oklch(from var(--sr-shadow) l c h / 0.32)))}
.cf-stack-recap__product{margin-bottom:.85rem;font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.01em);font-size:clamp(1.45rem,1.2rem + .9vw,1.85rem);line-height:1.15;color:var(--ink);text-wrap:balance}
.cf-stack-recap__total{display:flex;flex-wrap:wrap;justify-content:center;align-items:baseline;gap:.25rem .7rem;margin-bottom:1.6rem;font-size:1.0625rem;font-weight:700;color:var(--ink)}
.cf-stack-recap__was{position:relative;display:inline-block;padding-inline:.15em;text-decoration:none;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:1.5rem;line-height:1.1;color:var(--muted);font-variant-numeric:tabular-nums}
.cf-stack-recap__was::after{content:'';position:absolute;left:-.1em;right:-.1em;top:50%;height:.13em;margin-top:-.065em;border-radius:99px;background:var(--danger);transform:rotate(-9deg);transform-origin:left center}
.cf-stack-recap__coupon{position:relative;margin-bottom:1.4rem;padding:1.2rem 1rem 1rem;border:2px dashed oklch(from var(--ink) l c h / 0.3);border-radius:calc(var(--radius,12px) * .75);background:var(--sr-well)}
.cf-stack-recap__scissors{position:absolute;top:-1px;left:1rem;display:grid;place-items:center;width:2rem;height:1.5rem;transform:translateY(-50%);background:linear-gradient(var(--card) 50%,var(--sr-well) 50%);color:var(--muted);transition:transform .45s cubic-bezier(.2,.7,.2,1)}
.cf-stack-recap__scissors svg{width:1.25rem;height:1.25rem}
.cf-stack-recap__offer:hover .cf-stack-recap__scissors{transform:translate(.6rem,-50%)}
.cf-stack-recap__save{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(1.75rem,1.45rem + 1vw,2.125rem);line-height:1.05;color:var(--success);font-variant-numeric:tabular-nums}
.cf-stack-recap__save-note{margin-top:.85rem;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--ink);text-wrap:pretty}
.cf-stack-recap__today{font-size:1.0625rem;font-weight:600;color:var(--muted)}
.cf-stack-recap__price{margin-top:1rem;font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(4rem,3.2rem + 3vw,5.5rem);line-height:.95;letter-spacing:-.035em;font-variant-numeric:tabular-nums;color:var(--ink)}
.cf-stack-recap__note{margin-top:.8rem;font-size:1rem;font-weight:600;color:var(--ink)}
.cf-stack-recap__risk{display:flex;align-items:flex-start;justify-content:center;gap:.55rem;max-width:30rem;margin:1.4rem auto 1rem;text-align:left;font-size:1rem;line-height:1.45;color:var(--ink);text-wrap:pretty}
.cf-stack-recap__risk strong{font-weight:800}
.cf-stack-recap__risk-icon{flex:none;width:1.4rem;height:1.4rem;color:var(--success)}
.cf-stack-recap__btn{--sr-btn:var(--button-bg,var(--cta));font:inherit;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.2rem;width:100%;min-height:4.25rem;margin:0;padding:.9rem 1.25rem;border:1px solid oklch(from var(--sr-btn) calc(l - 0.12) c h);border-radius:var(--button-radius,var(--radius,10px));background:linear-gradient(oklch(from var(--sr-btn) calc(l + 0.04) c h),var(--button-bg-2,var(--cta-2)));color:var(--button-ink,var(--cta-ink));text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--sr-btn) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--sr-btn) calc(l - 0.16) c h),0 1px 2px oklch(from var(--sr-shadow) l c h / 0.3),0 6px 14px -4px oklch(from var(--sr-shadow) l c h / 0.38));cursor:pointer;transition:transform .15s ease,background .15s ease,box-shadow .15s ease}
.cf-stack-recap__btn:hover:not(:disabled),.cf-stack-recap__btn[data-state='hover']{transform:translateY(-1px);background:linear-gradient(oklch(from var(--sr-btn) calc(l - 0.01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.05) c h))}
.cf-stack-recap__btn:active:not(:disabled),.cf-stack-recap__btn[data-state='active']{transform:translateY(1px);background:linear-gradient(oklch(from var(--sr-btn) calc(l - 0.06) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.08) c h));box-shadow:inset 0 2px 3px oklch(from var(--sr-btn) calc(l - 0.2) c h / 0.45),inset 0 -1px 0 oklch(from var(--sr-btn) calc(l - 0.16) c h),0 1px 1px oklch(from var(--sr-shadow) l c h / 0.3)}
.cf-stack-recap__btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-stack-recap__btn:disabled{cursor:not-allowed;transform:none;border-color:transparent;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:none}
.cf-stack-recap__btn-main{font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.2rem,1.05rem + .6vw,1.4rem);line-height:1.2;text-wrap:balance}
.cf-stack-recap__btn-sub{font-family:var(--font-body);font-size:.875rem;font-weight:600;line-height:1.3;text-wrap:pretty}
.cf-stack-recap__link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:.6rem;padding:0 .5rem;border:0;border-radius:var(--button-radius,4px);background:none;font:inherit;font-size:1.0625rem;font-weight:700;color:var(--link,var(--accent));text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / 0.45);text-decoration-thickness:2px;text-underline-offset:.18em;cursor:pointer}
.cf-stack-recap__link:hover:not(:disabled){color:oklch(from var(--link,var(--accent)) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-stack-recap__link:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-stack-recap__link:disabled{cursor:not-allowed;color:var(--muted);text-decoration-color:currentColor}
@media (min-width:960px){.cf-stack-recap{grid-template-columns:minmax(0,1fr) minmax(340px,410px)}.cf-stack-recap__aside{position:sticky;top:var(--stack-recap-top,1.5rem);max-width:none;justify-self:stretch}}
@media (max-width:559px){.cf-stack-recap__item{grid-template-columns:64px minmax(0,1fr);padding:1rem}.cf-stack-recap__item--plain{grid-template-columns:minmax(0,1fr)}.cf-stack-recap__copy{padding-top:0}.cf-stack-recap__value{grid-column:-2;justify-self:start;margin-top:.65rem}.cf-stack-recap__letter p{font-size:1.0625rem}}
@media (prefers-reduced-motion:no-preference){.cf-stack-recap__item{animation:cfsr-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(min(var(--i,0),4) * 70ms)}.cf-stack-recap__offer{animation:cfsr-rise .5s .1s cubic-bezier(.2,.7,.2,1) both}.cf-stack-recap__was::after{animation:cfsr-strike .5s .45s cubic-bezier(.6,0,.2,1) both}}
@keyframes cfsr-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cfsr-strike{from{transform:rotate(-9deg) scaleX(0)}to{transform:rotate(-9deg) scaleX(1)}}
@media (prefers-reduced-motion:reduce){.cf-stack-recap *{transition:none}.cf-stack-recap .cf-stack-recap__item:hover .cf-stack-recap__thumb{transform:none}.cf-stack-recap .cf-stack-recap__offer:hover .cf-stack-recap__scissors{transform:translateY(-50%)}.cf-stack-recap .cf-stack-recap__btn:hover:not(:disabled),.cf-stack-recap .cf-stack-recap__btn:active:not(:disabled),.cf-stack-recap .cf-stack-recap__btn[data-state]{transform:none}}
`
pieces/content/stack-recap/specimen.tsx 31 lines
import { StackRecap } from "../stack-recap"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled"] as const
type SpecimenState = (typeof states)[number]
export default function StackRecapSpecimen({ state = "default" }: { state?: SpecimenState }) {
const sample = defaults.sample
return (
<StackRecap
state={state}
productName={sample.name}
items={sample.items.map((item, i) => ({
name: item.name,
detail: item.detail,
value: item.value,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
totalValue={sample.regularPrice}
price={sample.price}
priceNote={sample.note}
sublabel={sample.sublabel}
signatureName="Jordan Hale"
signatureRole={`Creator, ${sample.name}`}
href="#order"
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalStackRecap |
string |
Default "Let’s recap everything you get"
|
highlight OptionalStackRecap |
string |
Default "everything you get"
|
salutation OptionalStackRecap |
string |
Default "Dear friend,"
|
intro OptionalStackRecap |
string[] |
Default DEFAULT_INTRO
|
items OptionalStackRecap |
StackRecapItem[] |
Default DEFAULT_ITEMS
|
valueLabel OptionalStackRecap |
string |
Default "value"
|
signOff OptionalStackRecap |
string |
Default "To your first launch,"
|
signatureName OptionalStackRecap |
string |
Default ""
|
signatureRole OptionalStackRecap |
string |
Default ""
|
productName OptionalStackRecap |
string |
Default "The Funnel Starter Kit"
|
totalLabel OptionalStackRecap |
string |
Default "Total value"
|
totalValue OptionalStackRecap |
string |
Default "$97"
|
saving OptionalStackRecap |
string |
|
couponText OptionalStackRecap |
string |
Default "{saving} off"
|
couponNote OptionalStackRecap |
string |
Default "the total value, clipped for you today"
|
todayLabel OptionalStackRecap |
string |
Default "Today, the complete kit"
|
price OptionalStackRecap |
string |
Default "$47"
|
priceNote OptionalStackRecap |
string |
Default "One payment · Lifetime access"
|
riskLead OptionalStackRecap |
string |
Default "Try it for 30 days."
|
riskText OptionalStackRecap |
string |
Default "If it isn’t right for you, ask for your money back."
|
label OptionalStackRecap |
string |
Default "Try The Kit For {price}"
|
sublabel OptionalStackRecap |
string |
Default "Secure checkout · Instant download"
|
linkLabel OptionalStackRecap |
string |
Default "Add to cart"
|
href OptionalStackRecap |
string |
|
onAction OptionalStackRecap |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalStackRecap |
boolean |
Default false
|
state OptionalStackRecap |
"default" | "hover" | "active" | "disabled" |
Default "default"
|
className OptionalStackRecap |
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.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB