One Click Downsell 6
Second-chance downsell after a declined upsell: a relieved "no problem" letter, then a path through the kit's tools that ends in a one-click price card.
Use it in a prompt
Use checkout/one-click-downsell-6 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/checkout/one-click-downsell-6.tsx. - Import it and pass your copy and images (Props tab):
import { OneClickDownsell6 } from "@/components/funneldna/checkout/one-click-downsell-6"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/one-click-downsell-6/component.tsx 461 lines
// layout: path-to-action
// Second-chance downsell after a declined upsell: a relieved "no problem" letter, then a path through the kit's tools that ends in a one-click price card.
"use client"
import * as React from "react"
import { AlertCircle, Loader2, ShieldCheck, ShoppingBag } from "lucide-react"
export type OneClickDownsell6Item = {
name: string
/** One short line under the name. */
detail?: string
/** Stated value, e.g. "$49"; shown through valueLabel. */
value?: string
/** Item photo (slot item-1 … item-n). */
image?: string
/** Alt text for the photo; falls back to the item name. */
imageAlt?: string
}
export type OneClickDownsell6State = "default" | "hover" | "active" | "disabled" | "error"
export type OneClickDownsell6Props = {
/** First headline line, e.g. "No problem." */
opener?: string
/** Second headline line; the highlight phrase inside it gets one marker stroke. */
headline?: string
/** Phrase inside headline that carries the marker stroke. */
highlight?: string
/** "{product}" is replaced with the bold product name. */
subhead?: string
/** Bold opening line of the letter. */
salutation?: string
/** Short letter paragraphs; may contain <strong>. */
letter?: React.ReactNode[]
/** Line above the signature, e.g. "To your first launch,". */
signoff?: string
/** Signer shown in the signature face; the whole sign-off is hidden when empty. */
signerName?: string
/** Small line under the signature. */
signerRole?: string
/** Stops on the path to the price card. */
items?: OneClickDownsell6Item[]
/** "{value}" is replaced with the item value. */
valueLabel?: string
productName?: string
/** Price as shown, e.g. "$47" or "$47.50". */
price?: string
/** Small caps line under the price. */
priceNote?: string
/** Combined stated value of the items, e.g. "$97"; hidden when empty. */
regularPrice?: string
/** "{value}" is replaced with regularPrice. */
totalLabel?: string
ctaLabel?: string
/** Button text while a returned onAction promise is pending. */
loadingLabel?: string
/** Line under the button; also describes the button for assistive tech. */
reassurance?: string
guarantee?: string
/** Shown when onAction rejects, or in the error state. */
errorMessage?: string
/** Quiet decline link text; hidden when empty. */
declineLabel?: string
/** Decline destination; "#" links stay on the page. */
declineHref?: string
/** Accept destination: when set the button renders as a link. */
href?: string
/** Accept action. A returned promise shows loadingLabel; a rejection shows errorMessage. */
onAction?: () => void | Promise<void>
/** Decline action; when set it replaces declineHref navigation. */
onDecline?: () => void
/** Heading level for the main headline. */
headingAs?: "h1" | "h2"
disabled?: boolean
state?: OneClickDownsell6State
className?: string
}
export function OneClickDownsell6(props: OneClickDownsell6Props) {
const {
opener = "No problem.",
headline = "Start with the essentials.",
highlight = "the essentials.",
subhead = "How about {product} instead?",
salutation = "Dear friend,",
letter = DEFAULT_LETTER,
signoff = "To your first launch,",
signerName = "",
signerRole = "",
items = DEFAULT_ITEMS,
valueLabel = "Value {value}",
productName = "The Funnel Starter Kit",
price = "$47",
priceNote = "One-time payment",
regularPrice = "",
totalLabel = "Everything above · {value} value",
ctaLabel = "Yes, add the kit",
loadingLabel = "Adding it to your order…",
reassurance = "One click to add · Instant digital access",
guarantee = "30-day money-back guarantee",
errorMessage = "We couldn’t add the kit to your order. Please try again.",
declineLabel = "No thanks, continue without the kit",
declineHref = "#decline",
href,
onAction,
onDecline,
headingAs = "h2",
disabled = false,
state = "default",
className,
} = props
const headingId = React.useId()
const noteId = React.useId()
const forcedError = state === "error"
const [status, setStatus] = React.useState<"idle" | "loading" | "error">(forcedError ? "error" : "idle")
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
React.useEffect(() => {
setStatus(forcedError ? "error" : "idle")
}, [forcedError])
const isDisabled = disabled || state === "disabled"
const loading = status === "loading"
const blocked = isDisabled || loading
const Heading = headingAs
const p = splitPrice(price)
async function run() {
if (!onAction) return
try {
const result: unknown = onAction()
if (result instanceof Promise) {
setStatus("loading")
await result
if (alive.current) setStatus("idle")
} else {
setStatus("idle")
}
} catch {
if (alive.current) setStatus("error")
}
}
function accept(e: React.MouseEvent<HTMLElement>) {
if (blocked) {
e.preventDefault()
return
}
void run()
}
function decline(e: React.MouseEvent<HTMLAnchorElement>) {
if (onDecline) {
e.preventDefault()
onDecline()
return
}
if (!declineHref || declineHref.startsWith("#")) e.preventDefault()
}
const at = highlight ? headline.indexOf(highlight) : -1
const second =
at < 0 ? (
headline
) : (
<>
{headline.slice(0, at)}
<span className="ocd6-mark">{highlight}</span>
{headline.slice(at + highlight.length)}
</>
)
const subParts = subhead.split("{product}")
const btnClass = [
"ocd6-btn",
state === "hover" ? "is-hover" : "",
state === "active" ? "is-active" : "",
]
.filter(Boolean)
.join(" ")
const inner = loading ? (
<>
<Loader2 className="ocd6-spin" size={22} aria-hidden="true" />
<span>{loadingLabel}</span>
</>
) : (
<span>{ctaLabel}</span>
)
const describedBy = reassurance ? noteId : undefined
const button = href ? (
<a
className={btnClass}
href={isDisabled ? undefined : href}
aria-disabled={blocked || undefined}
aria-busy={loading || undefined}
aria-describedby={describedBy}
onClick={accept}
>
{inner}
</a>
) : (
<button
type="button"
className={btnClass}
disabled={isDisabled}
aria-disabled={loading || undefined}
aria-busy={loading || undefined}
aria-describedby={describedBy}
onClick={accept}
>
{inner}
</button>
)
return (
<section
className={["cf-one-click-downsell-6", className].filter(Boolean).join(" ")}
aria-labelledby={headingId}
>
<style>{CSS}</style>
<div className="ocd6-top">
<div className="ocd6-wrap">
<div className="ocd6-head">
<Heading id={headingId} className="ocd6-h">
{opener ? <span className="ocd6-open">{opener}</span> : null}{" "}
<span>{second}</span>
</Heading>
{subhead ? (
<p className="ocd6-sub">
{subParts.map((part, i) => (
<React.Fragment key={i}>
{i > 0 ? <strong>{productName}</strong> : null}
{part}
</React.Fragment>
))}
</p>
) : null}
</div>
<div className="ocd6-letter">
{salutation ? <p className="ocd6-hi">{salutation}</p> : null}
{letter.map((para, i) => (
<p key={i}>{para}</p>
))}
{signerName ? (
<div className="ocd6-sign">
{signoff ? <p>{signoff}</p> : null}
<span className="ocd6-sig">{signerName}</span>
{signerRole ? <span className="ocd6-role">{signerRole}</span> : null}
</div>
) : null}
</div>
</div>
</div>
<div className="ocd6-run">
<div className="ocd6-wrap">
<ol className="ocd6-path" style={{ "--o6-n": Math.max(items.length, 1) } as React.CSSProperties}>
{items.map((item, i) => (
<li key={item.name + i} className={item.image ? "ocd6-stop has-thumb" : "ocd6-stop"}>
<div className="ocd6-rail" aria-hidden="true">
<span className="ocd6-node">{i + 1}</span>
<span className="ocd6-seg" style={{ "--i": i } as React.CSSProperties} />
</div>
{item.image ? (
<img
className="ocd6-thumb"
src={item.image}
alt={item.imageAlt || item.name}
width={360}
height={360}
loading="lazy"
decoding="async"
/>
) : null}
<div className="ocd6-txt">
<h3 className="ocd6-item">{item.name}</h3>
{item.detail ? <p className="ocd6-detail">{item.detail}</p> : null}
{item.value ? <span className="ocd6-val">{fill(valueLabel, { value: item.value })}</span> : null}
</div>
</li>
))}
<li className="ocd6-finish">
<div className="ocd6-rail" aria-hidden="true">
<span className="ocd6-node">
<ShoppingBag size={20} strokeWidth={2.25} />
</span>
</div>
<div className="ocd6-close">
<div className="ocd6-offer">
<h3 className="ocd6-name">{productName}</h3>
<p className="ocd6-price">
<span className="ocd6-sr">{price}</span>
<span className="ocd6-fig" aria-hidden="true">
{p.sym ? <span className="ocd6-sym">{p.sym}</span> : null}
<span>{p.whole}</span>
{p.cents ? <span className="ocd6-sym ocd6-cents">{p.cents}</span> : null}
</span>
</p>
{priceNote ? <p className="ocd6-pnote">{priceNote}</p> : null}
{regularPrice ? <p className="ocd6-total">{fill(totalLabel, { value: regularPrice })}</p> : null}
<div className="ocd6-act">
{button}
{reassurance ? (
<p className="ocd6-note" id={noteId}>
{reassurance}
</p>
) : null}
{status === "error" && errorMessage ? (
<p className="ocd6-error" role="alert">
<AlertCircle size={18} aria-hidden="true" />
<span>{errorMessage}</span>
</p>
) : null}
</div>
{guarantee ? (
<p className="ocd6-guar">
<ShieldCheck className="ocd6-guar-ic" size={20} aria-hidden="true" />
<span>{guarantee}</span>
</p>
) : null}
</div>
{declineLabel ? (
<a className="ocd6-decline" href={declineHref || "#"} onClick={decline}>
{declineLabel}
</a>
) : null}
</div>
</li>
</ol>
</div>
</div>
</section>
)
}
export default OneClickDownsell6
const DEFAULT_LETTER: React.ReactNode[] = [
"Saying no to the bigger offer is completely fine.",
<>
You still want your first funnel built, so here’s a lighter way in:{" "}
<strong>the plan, the page copy and the launch check</strong>, in one simple kit.
</>,
"Here’s what’s inside. When you’re ready, click the button below and it’s added to your order in one click.",
]
const DEFAULT_ITEMS: OneClickDownsell6Item[] = [
{ 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 {key} placeholder in a template with its value, as plain text. */
function fill(template: string, values: Record<string, string>) {
let out = template
for (const key of Object.keys(values)) out = out.split("{" + key + "}").join(values[key])
return out
}
/** Splits "$47.50" into symbol, whole and cents for the raised-symbol price figure. */
function splitPrice(price: string) {
const start = price.search(/[0-9]/)
if (start < 0) return { sym: "", whole: price, cents: "" }
const sym = price.slice(0, start).trim()
const rest = price.slice(start)
const dot = rest.indexOf(".")
return dot < 0 ? { sym, whole: rest, cents: "" } : { sym, whole: rest.slice(0, dot), cents: rest.slice(dot + 1) }
}
const R = ".cf-one-click-downsell-6"
// Theme notes: every colour is a token or an OKLCH recipe on a token; hex appears only as var() fallbacks.
// The signature face is the one integral face and comes from --signature-face (theme), falling back to the display face.
const CSS = `
${R}{--o6-line:color-mix(in oklch,var(--ink,#151c2c) 15%,var(--surface,#fff));--o6-strip:color-mix(in oklch,var(--ink,#151c2c) 4%,var(--surface,#fff));--o6-marker:color-mix(in oklch,var(--marker,#fae37c) 55%,var(--surface,#fff));--o6-soft:color-mix(in oklch,var(--band-ink,#fff) 82%,var(--band,#1b2a4a));--o6-sh:var(--shadow,oklch(0.22 0.03 260));--o6-gap:clamp(22px,2.4vw,34px);--o6-pad:clamp(20px,4vw,48px);--signature-font:var(--signature-face,var(--font-display,var(--font-body,system-ui,sans-serif)));--signature-ink:var(--ink,#151c2c);display:block;background:var(--surface,#fff);color:var(--ink,#151c2c);font-family:var(--font-body,system-ui,sans-serif);overflow-x:clip}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} .ocd6-wrap{max-width:1180px;margin-inline:auto}
${R} .ocd6-top{padding:clamp(56px,7vw,104px) var(--o6-pad) clamp(44px,5vw,72px)}
${R} .ocd6-top .ocd6-wrap{display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(28px,4vw,72px)}
@media(min-width:960px){${R} .ocd6-top .ocd6-wrap{grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);align-items:start}${R} .ocd6-letter{padding-top:clamp(8px,1vw,16px)}}
${R} .ocd6-h{margin:0;color:var(--ink,#151c2c);font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-.035em);font-size:clamp(2.6rem,6.2vw,5.6rem);line-height:.98;text-wrap:balance}
${R} .ocd6-open{display:block}
${R} .ocd6-mark{background-image:linear-gradient(to bottom,transparent 48%,var(--o6-marker) 48%,var(--o6-marker) 93%,transparent 93%);-webkit-box-decoration-break:clone;box-decoration-break:clone;padding-inline:.07em;margin-inline:-.04em;border-radius:.16em .34em .24em .42em}
${R} .ocd6-sub{margin:clamp(18px,1.9vw,28px) 0 0;color:var(--ink,#151c2c);font-size:clamp(1.25rem,2vw,1.65rem);font-weight:500;line-height:1.3;text-wrap:pretty}
${R} .ocd6-sub strong{font-weight:700}
${R} .ocd6-letter{max-width:62ch;color:var(--ink,#151c2c);font-size:clamp(1.0625rem,1.2vw,1.1875rem);line-height:1.62}
${R} .ocd6-letter p{margin:0 0 .85em;text-wrap:pretty}
${R} .ocd6-letter .ocd6-hi{font-weight:700}
${R} .ocd6-letter strong{font-weight:700}
${R} .ocd6-sign{margin-top:1.3em}
${R} .ocd6-sign p{margin:0}
${R} .ocd6-sig{display:block;margin-top:16px;color:var(--signature-ink);font-family:var(--signature-font);font-size:clamp(2.2rem,3vw,2.75rem);font-weight:400;line-height:1.15}
${R} .ocd6-role{display:block;margin-top:18px;color:var(--muted,#4b5565);font-size:15px;line-height:1.4}
${R} .ocd6-run{background:var(--o6-strip);padding:clamp(44px,5.5vw,80px) var(--o6-pad) clamp(52px,6.5vw,96px)}
${R} .ocd6-path{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);max-width:680px}
${R} .ocd6-stop{display:grid;grid-template-columns:44px 96px minmax(0,1fr);column-gap:18px;align-items:start;padding-bottom:30px;min-width:0}
${R} .ocd6-stop:not(.has-thumb){grid-template-columns:44px minmax(0,1fr)}
${R} .ocd6-rail{display:flex;flex-direction:column;align-items:center;align-self:stretch}
${R} .ocd6-node{position:relative;z-index:1;flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:999px;background:var(--card,#fff);border:2px solid var(--accent-fill, var(--accent,#2457c5));color:var(--accent,#2457c5);font-family:var(--font-display,inherit);font-weight:800;font-size:1.05rem;line-height:1;box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / .2),0 1px 3px oklch(0.22 0.03 260 / .14))}
${R} .ocd6-seg{position:relative;flex:1 1 auto;width:4px;min-height:24px;margin:0 0 -30px;border-radius:4px;background:var(--o6-line);overflow:hidden}
${R} .ocd6-seg::after{content:'';position:absolute;inset:0;background:var(--accent-fill,var(--accent,#2457c5));transform-origin:top;animation:ocd6-y .7s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0) * .2s + .15s)}
${R} .ocd6-thumb{display:block;width:96px;height:auto;aspect-ratio:1;object-fit:cover;object-position:center;border-radius:calc(var(--radius,12px) * .75);filter:drop-shadow(0 1px 1.5px oklch(from var(--o6-sh) l c h / .22)) drop-shadow(0 6px 8px oklch(from var(--o6-sh) l c h / .14))}
${R} .ocd6-txt{min-width:0;padding-top:2px}
${R} .ocd6-item{margin:0 0 8px;color:var(--ink,#151c2c);font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.125rem,1.3vw,1.25rem);line-height:1.2;letter-spacing:-.01em;text-wrap:balance}
${R} .ocd6-detail{margin:0;color:var(--muted,#4b5565);font-size:16px;line-height:1.5;text-wrap:pretty}
${R} .ocd6-val{display:block;margin-top:10px;color:var(--muted,#4b5565);font-size:14px;font-weight:700;letter-spacing:.02em}
${R} .ocd6-finish{display:grid;grid-template-columns:44px minmax(0,1fr);column-gap:18px;align-items:start}
${R} .ocd6-close{display:flex;flex-direction:column;min-width:0}
${R} .ocd6-offer{position:relative;background:var(--band,#1b2a4a);color:var(--band-ink,#fff);border-radius:var(--card-radius,calc(var(--radius,12px) * 1.5));padding:clamp(24px,2.3vw,32px);box-shadow:inset 0 1px 0 oklch(from var(--band,#1b2a4a) calc(l + 0.1) c h / .9),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)));animation:ocd6-rise .5s .1s cubic-bezier(.2,.7,.2,1) both}
${R} .ocd6-name{margin:0;color:var(--band-ink,#fff);font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.25rem,1.55vw,1.5rem);line-height:1.15;letter-spacing:-.015em;text-wrap:balance}
${R} .ocd6-price{margin:16px 0 0;color:var(--band-ink,#fff);font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-size:clamp(4.25rem,6vw,6rem);line-height:.86;letter-spacing:-.045em;font-variant-numeric:tabular-nums}
${R} .ocd6-fig{display:inline-flex;align-items:flex-start}
${R} .ocd6-sym{font-size:.4em;line-height:1;margin:.12em .05em 0 0;letter-spacing:0}
${R} .ocd6-cents{margin:.12em 0 0 .04em}
${R} .ocd6-pnote{margin:14px 0 0;color:var(--o6-soft);font-size:14px;font-weight:700;letter-spacing:.08em;line-height:1.3;text-transform:uppercase}
${R} .ocd6-total{margin:6px 0 0;color:var(--o6-soft);font-size:15px;line-height:1.4}
${R} .ocd6-act{position:relative;margin-top:24px}
${R} .ocd6-btn{--o6-b:var(--button-bg,var(--cta,#d6382d));--o6-b2:var(--button-bg-2,var(--cta-2,#b52a20));appearance:none;border:0;margin:0;cursor:pointer;display:flex;width:100%;min-height:66px;align-items:center;justify-content:center;gap:10px;padding:14px 18px;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(180deg,oklch(from var(--o6-b) calc(l + 0.035) c h),var(--o6-b2));color:var(--button-ink,var(--cta-ink,#fff));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.15rem,1.5vw,1.35rem);line-height:1.15;letter-spacing:-.01em;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(--o6-b) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--o6-b) calc(l - 0.16) c h),0 2px 3px oklch(from var(--o6-sh) calc(l - 0.06) c h / .55),0 10px 18px -8px oklch(from var(--o6-sh) calc(l - 0.06) c h / .7));transition:transform .16s cubic-bezier(.2,.7,.2,1),background .16s ease,box-shadow .16s ease}
${R} .ocd6-btn:hover:not(:disabled):not([aria-disabled=true]),${R} .ocd6-btn.is-hover{transform:translateY(-2px);background:linear-gradient(180deg,oklch(from var(--o6-b) calc(l - 0.01) c h),oklch(from var(--o6-b2) calc(l - 0.05) c h))}
${R} .ocd6-btn:active:not(:disabled):not([aria-disabled=true]),${R} .ocd6-btn.is-active{transform:translateY(1px);background:linear-gradient(180deg,oklch(from var(--o6-b) calc(l - 0.06) c h),oklch(from var(--o6-b2) calc(l - 0.09) c h));box-shadow:inset 0 2px 4px oklch(from var(--o6-b) calc(l - 0.22) c h / .6),0 1px 2px oklch(from var(--o6-sh) calc(l - 0.06) c h / .5)}
${R} .ocd6-btn:focus-visible{outline:3px solid var(--band-ink,#fff);outline-offset:3px}
${R} .ocd6-btn:disabled,${R} .ocd6-btn[aria-disabled=true]{cursor:not-allowed;opacity:.55;transform:none}
${R} .ocd6-btn[aria-busy=true]{cursor:progress;opacity:.85}
${R} .ocd6-note{margin:12px 0 0;color:var(--o6-soft);font-size:14px;line-height:1.4;text-align:center;text-wrap:pretty}
${R} .ocd6-error{display:flex;align-items:flex-start;gap:8px;margin:12px 0 0;padding:10px 12px;border-radius:calc(var(--radius,12px) * .75);background:var(--danger-soft,oklch(0.93 0.024 27));color:var(--danger,oklch(0.5 0.17 27));font-size:15px;font-weight:600;line-height:1.4;text-wrap:pretty}
${R} .ocd6-error svg{flex:none;margin-top:1px}
${R} .ocd6-guar{display:block;margin:20px 0 0;padding:12px 14px;border-radius:calc(var(--radius,12px) * .75);background:oklch(from var(--band-ink,#fff) l c h / .08);color:var(--band-ink,#fff);font-size:15px;font-weight:700;line-height:1.3;text-align:center;text-wrap:balance}
${R} .ocd6-guar-ic{display:inline-block;vertical-align:-.3em;margin-right:8px}
${R} .ocd6-guar>span{display:inline}
${R} .ocd6-decline{align-self:center;display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:10px;padding:4px 10px;border-radius:6px;color:var(--muted,#4b5565);font-size:15px;line-height:1.4;text-align:center;text-decoration:underline;text-decoration-color:oklch(from var(--muted,#4b5565) l c h / .5);text-underline-offset:.2em;text-wrap:pretty}
${R} .ocd6-decline:hover{color:var(--ink,#151c2c);text-decoration-color:currentColor}
${R} .ocd6-decline:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2457c5));outline-offset:2px}
${R} .ocd6-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
${R} .ocd6-spin{flex:none;animation:ocd6-spin .8s linear infinite}
@media(max-width:559px){${R} .ocd6-stop{grid-template-columns:40px 76px minmax(0,1fr);column-gap:14px}${R} .ocd6-stop:not(.has-thumb){grid-template-columns:40px minmax(0,1fr)}${R} .ocd6-node{width:40px;height:40px;font-size:1rem}${R} .ocd6-thumb{width:76px}${R} .ocd6-finish{grid-template-columns:minmax(0,1fr)}${R} .ocd6-finish>.ocd6-rail{display:none}}
@media(min-width:1080px){${R} .ocd6-path{max-width:none;grid-template-columns:repeat(var(--o6-n,3),minmax(0,1fr)) minmax(300px,1.45fr);column-gap:var(--o6-gap);align-items:start}${R} .ocd6-stop,${R} .ocd6-stop:not(.has-thumb){display:flex;flex-direction:column;gap:20px;padding-bottom:0}${R} .ocd6-rail{flex-direction:row;align-self:auto;width:100%}${R} .ocd6-seg{width:auto;height:4px;min-height:0;margin:0 calc(-1 * var(--o6-gap)) 0 0}${R} .ocd6-seg::after{transform-origin:left;animation-name:ocd6-x}${R} .ocd6-thumb{width:100%;aspect-ratio:5/4}${R} .ocd6-txt{padding-top:0}${R} .ocd6-finish{display:block}${R} .ocd6-finish>.ocd6-rail{display:none}}
@media(hover:hover) and (pointer:fine){${R} .ocd6-thumb{transition:transform .25s cubic-bezier(.2,.7,.2,1)}${R} .ocd6-stop:hover .ocd6-thumb{transform:translateY(-4px)}}
@keyframes ocd6-spin{to{transform:rotate(360deg)}}
@keyframes ocd6-x{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes ocd6-y{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes ocd6-rise{from{opacity:.82;transform:translateY(10px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){${R} .ocd6-seg::after,${R} .ocd6-offer{animation:none}${R} .ocd6-spin{animation-duration:2.4s}${R} .ocd6-btn,${R} .ocd6-thumb{transition:none}${R} .ocd6-btn:hover:not(:disabled):not([aria-disabled=true]),${R} .ocd6-btn.is-hover,${R} .ocd6-btn:active:not(:disabled):not([aria-disabled=true]),${R} .ocd6-btn.is-active,${R} .ocd6-stop:hover .ocd6-thumb{transform:none}}
`
pieces/checkout/one-click-downsell-6/specimen.tsx 29 lines
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
import { OneClickDownsell6, type OneClickDownsell6State } from "../one-click-downsell-6"
export const states: OneClickDownsell6State[] = ["default", "hover", "active", "disabled", "error"]
const sample = defaults.sample
export default function OneClickDownsell6Specimen({ state = "default" }: { state?: OneClickDownsell6State }) {
return (
<OneClickDownsell6
state={state}
productName={sample.name}
price={sample.price}
regularPrice={sample.regularPrice}
guarantee={sample.guarantee}
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,
}))}
signerName="Alex Rivera"
signerRole="Founder, The Funnel Starter Kit"
onAction={() => undefined}
/>
)
}
| Name | Type | Details |
|---|---|---|
opener OptionalOneClickDownsell6 |
string |
|
headline OptionalOneClickDownsell6 |
string |
|
highlight OptionalOneClickDownsell6 |
string |
|
subhead OptionalOneClickDownsell6 |
string |
|
salutation OptionalOneClickDownsell6 |
string |
|
letter OptionalOneClickDownsell6 |
React.ReactNode[] |
|
signoff OptionalOneClickDownsell6 |
string |
|
signerName OptionalOneClickDownsell6 |
string |
|
signerRole OptionalOneClickDownsell6 |
string |
|
items OptionalOneClickDownsell6 |
OneClickDownsell6Item[] |
|
valueLabel OptionalOneClickDownsell6 |
string |
|
productName OptionalOneClickDownsell6 |
string |
|
price OptionalOneClickDownsell6 |
string |
|
priceNote OptionalOneClickDownsell6 |
string |
|
regularPrice OptionalOneClickDownsell6 |
string |
|
totalLabel OptionalOneClickDownsell6 |
string |
|
ctaLabel OptionalOneClickDownsell6 |
string |
|
loadingLabel OptionalOneClickDownsell6 |
string |
|
reassurance OptionalOneClickDownsell6 |
string |
|
guarantee OptionalOneClickDownsell6 |
string |
|
errorMessage OptionalOneClickDownsell6 |
string |
|
declineLabel OptionalOneClickDownsell6 |
string |
|
declineHref OptionalOneClickDownsell6 |
string |
|
href OptionalOneClickDownsell6 |
string |
|
onAction OptionalOneClickDownsell6 |
() => void | Promise<void> |
|
onDecline OptionalOneClickDownsell6 |
() => void |
|
headingAs OptionalOneClickDownsell6 |
"h1" | "h2" |
|
disabled OptionalOneClickDownsell6 |
boolean |
|
state OptionalOneClickDownsell6 |
OneClickDownsell6State |
|
className OptionalOneClickDownsell6 |
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.
--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