Cart Drawer 4
Cart drawer that opens on the risk reversal: a framed guarantee certificate with its seal and signature, then the order, what arrives when, the value reveal and one delivery-verb checkout button.
Use it in a prompt
Use checkout/cart-drawer-4 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/cart-drawer-4.tsx. - Import it and pass your copy and images (Props tab):
import { CartDrawer4 } from "@/components/funneldna/checkout/cart-drawer-4"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/cart-drawer-4/component.tsx 887 lines
// layout: certificate-document
// Cart drawer that opens on the risk reversal: a framed guarantee certificate with its seal and signature, then the order, what arrives when, the value reveal and one delivery-verb checkout button.
'use client'
import * as React from 'react'
import { AnimatePresence, motion, useReducedMotion } from 'motion/react'
import { AlertCircle, ChevronDown, Loader2, Lock, Minus, Package, Plus, ShoppingBag, Trash2, Truck, X, Zap } from 'lucide-react'
import { Spot } from '../fx/fx'
import book from '../fx/spots/book'
export type CartDrawer4Item = {
id: string
name: string
/** Unit price as displayed, e.g. '$47'. '$0' shows copy.free. Totals are summed from these. */
price: string
/** Regular value per unit, e.g. '$67'. Feeds the value reveal; supplied values only. */
value?: string
/** Short line under the name; may carry emphasis. */
detail?: React.ReactNode
/** Product photo (theme slot item-n), ideally a transparent cut-out. */
image?: string
/** Alt text for the photo; defaults to the name. */
imageAlt?: string
/** Starting quantity, default 1. */
quantity?: number
/** Stepper ceiling, default 10. */
maxQuantity?: number
/** Included with the order: no stepper or remove, and it leaves when the last paid item is removed. */
bonus?: boolean
}
/** One paragraph of the guarantee terms: a bold lead-in, then the rest. */
export type CartDrawer4Term = { lead: React.ReactNode; body: React.ReactNode }
/** One line of the delivery well: when it arrives (bold lead-in) and what arrives. */
export type CartDrawer4Delivery = { when: React.ReactNode; what: React.ReactNode; kind?: 'instant' | 'ship' | 'other' }
/** One checkout line passed to onAction. */
export type CartDrawer4Line = { id: string; name: string; price: string; quantity: number }
/** Interface strings. Templates use {count}, {items}, {name}, {price}, {value}, {max} and {quantity}. */
export type CartDrawer4Copy = {
count: string
item: string
items: string
openCart: string
closeCart: string
quantity: string
decrease: string
increase: string
quantityChanged: string
each: string
worth: string
free: string
bonus: string
limit: string
remove: string
removed: string
undo: string
undoLabel: string
restored: string
disclosure: string
sealAlt: string
totalValue: string
butNot: string
today: string
totalToday: string
}
export type CartDrawer4State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export type CartDrawer4Props = {
items?: CartDrawer4Item[]
/** Drawer heading. */
title?: React.ReactNode
/** Text on the cart trigger button. */
triggerLabel?: string
/** The risk reversal in one bold line; wrap the key phrase in <mark> to colour it. Without it, no certificate or seal shows. */
guarantee?: React.ReactNode
/** Terms revealed by the guarantee disclosure. Empty hides the disclosure. */
guaranteeTerms?: CartDrawer4Term[]
/** Guarantee seal (theme slot seal-guarantee), transparent background. */
sealImage?: string
sealAlt?: string
/** Name set in the signature face under the guarantee line. */
signature?: string
/** Line under the signature, e.g. the signer's role. */
signatureRole?: string
/** Heading of the delivery well. */
deliveryTitle?: React.ReactNode
/** What arrives when. Empty hides the well. */
deliveryNotes?: CartDrawer4Delivery[]
/** Checkout button. {total} and {count} are replaced. */
actionLabel?: string
/** Button text while onAction's promise is pending. */
loadingLabel?: string
/** Line under the checkout button, beside the lock. */
reassurance?: string
/** Shown when onAction rejects or state is 'error'. */
errorMessage?: string
emptyTitle?: string
emptyBody?: string
emptyActionLabel?: string
/** Destination of the empty-cart button; without it the button calls onContinue and closes the overlay. */
emptyActionHref?: string
onContinue?: () => void
/** Checkout destination when no onAction is given. */
href?: string
/** Checkout with the current lines. A returned promise shows loadingLabel; a rejection shows errorMessage. */
onAction?: (lines: CartDrawer4Line[]) => void | Promise<void>
/** 'overlay' slides in from the right (a full-height bottom sheet on phones); 'inline' opens in place under the trigger. */
mode?: 'overlay' | 'inline'
defaultOpen?: boolean
copy?: Partial<CartDrawer4Copy>
/** Preview state: hover/active force the checkout button look, disabled blocks checkout, error shows errorMessage. */
state?: CartDrawer4State
className?: string
}
export function CartDrawer4(props: CartDrawer4Props) {
const {
items = [],
title = 'Your cart',
triggerLabel = 'Cart',
guarantee,
guaranteeTerms = [],
sealImage,
sealAlt,
signature,
signatureRole,
deliveryTitle = 'Here’s what lands, and when',
deliveryNotes = [],
actionLabel = 'Send me my order · {total}',
loadingLabel = 'Opening secure checkout…',
reassurance = 'Secure checkout',
errorMessage = 'We couldn’t open checkout. Please try again.',
emptyTitle = 'Your cart is empty',
emptyBody = 'Add something you’ll love and it waits right here, ready to send.',
emptyActionLabel = 'Keep shopping',
emptyActionHref,
onContinue,
href,
onAction,
mode = 'overlay',
defaultOpen = false,
copy: copyOverrides,
state = 'default',
className = '',
} = props
const copy = mergeCopy(copyOverrides)
const reduce = useReducedMotion() === true
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, '')
const overlay = mode === 'overlay'
const ids = {
panel: 'cd4-panel-' + uid,
title: 'cd4-title-' + uid,
cert: 'cd4-cert-' + uid,
terms: 'cd4-terms-' + uid,
disclose: 'cd4-disclose-' + uid,
well: 'cd4-well-' + uid,
}
const triggerRef = React.useRef<HTMLButtonElement>(null)
const panelRef = React.useRef<HTMLDivElement>(null)
const closeRef = React.useRef<HTMLButtonElement>(null)
const undoRef = React.useRef<HTMLButtonElement>(null)
const userOpened = React.useRef(false)
const alive = React.useRef(true)
const [mounted, setMounted] = React.useState(false)
const [sheet, setSheet] = React.useState(false)
const [open, setOpen] = React.useState(defaultOpen)
const [lines, setLines] = React.useState<Line[]>(() => items.map(toLine))
const [removed, setRemoved] = React.useState<{ line: Line; index: number } | null>(null)
const [termsOpen, setTermsOpen] = React.useState(false)
const [checkout, setCheckout] = React.useState<'idle' | 'loading' | 'error'>(state === 'error' ? 'error' : 'idle')
const [announce, setAnnounce] = React.useState('')
React.useEffect(() => {
alive.current = true
setMounted(true)
return () => {
alive.current = false
}
}, [])
React.useEffect(() => {
setCheckout(state === 'error' ? 'error' : 'idle')
}, [state])
React.useEffect(() => {
if (typeof window === 'undefined' || !window.matchMedia) return
const query = window.matchMedia('(max-width: 560px)')
const sync = () => setSheet(query.matches)
sync()
query.addEventListener('change', sync)
return () => query.removeEventListener('change', sync)
}, [])
const close = React.useCallback(() => {
setOpen(false)
triggerRef.current?.focus()
}, [])
React.useEffect(() => {
if (!overlay || !open) return
const previous = document.body.style.overflow
document.body.style.overflow = 'hidden'
const frame = userOpened.current ? window.requestAnimationFrame(() => closeRef.current?.focus()) : 0
return () => {
document.body.style.overflow = previous
window.cancelAnimationFrame(frame)
}
}, [overlay, open])
React.useEffect(() => {
if (!open) return
const onKey = (event: KeyboardEvent) => {
const panel = panelRef.current
if (!panel) return
const inside = panel.contains(document.activeElement)
if (event.key === 'Escape') {
if (!overlay && !inside) return
event.preventDefault()
close()
return
}
if (event.key === 'Tab' && overlay && !inside) {
const first = focusables(panel)[0]
if (first) {
event.preventDefault()
first.focus()
}
}
}
document.addEventListener('keydown', onKey)
return () => document.removeEventListener('keydown', onKey)
}, [open, overlay, close])
const trap = (event: React.KeyboardEvent<HTMLDivElement>) => {
const panel = panelRef.current
if (!overlay || event.key !== 'Tab' || !panel) return
const nodes = focusables(panel)
if (nodes.length === 0) {
event.preventDefault()
return
}
const first = nodes[0]
const last = nodes[nodes.length - 1]
const active = document.activeElement
if (event.shiftKey && (active === first || active === panel)) {
event.preventDefault()
last.focus()
} else if (!event.shiftKey && active === last) {
event.preventDefault()
first.focus()
}
}
const paid = lines.filter((line) => !line.bonus)
const visible = paid.length > 0 ? lines : []
const isEmpty = visible.length === 0
const symbol = currencyOf(items[0]?.price ?? '$')
const count = visible.reduce((n, line) => n + line.quantity, 0)
const total = visible.reduce((n, line) => n + parseMoney(line.price) * line.quantity, 0)
const valueTotal = visible.reduce((n, line) => n + parseMoney(line.value ?? line.price) * line.quantity, 0)
const fmt = (n: number) => formatMoney(n, symbol)
const totalText = fmt(total)
const countText = fill(copy.count, { count: String(count), items: count === 1 ? copy.item : copy.items })
const showReveal = valueTotal > total
const loading = checkout === 'loading'
const unavailable = state === 'disabled' || isEmpty
const showCert = !isEmpty && !!guarantee
const animateIn = mounted && !reduce
const openDrawer = () => {
userOpened.current = true
setOpen((value) => (overlay ? true : !value))
}
const clearError = () => {
if (checkout === 'error' && state !== 'error') setCheckout('idle')
}
const setQuantity = (line: Line, delta: number) => {
const max = line.maxQuantity ?? 10
const next = Math.min(max, Math.max(1, line.quantity + delta))
if (next === line.quantity || loading) return
setLines((current) => current.map((l) => (l.id === line.id ? { ...l, quantity: next } : l)))
setAnnounce(fill(copy.quantityChanged, { name: line.name, quantity: String(next) }))
clearError()
}
const remove = (line: Line) => {
const index = lines.findIndex((l) => l.id === line.id)
if (index < 0 || loading) return
setRemoved({ line, index })
setLines((current) => current.filter((l) => l.id !== line.id))
setAnnounce(fill(copy.removed, { name: line.name }))
clearError()
window.requestAnimationFrame(() => undoRef.current?.focus())
}
const undo = () => {
if (!removed) return
const { line, index } = removed
setLines((current) => {
const next = current.filter((l) => l.id !== line.id)
next.splice(Math.min(index, next.length), 0, line)
return next
})
setRemoved(null)
setAnnounce(fill(copy.restored, { name: line.name }))
panelRef.current?.focus()
}
const runCheckout = async () => {
if (unavailable || loading) return
if (state !== 'error') setCheckout('idle')
if (!onAction) return
try {
const result = onAction(visible.map((l) => ({ id: l.id, name: l.name, price: l.price, quantity: l.quantity })))
if (result && typeof (result as Promise<void>).then === 'function') {
setCheckout('loading')
await result
if (alive.current) setCheckout('idle')
}
} catch {
if (alive.current) setCheckout('error')
}
}
const force = state === 'hover' || state === 'active' ? state : undefined
const label = fill(actionLabel, { total: totalText, count: String(count) })
const ctaInner = loading ? (
<>
<Loader2 className='cd4-spin' size={20} strokeWidth={2.5} aria-hidden='true' />
<span>{loadingLabel}</span>
</>
) : (
<span>{label}</span>
)
const cta =
href && !onAction && !unavailable ? (
<a className='cd4-cta' href={href} data-force={force}>
{ctaInner}
</a>
) : (
<button
type='button'
className={'cd4-cta' + (loading ? ' is-loading' : '')}
data-force={force}
disabled={unavailable}
aria-busy={loading || undefined}
onClick={runCheckout}
>
{ctaInner}
</button>
)
const undoRow = removed ? (
<div className='cd4-undo'>
<span>{fill(copy.removed, { name: removed.line.name })}</span>
<button ref={undoRef} type='button' className='cd4-undo-btn' aria-label={fill(copy.undoLabel, { name: removed.line.name })} onClick={undo}>
{copy.undo}
</button>
</div>
) : null
const emptyView = (
<div className='cd4-empty'>
<Spot src={book} size={88} />
<h3 className='cd4-empty-title'>{emptyTitle}</h3>
<p className='cd4-empty-body'>{emptyBody}</p>
{emptyActionHref ? (
<a className='cd4-secondary' href={emptyActionHref}>
{emptyActionLabel}
</a>
) : (
<button
type='button'
className='cd4-secondary'
onClick={() => {
onContinue?.()
if (overlay) close()
}}
>
{emptyActionLabel}
</button>
)}
</div>
)
const cert = showCert ? (
<section className='cd4-cert' aria-labelledby={ids.cert}>
<div className={'cd4-cert-head' + (sealImage ? '' : ' is-noseal')}>
{sealImage ? <img className='cd4-seal' src={sealImage} alt={sealAlt ?? copy.sealAlt} width={192} height={192} /> : null}
<div className='cd4-cert-copy'>
<h3 id={ids.cert} className='cd4-promise'>
{guarantee}
</h3>
{signature ? (
<p className='cd4-sign'>
<span className='cd4-sign-name'>{signature}</span>
{signatureRole ? <span className='cd4-sign-role'>{signatureRole}</span> : null}
</p>
) : null}
</div>
</div>
{guaranteeTerms.length > 0 ? (
<>
<button
id={ids.disclose}
type='button'
className='cd4-disclose'
aria-expanded={termsOpen}
aria-controls={termsOpen ? ids.terms : undefined}
onClick={() => setTermsOpen((value) => !value)}
>
<span>{copy.disclosure}</span>
<ChevronDown className='cd4-chev' size={20} strokeWidth={2.5} aria-hidden='true' />
</button>
<AnimatePresence initial={false}>
{termsOpen ? (
<motion.div
key='terms'
id={ids.terms}
role='region'
aria-labelledby={ids.disclose}
className='cd4-terms-clip'
initial={reduce ? { opacity: 1 } : { height: 0, opacity: 0.82 }}
animate={{ height: 'auto', opacity: 1 }}
exit={reduce ? { opacity: 0, transition: { duration: 0 } } : { height: 0, opacity: 0.82 }}
transition={{ duration: reduce ? 0 : 0.3, ease: EASE }}
>
<div className='cd4-terms'>
{guaranteeTerms.map((term, i) => (
<p key={i}>
<strong>{term.lead}</strong> {term.body}
</p>
))}
</div>
</motion.div>
) : null}
</AnimatePresence>
</>
) : null}
</section>
) : null
const list = (
<ul className='cd4-items'>
{visible.map((line) => {
const unit = parseMoney(line.price)
const valueUnit = line.value ? parseMoney(line.value) : 0
const max = line.maxQuantity ?? 10
const atMax = line.quantity >= max
return (
<li key={line.id} className={'cd4-item' + (line.image ? '' : ' no-thumb')}>
{line.image ? (
<img className='cd4-thumb' src={line.image} alt={line.imageAlt ?? line.name} width={144} height={144} />
) : null}
<div className='cd4-item-main'>
<div className='cd4-item-top'>
<div className='cd4-item-text'>
{line.bonus ? <span className='cd4-bonus'>{copy.bonus}</span> : null}
<h3 className='cd4-name'>{line.name}</h3>
{line.detail ? <p className='cd4-detail'>{line.detail}</p> : null}
</div>
<div className='cd4-price'>
<span className={'cd4-amount' + (unit === 0 ? ' is-free' : '')}>{unit === 0 ? copy.free : fmt(unit * line.quantity)}</span>
{valueUnit > unit ? <span className='cd4-worth'>{fill(copy.worth, { value: fmt(valueUnit * line.quantity) })}</span> : null}
{line.quantity > 1 && unit > 0 ? <span className='cd4-worth'>{fill(copy.each, { price: line.price })}</span> : null}
</div>
</div>
{line.bonus ? null : (
<div className='cd4-controls'>
<div className='cd4-stepper' role='group' aria-label={fill(copy.quantity, { name: line.name })}>
<button
type='button'
aria-label={fill(copy.decrease, { name: line.name })}
disabled={line.quantity <= 1 || loading}
onClick={() => setQuantity(line, -1)}
>
<Minus size={18} strokeWidth={2.5} aria-hidden='true' />
</button>
<span className='cd4-qty'>{line.quantity}</span>
<button
type='button'
aria-label={fill(copy.increase, { name: line.name })}
disabled={atMax || loading}
onClick={() => setQuantity(line, 1)}
>
<Plus size={18} strokeWidth={2.5} aria-hidden='true' />
</button>
</div>
<button
type='button'
className='cd4-remove'
aria-label={fill(copy.remove, { name: line.name })}
disabled={loading}
onClick={() => remove(line)}
>
<Trash2 size={18} strokeWidth={2.5} aria-hidden='true' />
</button>
{atMax ? <span className='cd4-limit'>{fill(copy.limit, { max: String(max) })}</span> : null}
</div>
)}
</div>
</li>
)
})}
</ul>
)
const well =
deliveryNotes.length > 0 ? (
<section className='cd4-well' aria-labelledby={ids.well}>
<h3 id={ids.well} className='cd4-well-title'>
{deliveryTitle}
</h3>
<ul className='cd4-notes'>
{deliveryNotes.map((note, i) => {
const Icon = note.kind === 'instant' ? Zap : note.kind === 'ship' ? Truck : Package
return (
<li key={i} className='cd4-note'>
<Icon size={18} strokeWidth={2.5} aria-hidden='true' />
<span>
<strong>{note.when}</strong> {note.what}
</span>
</li>
)
})}
</ul>
</section>
) : null
const foot = isEmpty ? null : (
<div className='cd4-foot'>
{showReveal ? (
<div className='cd4-reveal'>
<p className='cd4-rv-col'>
<span className='cd4-rv-label'>{copy.totalValue}</span>
<span className='cd4-rv-value'>{fmt(valueTotal)}</span>
</p>
<p className='cd4-rv-but'>{copy.butNot}</p>
<p className='cd4-rv-col is-today'>
<span className='cd4-rv-label'>{copy.today}</span>
<motion.span
key={totalText}
className='cd4-rv-today'
initial={animateIn ? { scale: 0.9, opacity: 0.82 } : false}
animate={{ scale: 1, opacity: 1 }}
transition={{ duration: 0.3, ease: EASE }}
>
{totalText}
</motion.span>
</p>
</div>
) : (
<p className='cd4-total'>
<span className='cd4-rv-label'>{copy.totalToday}</span>
<span className='cd4-rv-today'>{totalText}</span>
</p>
)}
{checkout === 'error' ? (
<p className='cd4-error' role='alert'>
<AlertCircle className='cd4-inl' size={18} strokeWidth={2.5} aria-hidden='true' />
{errorMessage}
</p>
) : null}
{cta}
{reassurance ? (
<p className='cd4-reassure'>
<Lock className='cd4-inl' size={16} strokeWidth={2.5} aria-hidden='true' />
{reassurance}
</p>
) : null}
</div>
)
const panelClass = 'cd4-panel' + (overlay ? ' is-overlay' : ' is-inline') + (animateIn ? ' is-animate' : '')
const content = (
<>
<div className='cd4-grab' aria-hidden='true' />
<header className='cd4-head'>
<div className='cd4-head-text'>
<h2 id={ids.title} className='cd4-title'>
{title}
</h2>
{isEmpty ? null : <span className='cd4-count'>{countText}</span>}
</div>
<button ref={closeRef} type='button' className='cd4-close' aria-label={copy.closeCart} onClick={close}>
<X size={20} strokeWidth={2.5} aria-hidden='true' />
</button>
</header>
<div className='cd4-body'>
{isEmpty ? (
<>
{undoRow}
{emptyView}
</>
) : (
<>
{cert}
{list}
{undoRow}
{well}
</>
)}
</div>
{foot}
</>
)
const enter = reduce ? { opacity: 0 } : sheet ? { y: '100%' } : { x: '100%' }
return (
<div className={('cf-cart-drawer-4 ' + className).trim()}>
<style>{CSS}</style>
<button
ref={triggerRef}
type='button'
className='cd4-trigger'
aria-haspopup={overlay ? 'dialog' : undefined}
aria-expanded={open}
aria-controls={ids.panel}
aria-label={fill(copy.openCart, { count: countText })}
onClick={openDrawer}
>
<ShoppingBag size={20} strokeWidth={2.5} aria-hidden='true' />
<span>{triggerLabel}</span>
{count > 0 ? <span className='cd4-trigger-count'>{count}</span> : null}
</button>
<p className='cd4-sr' aria-live='polite'>
{announce}
</p>
{overlay ? (
<AnimatePresence initial={false}>
{open
? [
<motion.div
key='scrim'
className='cd4-scrim'
aria-hidden='true'
onClick={close}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
transition={{ duration: reduce ? 0 : 0.24 }}
/>,
<motion.div
key='panel'
ref={panelRef}
id={ids.panel}
role='dialog'
aria-modal='true'
aria-labelledby={ids.title}
tabIndex={-1}
className={panelClass}
onKeyDown={trap}
initial={enter}
animate={{ x: 0, y: 0, opacity: 1 }}
exit={enter}
transition={{ duration: reduce ? 0.12 : 0.34, ease: EASE }}
>
{content}
</motion.div>,
]
: null}
</AnimatePresence>
) : open ? (
<div ref={panelRef} id={ids.panel} role='region' aria-labelledby={ids.title} tabIndex={-1} className={panelClass}>
{content}
</div>
) : null}
</div>
)
}
export default CartDrawer4
type Line = CartDrawer4Item & { quantity: number }
const EASE: [number, number, number, number] = [0.2, 0.7, 0.2, 1]
const FOCUSABLE = `a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1'])`
const COPY: CartDrawer4Copy = {
count: '{count} {items}',
item: 'item',
items: 'items',
openCart: 'Open cart, {count}',
closeCart: 'Close cart',
quantity: 'Quantity of {name}',
decrease: 'Decrease quantity of {name}',
increase: 'Increase quantity of {name}',
quantityChanged: '{name}: quantity {quantity}',
each: '{price} each',
worth: 'Worth {value}',
free: 'Free',
bonus: 'Free bonus',
limit: 'Limit {max} per order',
remove: 'Remove {name}',
removed: 'Removed {name}.',
undo: 'Undo',
undoLabel: 'Put {name} back in your cart',
restored: '{name} is back in your cart.',
disclosure: 'What does the guarantee cover?',
sealAlt: 'Money-back guarantee seal',
totalValue: 'Total value',
butNot: 'But you won’t pay that.',
today: 'Today',
totalToday: 'Total today',
}
function toLine(item: CartDrawer4Item): Line {
return { ...item, quantity: Math.max(1, Math.round(item.quantity ?? 1)) }
}
function mergeCopy(overrides?: Partial<CartDrawer4Copy>): CartDrawer4Copy {
const copy: CartDrawer4Copy = { ...COPY }
if (!overrides) return copy
for (const key of Object.keys(overrides) as (keyof CartDrawer4Copy)[]) {
const value = overrides[key]
if (value !== undefined) copy[key] = value
}
return copy
}
function fill(template: string, values: Record<string, string>): string {
return Object.keys(values).reduce((text, key) => text.split('{' + key + '}').join(values[key]), template)
}
function parseMoney(text: string): number {
const n = Number(text.replace(/[^0-9.]/g, ''))
return Number.isFinite(n) ? n : 0
}
function currencyOf(text: string): string {
const match = text.trim().match(/^[^0-9]+/)
return match ? match[0].trim() : '$'
}
function formatMoney(n: number, symbol: string): string {
const whole = Math.abs(n - Math.round(n)) < 0.005
return symbol + n.toLocaleString('en-US', { minimumFractionDigits: whole ? 0 : 2, maximumFractionDigits: 2 })
}
function focusables(root: HTMLElement): HTMLElement[] {
return Array.from(root.querySelectorAll<HTMLElement>(FOCUSABLE)).filter((node) => node.getClientRects().length > 0)
}
const CSS = `
.cf-cart-drawer-4{--cd4-well:color-mix(in oklch,var(--ink) 4%,var(--card));--cd4-well-hover:color-mix(in oklch,var(--ink) 8%,var(--card));--cd4-line:oklch(from var(--ink) l c h / 0.12);--cd4-sh:var(--shadow,oklch(0.22 0.03 260));--signature-font:var(--signature-face,var(--font-display));display:grid;justify-items:center;font-family:var(--font-body);color:var(--ink)}
.cf-cart-drawer-4 *,.cf-cart-drawer-4 *::before,.cf-cart-drawer-4 *::after{box-sizing:border-box}
.cf-cart-drawer-4 :where(h2,h3,p,ul){margin:0}
.cf-cart-drawer-4 :where(button,a){font:inherit}
.cf-cart-drawer-4 :where(button,a):focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cd4-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.cd4-inl{display:inline-block;vertical-align:-0.15em;margin-inline-end:0.4em}
.cd4-trigger{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:56px;padding:0 20px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1.0625rem;line-height:1.15;box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:pointer;transition:transform .16s ease,background .16s ease}
.cd4-trigger:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h)}
.cd4-trigger:active{transform:translateY(1px)}
.cd4-trigger-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 10px;border-radius:999px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));font-size:0.875rem;font-weight:800;font-variant-numeric:tabular-nums}
.cd4-scrim{position:fixed;inset:0;z-index:1000;background:oklch(from var(--band) l c h / 0.6)}
.cd4-panel{display:flex;flex-direction:column;min-height:0;background:var(--card);color:var(--ink);font-family:var(--font-body);overflow:hidden;outline:none}
.cd4-panel.is-overlay{position:fixed;z-index:1001;top:0;right:0;bottom:0;width:min(468px,100vw);border-radius:var(--card-radius,var(--radius,14px)) 0 0 var(--card-radius,var(--radius,14px));box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--cd4-sh) l c h / 0.22),0 12px 24px -8px oklch(from var(--cd4-sh) l c h / 0.32))}
.cd4-panel.is-inline{width:min(468px,100%);margin-top:12px;border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md))}
.cd4-grab{display:none}
.cd4-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px 8px}
.cd4-head-text{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;min-width:0}
.cd4-title{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance}
.cd4-count{font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--muted)}
.cd4-close{flex:none;display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:999px;background:var(--cd4-well);color:var(--ink);cursor:pointer;transition:background .16s ease}
.cd4-close:hover{background:var(--cd4-well-hover)}
.cd4-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:24px;padding:12px 24px 24px;overflow-y:auto;overscroll-behavior:contain}
.cd4-panel.is-inline .cd4-body{overflow:visible}
.cd4-cert{padding:20px;border:1px solid oklch(from var(--ink) l c h / 0.16);border-radius:var(--card-radius,var(--radius,14px));outline:1px solid oklch(from var(--ink) l c h / 0.08);outline-offset:-7px}
.cd4-cert-head{display:grid;grid-template-columns:96px minmax(0,1fr);gap:16px;align-items:center}
.cd4-cert-head.is-noseal{grid-template-columns:minmax(0,1fr)}
.cd4-seal{display:block;width:96px;height:96px;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--cd4-sh) l c h / 0.3)) drop-shadow(0 8px 10px oklch(from var(--cd4-sh) l c h / 0.2))}
.cd4-cert-copy{min-width:0}
.cd4-promise{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--ink);text-wrap:balance}
.cd4-promise mark{background:none;color:var(--accent)}
.cd4-sign{display:grid;gap:2px;margin-top:12px}
.cd4-sign-name{font-family:var(--signature-font);font-weight:var(--signature-weight,800);font-size:1.125rem;line-height:1.2;letter-spacing:-0.01em;color:var(--signature-ink,var(--ink))}
.cd4-sign-role{font-size:0.875rem;font-weight:600;line-height:1.3;color:var(--muted)}
.cd4-disclose{display:flex;width:100%;min-height:48px;margin-top:16px;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;border:0;border-radius:10px;background:var(--cd4-well);color:var(--ink);font-size:1rem;font-weight:700;line-height:1.3;text-align:left;cursor:pointer;transition:background .16s ease}
.cd4-disclose:hover{background:var(--cd4-well-hover)}
.cd4-chev{flex:none;color:var(--accent);transition:transform .2s ease}
.cd4-disclose[aria-expanded=true] .cd4-chev{transform:rotate(180deg)}
.cd4-terms-clip{overflow:hidden}
.cd4-terms{display:grid;gap:10px;padding:14px 4px 2px}
.cd4-terms p{font-size:1rem;line-height:1.5;color:var(--ink);text-wrap:pretty}
.cd4-terms strong{font-weight:800}
.cd4-items{display:grid;padding:0;list-style:none}
.cd4-item{display:grid;grid-template-columns:72px minmax(0,1fr);gap:14px;align-items:start;padding:16px 0}
.cd4-item:first-child{padding-top:0}
.cd4-item:last-child{padding-bottom:0}
.cd4-item+.cd4-item{border-top:1px solid var(--cd4-line)}
.cd4-item.no-thumb{grid-template-columns:minmax(0,1fr)}
.cd4-thumb{display:block;width:72px;height:72px;object-fit:contain;filter:drop-shadow(0 2px 3px oklch(from var(--cd4-sh) l c h / 0.28)) drop-shadow(0 6px 8px oklch(from var(--cd4-sh) l c h / 0.16))}
.cd4-item-main{min-width:0}
.cd4-item-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.cd4-item-text{min-width:0}
.cd4-bonus{display:inline-flex;align-items:center;height:28px;margin-bottom:6px;padding:0 12px;border-radius:999px;background:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card));font-size:0.875rem;font-weight:800;line-height:1}
.cd4-name{font-family:var(--font-display);font-weight:800;font-size:1.0625rem;line-height:1.25;color:var(--ink);text-wrap:balance}
.cd4-detail{margin-top:4px;font-size:0.9375rem;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cd4-price{display:grid;justify-items:end;gap:2px;flex:none;text-align:right}
.cd4-amount{font-family:var(--font-display);font-weight:800;font-size:1.125rem;line-height:1.2;color:var(--ink);font-variant-numeric:tabular-nums}
.cd4-amount.is-free{color:var(--success)}
.cd4-worth{font-size:0.875rem;font-weight:600;line-height:1.3;color:var(--muted);white-space:nowrap}
.cd4-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}
.cd4-stepper{display:inline-flex;align-items:center;height:44px;border:1px solid var(--field-border,color-mix(in oklch,var(--ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,12px));background:var(--field);color:var(--field-ink);overflow:hidden}
.cd4-stepper button{display:grid;place-items:center;width:42px;height:42px;padding:0;border:0;background:transparent;color:inherit;cursor:pointer;transition:background .16s ease}
.cd4-stepper button:hover:not(:disabled){background:color-mix(in oklch,var(--field-ink) 7%,var(--field))}
.cd4-stepper button:active:not(:disabled){background:color-mix(in oklch,var(--field-ink) 12%,var(--field))}
.cd4-stepper button:disabled{color:color-mix(in oklch,var(--field-ink) 40%,var(--field));cursor:not-allowed}
.cd4-stepper button:focus-visible{outline-offset:-3px}
.cd4-qty{min-width:32px;font-weight:800;font-size:1.0625rem;text-align:center;font-variant-numeric:tabular-nums}
.cd4-remove{display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:999px;background:transparent;color:var(--muted);cursor:pointer;transition:background .16s ease,color .16s ease}
.cd4-remove:hover:not(:disabled){background:var(--danger-soft);color:var(--danger)}
.cd4-remove:disabled{cursor:not-allowed}
.cd4-limit{font-size:0.875rem;font-weight:600;color:var(--muted)}
.cd4-undo{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:8px 8px 8px 16px;border-radius:10px;background:var(--cd4-well);font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--ink)}
.cd4-undo-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 20px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:0.9375rem;line-height:1.15;box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:pointer;transition:transform .16s ease,background .16s ease}
.cd4-undo-btn:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h)}
.cd4-undo-btn:active{transform:translateY(1px);background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.07) c h)}
.cd4-well{padding:18px 20px;border-radius:10px;background:var(--cd4-well)}
.cd4-well-title{margin-bottom:12px;font-family:var(--font-display);font-weight:800;font-size:1.0625rem;line-height:1.25;color:var(--ink);text-wrap:balance}
.cd4-notes{display:grid;gap:12px;padding:0;list-style:none}
.cd4-note{display:grid;grid-template-columns:18px minmax(0,1fr);gap:12px;align-items:start;font-size:1rem;line-height:1.45;color:var(--ink);text-wrap:pretty}
.cd4-note svg{margin-top:3px;color:var(--accent)}
.cd4-note strong{font-weight:800}
.cd4-foot{flex:none;display:grid;gap:14px;padding:18px 24px max(20px,env(safe-area-inset-bottom));background:color-mix(in oklch,var(--ink) 3%,var(--card))}
.cd4-reveal{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:12px}
.cd4-rv-col{display:grid;gap:6px}
.cd4-rv-col.is-today{justify-items:end;text-align:right}
.cd4-rv-label{font-size:0.875rem;font-weight:800;line-height:1.2;color:var(--muted)}
.cd4-rv-value{font-family:var(--font-display);font-weight:800;font-size:1.625rem;line-height:1;letter-spacing:-0.03em;color:var(--muted);font-variant-numeric:tabular-nums;text-decoration:line-through;text-decoration-color:var(--danger);text-decoration-thickness:3px}
.cd4-rv-but{padding-bottom:4px;font-size:0.9375rem;font-weight:600;line-height:1.3;color:var(--muted);text-align:center;text-wrap:balance}
.cd4-rv-today{display:inline-block;font-family:var(--font-display);font-weight:800;font-size:2.5rem;line-height:1;letter-spacing:-0.03em;color:var(--ink);font-variant-numeric:tabular-nums}
.cd4-total{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.cd4-error{padding:12px 14px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:0.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty}
.cd4-cta{display:flex;width:100%;min-height:64px;align-items:center;justify-content:center;gap:10px;padding:10px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + 0.04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--cd4-sh) l c h / 0.3),0 8px 16px -6px oklch(from var(--cd4-sh) l c h / 0.45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cd4-cta:hover:not(:disabled),.cd4-cta[data-force=hover]{background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - 0.01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.07) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.1) c h / 0.6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.2) c h),0 1px 2px oklch(from var(--cd4-sh) l c h / 0.34),0 10px 20px -6px oklch(from var(--cd4-sh) l c h / 0.52))}
.cd4-cta:active:not(:disabled),.cd4-cta[data-force=active]{transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) 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 4px oklch(from var(--button-bg-2,var(--cta-2)) calc(l - 0.16) c h / 0.6),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.18) c h),0 1px 2px oklch(from var(--cd4-sh) l c h / 0.3)}
.cd4-cta:disabled{background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:none;cursor:not-allowed}
.cd4-cta.is-loading{cursor:progress}
.cd4-spin{flex:none;animation:cd4-spin .8s linear infinite}
.cd4-reassure{font-size:0.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-align:center;text-wrap:pretty}
.cd4-empty{display:grid;justify-items:center;gap:12px;margin:auto 0;padding:40px 8px 24px;text-align:center}
.cd4-empty-title{font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--ink);text-wrap:balance}
.cd4-empty-body{max-width:34ch;font-size:1.0625rem;line-height:1.5;color:var(--muted);text-wrap:pretty}
.cd4-secondary{display:inline-flex;min-height:56px;margin-top:12px;align-items:center;justify-content:center;padding:0 28px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1.125rem;line-height:1.15;text-decoration:none;box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:pointer;transition:transform .16s ease,background .16s ease}
.cd4-secondary:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h)}
.cd4-secondary:active{transform:translateY(1px)}
.cd4-panel.is-animate .cd4-body>*{animation:cd4-rise .45s cubic-bezier(.2,.7,.2,1) both}
.cd4-panel.is-animate .cd4-body>:nth-child(2){animation-delay:.07s}
.cd4-panel.is-animate .cd4-body>:nth-child(3){animation-delay:.14s}
.cd4-panel.is-animate .cd4-body>:nth-child(4){animation-delay:.21s}
@keyframes cd4-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cd4-spin{to{transform:rotate(360deg)}}
@media (max-width:560px){
.cd4-panel.is-overlay{top:auto;left:0;width:100%;height:calc(100dvh - 8px);border-radius:var(--card-radius,var(--radius,14px)) var(--card-radius,var(--radius,14px)) 0 0}
.cd4-panel.is-overlay .cd4-grab{display:block;flex:none;width:44px;height:5px;margin:10px auto 0;border-radius:999px;background:oklch(from var(--ink) l c h / 0.22)}
.cd4-head{padding:12px 20px 6px}
.cd4-body{gap:20px;padding:10px 20px 20px}
.cd4-foot{padding:16px 20px max(18px,env(safe-area-inset-bottom))}
.cd4-cert{padding:16px}
.cd4-cert-head{grid-template-columns:60px minmax(0,1fr);gap:12px;align-items:start}
.cd4-cert-head.is-noseal{grid-template-columns:minmax(0,1fr)}
.cd4-seal{width:60px;height:60px}
.cd4-sign-name{font-size:1.0625rem}
.cd4-item{grid-template-columns:60px minmax(0,1fr);gap:12px}
.cd4-item.no-thumb{grid-template-columns:minmax(0,1fr)}
.cd4-thumb{width:60px;height:60px}
}
@media (prefers-reduced-motion:reduce){
.cf-cart-drawer-4 *,.cf-cart-drawer-4 *::before,.cf-cart-drawer-4 *::after{animation:none!important;transition:none!important}
.cd4-cta:active:not(:disabled),.cd4-cta[data-force=active],.cd4-trigger:active,.cd4-secondary:active,.cd4-undo-btn:active{transform:none}
}
`
pieces/checkout/cart-drawer-4/specimen.tsx 78 lines
import __studioImage66c15b0b from "../assets/0e8cdbb96c672dca.webp";
import __studioImage9f0dee03 from "../assets/5ae716425c6febbb.webp";
import __studioImage6373632f from "../assets/2e115ae7ed935037.webp";
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { CartDrawer4, type CartDrawer4State } from '../cart-drawer-4'
export const states = ['default', 'hover', 'active', 'disabled', 'error'] as const
export default function CartDrawer4Specimen({ state = 'default' }: { state?: CartDrawer4State }) {
const sample = defaults.sample
return (
<CartDrawer4
state={state}
defaultOpen
title='Your homestead order'
triggerLabel='Cart'
guarantee={
<>
Try it all for 30 days. Love it, or get <mark>every penny back</mark>.
</>
}
sealImage={slot(
'seal-guarantee',
__studioImage66c15b0b
)}
sealAlt={sample.guarantee + ' seal'}
signature='Mara Ellis'
signatureRole='Author, The Backyard Homestead'
guaranteeTerms={[
{
lead: 'Read it, plant it, try it.',
body: 'Work through the book and every lesson in the video course for a full 30 days, on your own schedule.',
},
{
lead: 'Not for you? Send one email.',
body: 'Ask within 30 days and you get every penny back. No forms, no hoops, no hard feelings.',
},
]}
items={[
{
id: 'book',
name: 'The Backyard Homestead',
detail: 'Hardcover guide to growing, raising and preserving your own food.',
price: sample.price,
value: '$67',
image: slot(
'item-1',
__studioImage9f0dee03
),
imageAlt: 'The Backyard Homestead hardcover book',
maxQuantity: 5,
},
{
id: 'course',
name: 'Backyard Homestead Video Course',
detail: 'Watch each project step by step, from first bed to first harvest.',
price: '$0',
value: '$30',
bonus: true,
image: slot(
'item-2',
__studioImage6373632f
),
imageAlt: 'Backyard Homestead Video Course on a laptop and tablet',
},
]}
deliveryTitle='Here’s what lands, and when'
deliveryNotes={[
{ kind: 'instant', when: 'Right after checkout:', what: 'your video course unlocks and the login lands in your inbox.' },
{ kind: 'ship', when: 'In 3–5 business days:', what: 'your hardcover arrives at your door, ready to dog-ear.' },
]}
actionLabel='Rush my copy · {total}'
reassurance='Secure checkout · One payment, no subscription'
onAction={() => {}}
/>
)
}
| Name | Type | Details |
|---|---|---|
items OptionalCartDrawer4 |
CartDrawer4Item[] |
|
title OptionalCartDrawer4 |
React.ReactNode |
|
triggerLabel OptionalCartDrawer4 |
string |
|
guarantee OptionalCartDrawer4 |
React.ReactNode |
|
guaranteeTerms OptionalCartDrawer4 |
CartDrawer4Term[] |
|
sealImage OptionalCartDrawer4 |
string |
|
sealAlt OptionalCartDrawer4 |
string |
|
signature OptionalCartDrawer4 |
string |
|
signatureRole OptionalCartDrawer4 |
string |
|
deliveryTitle OptionalCartDrawer4 |
React.ReactNode |
|
deliveryNotes OptionalCartDrawer4 |
CartDrawer4Delivery[] |
|
actionLabel OptionalCartDrawer4 |
string |
|
loadingLabel OptionalCartDrawer4 |
string |
|
reassurance OptionalCartDrawer4 |
string |
|
errorMessage OptionalCartDrawer4 |
string |
|
emptyTitle OptionalCartDrawer4 |
string |
|
emptyBody OptionalCartDrawer4 |
string |
|
emptyActionLabel OptionalCartDrawer4 |
string |
|
emptyActionHref OptionalCartDrawer4 |
string |
|
onContinue OptionalCartDrawer4 |
() => void |
|
href OptionalCartDrawer4 |
string |
|
onAction OptionalCartDrawer4 |
(lines: CartDrawer4Line[]) => void | Promise<void> |
|
mode OptionalCartDrawer4 |
'overlay' | 'inline' |
|
defaultOpen OptionalCartDrawer4 |
boolean |
|
copy OptionalCartDrawer4 |
Partial<CartDrawer4Copy> |
|
state OptionalCartDrawer4 |
CartDrawer4State |
|
className OptionalCartDrawer4 |
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-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
seal-guarantee- The money-back guarantee seal, on a transparent background.
-
0e8cdbb96c672dca.webp
image/webp · 78.2 KB
-
2e115ae7ed935037.webp
image/webp · 75.5 KB
-
5ae716425c6febbb.webp
image/webp · 73.7 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
bc3d360c88eeac0e.webp
image/webp · 23.9 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB