One Click Downsell 8
Second-chance offer after an upsell “no”: a relieved, photo-led split where an angled band frames the kit,
Use it in a prompt
Use checkout/one-click-downsell-8 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-8.tsx. - Import it and pass your copy and images (Props tab):
import { OneClickDownsell8 } from "@/components/funneldna/checkout/one-click-downsell-8"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/one-click-downsell-8/component.tsx 493 lines
// layout: diagonal-split
// Second-chance offer after an upsell “no”: a relieved, photo-led split where an angled band frames the kit,
// today’s price sits beside what the pieces cost one by one, and the 30-day guarantee leads into a one-click yes.
'use client'
import * as React from 'react'
import { AlertCircle, Check, Loader2, ShieldCheck } from 'lucide-react'
export type OneClickDownsell8Item = {
name: string
/** Stated value, e.g. '$49'; read out with the one-by-one price. */
value?: string
/** Item photo (slot item-1 … item-n); the first three stack beside the one-by-one price. */
image?: string
imageAlt?: string
}
export type OneClickDownsell8Point = {
/** Bold lead-in that opens the paragraph. */
lead: string
text: string
}
export type OneClickDownsell8State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type OneClickDownsell8Props = {
/** Calm strip across the top of the band; hidden when empty. */
notice?: string
/** First headline line, e.g. 'No problem.' */
opener?: string
/** Second headline line; the highlight phrase inside it gets one marker stroke. */
headline?: string
highlight?: string
/** Sub-headline; '{product}' is replaced with the bold product name. */
lead?: string
productName?: string
/** Short paragraphs, each opening with a bold lead-in. */
points?: OneClickDownsell8Point[]
/** What is inside the offer. */
items?: OneClickDownsell8Item[]
/** Screen-reader line for the stacked item photos; '{items}' is replaced with names and values. */
itemsLabel?: string
/** Slot 'scene': the photo that fills the angled field. */
sceneImage?: string
sceneImageAlt?: string
/** Slot 'seal-guarantee': a transparent seal beside the guarantee line. */
sealImage?: string
sealImageAlt?: string
/** Label for the supplied alternative, e.g. the items bought separately. */
alternativeLabel?: string
/** What the supplied alternative costs; the comparison hides when empty. */
alternativePrice?: string
vsLabel?: string
todayLabel?: string
price?: string
/** Shown under today’s price; each '·' starts a new line. */
priceNote?: string
/** The risk reversal that leads into the button. */
riskTitle?: string
riskText?: string
ctaLabel?: string
/** Second line on the button; carries the price. */
ctaSublabel?: string
loadingLabel?: string
reassurance?: string
errorMessage?: string
declineLabel?: string
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>
onDecline?: () => void
headingAs?: 'h1' | 'h2'
disabled?: boolean
state?: OneClickDownsell8State
className?: string
}
const DEFAULT_POINTS: OneClickDownsell8Point[] = [
{
lead: 'Same plan, smaller step.',
text: 'Map your offer, write your page copy, and check every step before you launch.',
},
{
lead: 'Added in one click.',
text: 'No forms to fill in. The kit joins today’s order, ready to download.',
},
]
const DEFAULT_ITEMS: OneClickDownsell8Item[] = [
{ name: 'Funnel Planning Guide', value: '$49' },
{ name: 'Page Copy Workbook', value: '$29' },
{ name: 'Launch Checklist', value: '$19' },
]
export function OneClickDownsell8({
notice = 'Your order is saved. Here’s one lighter option before you go.',
opener = 'No problem.',
headline = 'Here’s the lighter way in.',
highlight = 'the lighter way in',
lead = 'Get {product}: the guide, workbook, and checklist in one download.',
productName = 'The Funnel Starter Kit',
points = DEFAULT_POINTS,
items = DEFAULT_ITEMS,
itemsLabel = 'Includes {items}',
sceneImage,
sceneImageAlt = 'The Funnel Starter Kit: planning guide, copy workbook and launch checklist on a sunny desk',
sealImage,
sealImageAlt = '',
alternativeLabel = 'One by one',
alternativePrice = '$97',
vsLabel = 'vs',
todayLabel = 'The kit, today',
price = '$47',
priceNote = 'One payment · Lifetime access',
riskTitle = 'Try it for 30 days.',
riskText = 'If it isn’t right for you, ask for your money back.',
ctaLabel = 'Yes! Try It for 30 Days',
ctaSublabel = 'Add the kit to my order for $47',
loadingLabel = 'Adding the kit to your order…',
reassurance = 'One click · Instant digital access',
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,
}: OneClickDownsell8Props) {
const headingId = React.useId()
const errorId = 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 Heading = headingAs
const thumbs = items.filter((item) => item.image).slice(0, 3)
const itemsText = items.map((item) => (item.value ? `${item.name} ${item.value}` : item.name)).join(', ')
const noteLines = priceNote
.split('·')
.map((part) => part.trim())
.filter(Boolean)
const leadParts = lead.split('{product}')
const hasAlternative = Boolean(alternativePrice)
async function run() {
if (!onAction) return
try {
const result: unknown = onAction()
if (result && typeof (result as PromiseLike<void>).then === 'function') {
setStatus('loading')
await result
if (alive.current) setStatus('idle')
} else {
setStatus('idle')
}
} catch {
if (alive.current) setStatus('error')
}
}
function acceptButton() {
if (isDisabled || loading) return
void run()
}
function acceptLink(event: React.MouseEvent<HTMLAnchorElement>) {
if (isDisabled || loading) {
event.preventDefault()
return
}
void run()
}
function decline(event: React.MouseEvent<HTMLAnchorElement>) {
if (onDecline) {
event.preventDefault()
onDecline()
return
}
if (!declineHref || declineHref.startsWith('#')) event.preventDefault()
}
const btnClass = [
'ds8-btn',
state === 'hover' ? 'is-hover' : '',
state === 'active' ? 'is-active' : '',
href && isDisabled ? 'is-disabled' : '',
]
.filter(Boolean)
.join(' ')
const describedBy =
[reassurance ? noteId : '', status === 'error' && errorMessage ? errorId : ''].filter(Boolean).join(' ') ||
undefined
const inner = loading ? (
<span className='ds8-btn-main'>
<Loader2 className='ds8-spin' size={22} aria-hidden='true' />
<span>{loadingLabel}</span>
</span>
) : (
<>
<span className='ds8-btn-main'>{ctaLabel}</span>
{ctaSublabel ? <span className='ds8-btn-sub'>{ctaSublabel}</span> : null}
</>
)
const button = href ? (
<a
className={btnClass}
href={isDisabled ? undefined : href}
aria-disabled={isDisabled || loading || undefined}
aria-busy={loading || undefined}
aria-describedby={describedBy}
onClick={acceptLink}
>
{inner}
</a>
) : (
<button
type='button'
className={btnClass}
disabled={isDisabled}
aria-disabled={loading || undefined}
aria-busy={loading || undefined}
aria-describedby={describedBy}
onClick={acceptButton}
>
{inner}
</button>
)
return (
<section
className={['cf-one-click-downsell-8', className].filter(Boolean).join(' ')}
aria-labelledby={headingId}
>
<style>{CSS}</style>
{notice ? (
<p className='ds8-notice'>
<Check size={18} strokeWidth={3} aria-hidden='true' />
<span>{notice}</span>
</p>
) : null}
<div className='ds8-split'>
<div className='ds8-media'>
<span className='ds8-field' aria-hidden='true' />
{sceneImage ? (
<figure className='ds8-photo'>
<img src={sceneImage} alt={sceneImageAlt} width={1024} height={1024} decoding='async' />
</figure>
) : thumbs.length ? (
<div className='ds8-fan' aria-hidden='true'>
{thumbs.map((item, i) => (
<img key={item.name} className={`ds8-fan-${i}`} src={item.image} alt='' decoding='async' />
))}
</div>
) : null}
</div>
<div className='ds8-copy'>
<div className='ds8-inner'>
<Heading className='ds8-title ds8-rise' id={headingId} style={rise(0)}>
{opener ? <span>{opener}</span> : null}
<span>{markPhrase(headline, highlight)}</span>
</Heading>
{lead ? (
<p className='ds8-lead ds8-rise' style={rise(1)}>
{leadParts.map((part, i) => (
<React.Fragment key={i}>
{i > 0 ? <strong>{productName}</strong> : null}
{part}
</React.Fragment>
))}
</p>
) : null}
{points.length ? (
<div className='ds8-points ds8-rise' style={rise(2)}>
{points.map((point) => (
<p key={point.lead}>
<strong>{point.lead}</strong> {point.text}
</p>
))}
</div>
) : null}
<div className={['ds8-compare ds8-rise', hasAlternative ? '' : 'is-single'].filter(Boolean).join(' ')} style={rise(3)}>
{hasAlternative ? (
<div className='ds8-box ds8-alt'>
<p className='ds8-label'>{alternativeLabel}</p>
<p className='ds8-num'>{alternativePrice}</p>
{thumbs.length ? (
<span className='ds8-foot ds8-thumbs' aria-hidden='true'>
{thumbs.map((item) => (
<img key={item.name} src={item.image} alt='' decoding='async' />
))}
</span>
) : null}
{itemsText ? <span className='ds8-sr'>{itemsLabel.split('{items}').join(itemsText)}</span> : null}
</div>
) : null}
{hasAlternative && vsLabel ? (
<span className='ds8-vs' aria-hidden='true'>
{vsLabel}
</span>
) : null}
<div className='ds8-box ds8-today'>
<p className='ds8-label'>{todayLabel}</p>
<p className='ds8-num'>{price}</p>
{noteLines.length ? (
<p className='ds8-foot ds8-note'>
{noteLines.map((line) => (
<span key={line}>{line}</span>
))}
</p>
) : null}
</div>
</div>
{riskTitle || riskText ? (
<div className='ds8-risk ds8-rise' style={rise(4)}>
{sealImage ? (
<img className='ds8-seal' src={sealImage} alt={sealImageAlt} width={88} height={88} decoding='async' />
) : (
<ShieldCheck className='ds8-shield' size={48} strokeWidth={1.75} aria-hidden='true' />
)}
<p>
{riskTitle ? <strong>{riskTitle}</strong> : null}
{riskText}
</p>
</div>
) : null}
<div className='ds8-action ds8-rise' style={rise(4)}>
{button}
{reassurance ? (
<p className='ds8-reassure' id={noteId}>
{reassurance}
</p>
) : null}
{status === 'error' && errorMessage ? (
<p className='ds8-error' id={errorId} role='alert'>
<AlertCircle size={18} aria-hidden='true' />
<span>{errorMessage}</span>
</p>
) : null}
{declineLabel ? (
<a className='ds8-decline' href={declineHref} onClick={decline}>
{declineLabel}
</a>
) : null}
</div>
</div>
</div>
</div>
</section>
)
}
export default OneClickDownsell8
function rise(index: number) {
return { '--i': index } as React.CSSProperties
}
function markPhrase(text: string, phrase: string) {
const at = phrase ? text.indexOf(phrase) : -1
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className='ds8-mark'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
const S = '.cf-one-click-downsell-8'
const CSS = `
${S}{--ds8-shadow:var(--shadow,oklch(0.22 0.03 260));--ds8-marker:var(--marker,#fae37c);--ds8-line:oklch(from var(--ink,#141c2e) l c h / 0.12);--ds8-well:color-mix(in oklch,var(--ink,#141c2e) 4%,var(--surface,#ffffff));position:relative;isolation:isolate;overflow:hidden;background:var(--surface,#ffffff);color:var(--ink,#141c2e);font-family:var(--font-body,system-ui,sans-serif);font-size:17px;line-height:1.55}
${S} *,${S} *::before,${S} *::after{box-sizing:border-box}
${S} :where(h1,h2,p,figure){margin:0}
${S} .ds8-notice{position:relative;z-index:2;display:block;padding:.85rem 1.25rem;background:var(--band,#1b2a4a);color:var(--band-ink,#ffffff);font-family:var(--font-display,inherit);font-size:clamp(.98rem,.9rem + .35vw,1.12rem);font-weight:800;line-height:1.3;text-align:center;text-wrap:balance}
${S} .ds8-notice svg{display:inline-block;vertical-align:-0.15em;margin-inline-end:.6rem}
${S} .ds8-split{display:grid;grid-template-columns:minmax(0,46fr) minmax(0,54fr);min-height:660px}
${S} .ds8-media{position:relative;min-height:100%}
${S} .ds8-field{position:absolute;inset:0;background:var(--band,#1b2a4a);clip-path:polygon(0 0,100% 0,80% 100%,0 100%)}
${S} .ds8-photo{position:absolute;inset:0;overflow:hidden;background:var(--band,#1b2a4a);clip-path:polygon(0 0,94% 0,74.5% 100%,0 100%)}
${S} .ds8-photo img{display:block;width:100%;height:100%;object-fit:cover;object-position:40% 50%}
${S} .ds8-photo::after{content:'';position:absolute;inset:0;background:linear-gradient(to top,oklch(from var(--band,#1b2a4a) l c h / 0.22),transparent 45%);pointer-events:none}
${S} .ds8-fan{position:absolute;inset:0;clip-path:polygon(0 0,100% 0,80% 100%,0 100%)}
${S} .ds8-fan img{position:absolute;top:24%;width:38%;aspect-ratio:4/5;object-fit:cover;border-radius:calc(var(--radius,12px) * .8);filter:drop-shadow(0 2px 3px oklch(from var(--ds8-shadow) l c h / 0.4)) drop-shadow(0 12px 16px oklch(from var(--ds8-shadow) l c h / 0.35))}
${S} .ds8-fan-0{left:6%;rotate:-7deg}
${S} .ds8-fan-1{left:24%;z-index:1;top:30% !important}
${S} .ds8-fan-2{left:42%;rotate:7deg}
${S} .ds8-copy{min-width:0;padding:clamp(2.75rem,4.5vw,4.5rem) clamp(1.5rem,5vw,5rem) clamp(2.75rem,4.5vw,4.25rem) clamp(1rem,2.2vw,2.25rem)}
${S} .ds8-inner{max-width:620px}
${S} .ds8-title{color:var(--ink,#141c2e);font-family:var(--font-display,inherit);font-size:clamp(2.5rem,1.6rem + 3vw,4.4rem);font-weight:var(--display-weight,900);letter-spacing:var(--display-tracking,-0.03em);line-height:1.02;text-transform:var(--display-case,none);text-wrap:balance}
${S} .ds8-title>span{display:block;text-wrap:balance}
${S} .ds8-mark{color:var(--ink,#141c2e);background-image:linear-gradient(var(--ds8-marker),var(--ds8-marker));background-repeat:no-repeat;background-size:100% 50%;background-position:0 90%;border-radius:.16em .42em .26em .34em;padding:0 .08em;margin:0 -.04em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
${S} .ds8-lead{margin-top:clamp(1rem,.6rem + 1vw,1.4rem);max-width:56ch;color:var(--ink,#141c2e);font-size:clamp(1.15rem,1rem + .5vw,1.4rem);font-weight:500;line-height:1.42;text-wrap:pretty}
${S} .ds8-lead strong{font-weight:800}
${S} .ds8-points{display:grid;gap:.7rem;margin-top:1.25rem;max-width:60ch}
${S} .ds8-points p{color:var(--muted,#4a5568);font-size:1.0625rem;line-height:1.55;text-wrap:pretty}
${S} .ds8-points strong{color:var(--ink,#141c2e);font-weight:800}
${S} .ds8-compare{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;max-width:540px;margin-top:1.75rem}
${S} .ds8-compare.is-single{grid-template-columns:minmax(0,1fr);max-width:300px}
${S} .ds8-box{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:1rem 1.15rem 1.05rem;border-radius:var(--card-radius,var(--radius,14px))}
${S} .ds8-alt{background:var(--ds8-well);border:1px solid var(--ds8-line)}
${S} .ds8-today{background:color-mix(in oklch,var(--accent,#2463d6) 10%,var(--card,#ffffff));border:1.5px solid color-mix(in oklch,var(--accent,#2463d6) 42%,var(--card,#ffffff));box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / 0.2))}
${S} .ds8-label{color:var(--muted,#4a5568);font-size:14px;font-weight:700;line-height:1.3}
${S} .ds8-today .ds8-label{color:var(--ink,#141c2e)}
${S} .ds8-num{margin:.3rem 0 .75rem;color:var(--muted,#4a5568);font-family:var(--font-display,inherit);font-size:clamp(2rem,1.6rem + 1.2vw,2.6rem);font-weight:900;letter-spacing:-.02em;line-height:1.1;font-variant-numeric:tabular-nums}
${S} .ds8-today .ds8-num{color:var(--ink,#141c2e);font-size:clamp(2.4rem,1.9rem + 1.6vw,3.2rem)}
${S} .ds8-foot{margin-top:auto}
${S} .ds8-thumbs{display:flex}
${S} .ds8-thumbs img{display:block;width:32px;height:32px;object-fit:cover;border-radius:9px;border:2px solid var(--ds8-well);background:var(--ds8-well)}
${S} .ds8-thumbs img+img{margin-left:-9px}
${S} .ds8-note{display:grid;color:var(--ink,#141c2e);font-size:14px;font-weight:600;line-height:1.35}
${S} .ds8-vs{position:absolute;z-index:1;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:2.4rem;height:2.4rem;border-radius:50%;border:1px solid var(--ds8-line);background:var(--card,#ffffff);box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / 0.2));color:var(--ink,#141c2e);font-family:var(--font-display,inherit);font-size:14px;font-weight:800;line-height:1}
${S} .ds8-risk{display:flex;align-items:center;gap:.9rem;max-width:540px;margin-top:1.75rem}
${S} .ds8-seal{flex:none;width:clamp(68px,6vw,88px);height:auto;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 1px 2px oklch(from var(--ds8-shadow) l c h / 0.35)) drop-shadow(0 6px 10px oklch(from var(--ds8-shadow) l c h / 0.25))}
${S} .ds8-shield{flex:none;color:var(--accent,#2463d6)}
${S} .ds8-risk p{min-width:0;color:var(--muted,#4a5568);font-size:1rem;line-height:1.45;text-wrap:pretty}
${S} .ds8-risk strong{display:block;margin-bottom:.2rem;color:var(--ink,#141c2e);font-family:var(--font-display,inherit);font-size:clamp(1.3rem,1.1rem + .6vw,1.6rem);font-weight:900;line-height:1.15}
${S} .ds8-action{max-width:540px;margin-top:1.1rem;text-align:center}
${S} .ds8-btn{--ds8-b1:oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l + 0.03) c h);--ds8-b2:var(--button-bg-2,var(--cta-2,#b52a20));position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;width:100%;min-height:78px;margin:0;padding:.95rem 1.15rem 1.1rem;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(var(--ds8-b1),var(--ds8-b2));color:var(--button-ink,var(--cta-ink,#ffffff));font-family:var(--button-font,var(--font-display,inherit));text-align:center;text-decoration:none;text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta,#d63a2f)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--ds8-shadow) l c h / 0.32),0 8px 16px -6px oklch(from var(--ds8-shadow) l c h / 0.45));cursor:pointer;-webkit-tap-highlight-color:transparent}
${S} .ds8-btn-main{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;font-size:clamp(1.2rem,.95rem + 1.1vw,1.6rem);font-weight:var(--button-weight,800);letter-spacing:-.01em;line-height:1.15;text-wrap:balance}
${S} .ds8-btn-main svg{flex:none}
${S} .ds8-btn-sub{font-family:var(--font-body,inherit);font-size:15px;font-weight:600;line-height:1.3;text-transform:none;text-wrap:pretty}
${S} .ds8-btn.is-hover{--ds8-b1:var(--button-bg,var(--cta,#d63a2f));--ds8-b2:oklch(from var(--button-bg-2,var(--cta-2,#b52a20)) calc(l - 0.05) c h);transform:translateY(-2px)}
@media (hover:hover){${S} .ds8-btn:not(:disabled):not(.is-disabled):not([aria-busy='true']):hover{--ds8-b1:var(--button-bg,var(--cta,#d63a2f));--ds8-b2:oklch(from var(--button-bg-2,var(--cta-2,#b52a20)) calc(l - 0.05) c h);transform:translateY(-2px)}}
${S} .ds8-btn.is-active,${S} .ds8-btn:not(:disabled):not(.is-disabled):active{--ds8-b1:var(--button-bg-2,var(--cta-2,#b52a20));--ds8-b2:oklch(from var(--button-bg-2,var(--cta-2,#b52a20)) calc(l - 0.07) c h);transform:translateY(1px);box-shadow:inset 0 2px 3px oklch(from var(--button-bg-2,var(--cta-2,#b52a20)) calc(l - 0.18) c h / 0.6),0 1px 2px oklch(from var(--ds8-shadow) l c h / 0.3)}
${S} .ds8-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2463d6));outline-offset:3px}
${S} .ds8-btn:disabled,${S} .ds8-btn.is-disabled{cursor:not-allowed;opacity:.55;filter:saturate(.55);transform:none}
${S} .ds8-btn[aria-busy='true']{cursor:progress}
${S} .ds8-reassure{margin-top:.75rem;color:var(--muted,#4a5568);font-size:15px;font-weight:600;line-height:1.4;text-wrap:pretty}
${S} .ds8-error{display:flex;align-items:flex-start;gap:.5rem;margin-top:.85rem;padding:.7rem .95rem;border-radius:calc(var(--radius,12px) * .75);background:var(--danger-soft,#fde8e6);color:var(--danger,#b42318);font-size:15px;font-weight:600;line-height:1.4;text-align:left}
${S} .ds8-error svg{flex:none;margin-top:.1rem}
${S} .ds8-decline{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:.5rem;padding:.25rem .5rem;color:var(--muted,#4a5568);font-size:15px;font-weight:600;line-height:1.4;text-decoration:underline;text-decoration-color:oklch(from var(--muted,#4a5568) l c h / 0.5);text-underline-offset:.2em;text-wrap:pretty}
${S} .ds8-decline:hover{color:var(--ink,#141c2e);text-decoration-color:currentColor}
${S} .ds8-decline:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2463d6));outline-offset:2px;border-radius:6px}
${S} .ds8-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
@media (max-width:899px){
${S} .ds8-split{grid-template-columns:minmax(0,1fr);min-height:0}
${S} .ds8-media{min-height:0;height:clamp(250px,70vw,440px)}
${S} .ds8-field,${S} .ds8-fan{clip-path:polygon(0 0,100% 0,100% 86%,0 100%)}
${S} .ds8-photo{clip-path:polygon(0 0,100% 0,100% 77%,0 92%)}
${S} .ds8-fan img{top:10%;width:30%}
${S} .ds8-fan-0{left:14%}
${S} .ds8-fan-1{left:35%;top:14% !important}
${S} .ds8-fan-2{left:56%}
${S} .ds8-copy{padding:1.5rem 1.25rem 2.5rem}
${S} .ds8-inner,${S} .ds8-compare,${S} .ds8-risk,${S} .ds8-action{max-width:none}
}
@media (max-width:420px){
${S} .ds8-box{padding:.9rem .95rem 1rem}
${S} .ds8-btn{padding-inline:.9rem}
}
@media (prefers-reduced-motion:no-preference){
${S} .ds8-rise{animation:ds8-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(min(var(--i,0),4) * 70ms)}
${S} .ds8-photo img{animation:ds8-settle 1.6s cubic-bezier(.2,.7,.2,1) both}
${S} .ds8-btn{transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}
${S} .ds8-spin{animation:ds8-spin .9s linear infinite}
}
@keyframes ds8-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes ds8-settle{from{transform:scale(1.06)}to{transform:scale(1)}}
@keyframes ds8-spin{to{transform:rotate(360deg)}}
`
pieces/checkout/one-click-downsell-8/specimen.tsx 40 lines
import __studioImagea80b8b7c from "../assets/6ce00d7e97ac8256.webp";
import __studioImage30966568 from "../assets/e915bc54fbf7e579.webp";
// Specimen: the second-chance kit offer after an upsell “no”, built on the photo of the kit, a guarantee seal and the sample offer.
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { OneClickDownsell8, type OneClickDownsell8State } from '../one-click-downsell-8'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
export default function OneClickDownsell8Specimen({ state = 'default' }: { state?: OneClickDownsell8State }) {
const sample = defaults.sample
const items = sample.items.map((item, i) => ({
name: item.name,
value: item.value,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}))
return (
<OneClickDownsell8
state={state}
productName={sample.name}
items={items}
price={sample.price}
priceNote={sample.note}
alternativePrice={sample.regularPrice}
ctaSublabel={`Add the kit to my order for ${sample.price}`}
sceneImage={slot(
'scene',
__studioImagea80b8b7c,
)}
sceneImageAlt='The Funnel Starter Kit: planning guide, copy workbook and launch checklist on a sunny desk'
sealImage={slot(
'seal-guarantee',
__studioImage30966568,
)}
onAction={() => new Promise<void>((resolve) => setTimeout(resolve, 1400))}
/>
)
}
| Name | Type | Details |
|---|---|---|
notice OptionalOneClickDownsell8 |
string |
Default 'Your order is saved. Here’s one lighter option before you go.'
|
opener OptionalOneClickDownsell8 |
string |
Default 'No problem.'
|
headline OptionalOneClickDownsell8 |
string |
Default 'Here’s the lighter way in.'
|
highlight OptionalOneClickDownsell8 |
string |
Default 'the lighter way in'
|
lead OptionalOneClickDownsell8 |
string |
Default 'Get {product}: the guide, workbook, and checklist in one download.'
|
productName OptionalOneClickDownsell8 |
string |
Default 'The Funnel Starter Kit'
|
points OptionalOneClickDownsell8 |
OneClickDownsell8Point[] |
Default DEFAULT_POINTS
|
items OptionalOneClickDownsell8 |
OneClickDownsell8Item[] |
Default DEFAULT_ITEMS
|
itemsLabel OptionalOneClickDownsell8 |
string |
Default 'Includes {items}'
|
sceneImage OptionalOneClickDownsell8 |
string |
|
sceneImageAlt OptionalOneClickDownsell8 |
string |
Default 'The Funnel Starter Kit: planning guide, copy workbook and launch checklist on a sunny desk'
|
sealImage OptionalOneClickDownsell8 |
string |
|
sealImageAlt OptionalOneClickDownsell8 |
string |
Default ''
|
alternativeLabel OptionalOneClickDownsell8 |
string |
Default 'One by one'
|
alternativePrice OptionalOneClickDownsell8 |
string |
Default '$97'
|
vsLabel OptionalOneClickDownsell8 |
string |
Default 'vs'
|
todayLabel OptionalOneClickDownsell8 |
string |
Default 'The kit, today'
|
price OptionalOneClickDownsell8 |
string |
Default '$47'
|
priceNote OptionalOneClickDownsell8 |
string |
Default 'One payment · Lifetime access'
|
riskTitle OptionalOneClickDownsell8 |
string |
Default 'Try it for 30 days.'
|
riskText OptionalOneClickDownsell8 |
string |
Default 'If it isn’t right for you, ask for your money back.'
|
ctaLabel OptionalOneClickDownsell8 |
string |
Default 'Yes! Try It for 30 Days'
|
ctaSublabel OptionalOneClickDownsell8 |
string |
Default 'Add the kit to my order for $47'
|
loadingLabel OptionalOneClickDownsell8 |
string |
Default 'Adding the kit to your order…'
|
reassurance OptionalOneClickDownsell8 |
string |
Default 'One click · Instant digital access'
|
errorMessage OptionalOneClickDownsell8 |
string |
Default 'We couldn’t add the kit to your order. Please try again.'
|
declineLabel OptionalOneClickDownsell8 |
string |
Default 'No thanks, continue without the kit'
|
declineHref OptionalOneClickDownsell8 |
string |
Default '#decline'
|
href OptionalOneClickDownsell8 |
string |
|
onAction OptionalOneClickDownsell8 |
() => void | Promise<void> |
|
onDecline OptionalOneClickDownsell8 |
() => void |
|
headingAs OptionalOneClickDownsell8 |
'h1' | 'h2' |
Default 'h2'
|
disabled OptionalOneClickDownsell8 |
boolean |
Default false
|
state OptionalOneClickDownsell8 |
OneClickDownsell8State |
Default 'default'
|
className OptionalOneClickDownsell8 |
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- 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.
scene- A wide atmosphere photo behind or beside the copy.
seal-guarantee- The money-back guarantee seal, on a transparent background.
-
6ce00d7e97ac8256.webp
image/webp · 122 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
e915bc54fbf7e579.webp
image/webp · 297 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB