Guarantee Band 2
Makes a long physical-product trial concrete: the buyer scrubs night by night through the refund window, sees each night is still covered, then adds to cart.
Use it in a prompt
Use offer/guarantee-band-2 from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/offer/guarantee-band-2.tsx. - Import it and pass your copy and images (Props tab):
import { GuaranteeBand2 } from "@/components/funneldna/offer/guarantee-band-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/guarantee-band-2/component.tsx 497 lines
// layout: photo-overlap-card
// Makes a long physical-product trial concrete: the buyer scrubs night by night through the refund window, sees each night is still covered, then adds to cart.
"use client"
import * as React from "react"
import { Check, ShoppingCart } from "lucide-react"
export type GuaranteeMilestone = {
/** Night on the window where this point sits (0 = delivery day). */
night: number
/** Small line above the title; defaults to copy.startLabel or copy.nightLabel. */
label?: string
title: string
detail?: string
}
export type GuaranteeClaimStep = {
title: string
detail?: string
}
/** Every visible word. Templates replace {length}, {night}, {left} and {price} as text. */
export type GuaranteeBand2Copy = {
headlineBefore: string
headlineMark: string
headlineAfter: string
lead: string
scrubberLabel: string
captionStart: string
captionMid: string
captionEnd: string
statusStart: string
statusMid: string
statusEnd: string
leftMany: string
leftOne: string
leftNone: string
ofLength: string
startLabel: string
nightLabel: string
startTitle: string
startDetail: string
midTitle: string
midDetail: string
endTitle: string
endDetail: string
claimHeading: string
terms: string
buttonLabel: string
buttonNote: string
buttonNoteNoPrice: string
productAlt: string
sealAlt: string
}
export type GuaranteeBand2Props = {
/** Length of the trial window in nights, as supplied. */
length?: number
/** Night the scrubber starts on; defaults to 40% of the window. */
initialNight?: number
/** The promise as a headline. Wrap the key phrase in <mark> for the marker stroke. */
headline?: React.ReactNode
lead?: React.ReactNode
/** Points on the window; defaults to delivery day, the middle and the last night to ask. */
milestones?: GuaranteeMilestone[]
/** How to claim, in the supplied steps. Pass [] to hide. */
steps?: GuaranteeClaimStep[]
/** The supplied terms in plain words. */
terms?: React.ReactNode
/** Price shown on the button's second line. */
price?: string
buttonLabel?: string
/** Second button line; replaces {price} and {length}. */
buttonNote?: string
href?: string
onAction?: (event: React.MouseEvent<HTMLElement>) => void
disabled?: boolean
state?: "default" | "hover" | "active" | "disabled"
/** scene slot: full-bleed photo the card overlaps. */
sceneImage?: string
sceneAlt?: string
/** product slot: transparent cut-out at the start of the window. */
productImage?: string
productAlt?: string
/** seal-guarantee slot: transparent seal at the end of the window. */
sealGuaranteeImage?: string
sealAlt?: string
copy?: Partial<GuaranteeBand2Copy>
className?: string
}
export function GuaranteeBand2({
length = 100,
initialNight,
headline,
lead,
milestones,
steps,
terms,
price,
buttonLabel,
buttonNote,
href,
onAction,
disabled = false,
state = "default",
sceneImage,
sceneAlt = "",
productImage,
productAlt,
sealGuaranteeImage,
sealAlt,
copy: copyOverrides,
className,
}: GuaranteeBand2Props) {
const copy: GuaranteeBand2Copy = { ...DEFAULT_COPY, ...definedOnly(copyOverrides) }
const total = Math.max(1, Math.round(Number.isFinite(length) ? length : 100))
const clampNight = React.useCallback((value: number) => Math.min(total, Math.max(0, Math.round(value))), [total])
const [night, setNight] = React.useState(() => clampNight(initialNight ?? total * 0.4))
React.useEffect(() => {
setNight((value) => clampNight(value))
}, [clampNight])
const uid = React.useId()
const inputId = `${uid}-scrub`
const headingId = `${uid}-heading`
const say = (template: string, extra: Record<string, string | number> = {}) =>
fill(template, { length: total, price: price ?? "", ...extra })
const left = total - night
const atEnd = night >= total
const caption = night === 0 ? say(copy.captionStart) : atEnd ? say(copy.captionEnd, { night }) : say(copy.captionMid, { night })
const status = night === 0 ? say(copy.statusStart) : atEnd ? say(copy.statusEnd) : say(copy.statusMid)
const leftText = atEnd ? say(copy.leftNone) : left === 1 ? say(copy.leftOne) : say(copy.leftMany, { left })
const source: GuaranteeMilestone[] =
milestones && milestones.length > 0
? milestones
: [
{ night: 0, title: copy.startTitle, detail: copy.startDetail },
{ night: Math.round(total / 2), title: copy.midTitle, detail: copy.midDetail },
{ night: total, title: copy.endTitle, detail: copy.endDetail },
]
const points = source.map((point) => ({ ...point, night: clampNight(point.night) })).sort((a, b) => a.night - b.night)
let current = 0
points.forEach((point, index) => {
if (point.night <= night) current = index
})
const claimSteps = (steps ?? DEFAULT_STEPS).map((step) => ({
title: say(step.title),
detail: step.detail ? say(step.detail) : undefined,
}))
const bigStep = Math.max(1, Math.round(total / 10))
const onKey = (event: React.KeyboardEvent<HTMLInputElement>) => {
const key = event.key
if (key === "PageUp" || key === "PageDown") {
event.preventDefault()
setNight((value) => clampNight(value + (key === "PageUp" ? bigStep : -bigStep)))
}
}
const hasProduct = Boolean(productImage)
const hasSeal = Boolean(sealGuaranteeImage)
const row = (area: string) => `"${[hasProduct ? "product" : "", area, hasSeal ? "seal" : ""].filter(Boolean).join(" ")}"`
const stageStyle = {
"--gb2-cols": [hasProduct ? "var(--gb2-pw)" : "", "minmax(0, 1fr)", hasSeal ? "var(--gb2-sw)" : ""].filter(Boolean).join(" "),
"--gb2-areas": ["readout", "track", "miles"].map(row).join(" "),
} as React.CSSProperties
const isDisabled = disabled || state === "disabled"
const note = say(buttonNote ?? (price ? copy.buttonNote : copy.buttonNoteNoPrice))
const buttonClass = `gb2-btn${state === "hover" ? " is-hover" : ""}${state === "active" ? " is-active" : ""}`
const buttonInner = (
<>
<span className="gb2-btn-main">
<ShoppingCart aria-hidden="true" size={20} strokeWidth={2.5} />
<span>{buttonLabel ?? copy.buttonLabel}</span>
</span>
{note ? <span className="gb2-btn-sub">{note}</span> : null}
</>
)
const leadNode = lead === undefined ? say(copy.lead) : lead
const termsNode = terms === undefined ? say(copy.terms) : terms
return (
<section
className={["cf-guarantee-band-2", sceneImage ? "has-scene" : "no-scene", className].filter(Boolean).join(" ")}
aria-labelledby={headingId}
>
<style>{CSS}</style>
{sceneImage ? (
<div className="gb2-scene">
<img src={sceneImage} alt={sceneAlt} aria-hidden={sceneAlt ? undefined : true} width={1600} height={900} decoding="async" />
</div>
) : null}
<div className="gb2-shell">
<div className="gb2-card">
<header className="gb2-head">
<h2 id={headingId} className="gb2-h2">
{headline ?? (
<>
{say(copy.headlineBefore)}
<mark>{say(copy.headlineMark)}</mark>
{say(copy.headlineAfter)}
</>
)}
</h2>
{leadNode ? <p className="gb2-lead">{leadNode}</p> : null}
</header>
<div className="gb2-stage" style={stageStyle}>
{hasProduct ? (
<div className="gb2-product">
<img src={productImage} alt={productAlt ?? say(copy.productAlt)} width={420} height={420} loading="lazy" decoding="async" />
</div>
) : null}
<div className="gb2-readout">
<div className="gb2-count" aria-hidden="true">
<span className="gb2-num">{night}</span>
<span className="gb2-of">{say(copy.ofLength)}</span>
</div>
<p className="gb2-status">
<span className="gb2-badge" aria-hidden="true">
<Check size={16} strokeWidth={3} />
</span>
<span>
<span className="gb2-status-main">{status}</span>
<span className="gb2-status-sub">{leftText}</span>
</span>
</p>
</div>
<div className="gb2-track" style={{ "--p": night / total } as React.CSSProperties}>
<div className="gb2-tag" aria-hidden="true">
{caption}
</div>
<div className="gb2-rail-wrap">
<div className="gb2-rail" aria-hidden="true">
<div className="gb2-fill" />
{points.map((point, index) => (
<span
key={`dot-${point.night}-${index}`}
className={`gb2-dot${point.night <= night ? " is-passed" : ""}`}
style={{ "--mp": point.night / total } as React.CSSProperties}
/>
))}
</div>
<input
id={inputId}
className="gb2-input"
type="range"
min={0}
max={total}
step={1}
value={night}
onChange={(event) => setNight(clampNight(Number(event.currentTarget.value)))}
onKeyDown={onKey}
aria-label={say(copy.scrubberLabel)}
aria-valuetext={`${caption}. ${leftText}`}
/>
</div>
</div>
<ol className="gb2-miles" style={{ "--n": points.length } as React.CSSProperties}>
{points.map((point, index) => {
const next = points[index + 1]
const passed = point.night <= night
const seg = next ? clamp01((night - point.night) / Math.max(1, next.night - point.night)) : 0
const label = point.label ?? (point.night === 0 ? say(copy.startLabel) : say(copy.nightLabel, { night: point.night }))
return (
<li
key={`mile-${point.night}-${index}`}
className={`gb2-mile${passed ? " is-passed" : ""}${next ? " has-next" : ""}`}
style={{ "--seg": seg } as React.CSSProperties}
>
<span className="gb2-mile-dot" aria-hidden="true" />
<button
type="button"
className="gb2-mile-btn"
aria-controls={inputId}
aria-current={index === current ? "step" : undefined}
onClick={() => setNight(point.night)}
>
<span className="gb2-mile-label">{label}</span>
<span className="gb2-mile-title">{say(point.title, { night: point.night })}</span>
{point.detail ? <span className="gb2-mile-detail">{say(point.detail, { night: point.night })}</span> : null}
</button>
</li>
)
})}
</ol>
{hasSeal ? (
<div className="gb2-seal">
<img src={sealGuaranteeImage} alt={sealAlt ?? say(copy.sealAlt)} width={340} height={340} loading="lazy" decoding="async" />
</div>
) : null}
</div>
{claimSteps.length > 0 ? (
<div className="gb2-claim">
<h3 className="gb2-claim-h">{say(copy.claimHeading)}</h3>
<ol className="gb2-steps">
{claimSteps.map((step, index) => (
<li key={`${step.title}-${index}`} className="gb2-step">
<span className="gb2-step-num" aria-hidden="true">
{index + 1}
</span>
<span>
<span className="gb2-step-title">{step.title}</span>
{step.detail ? <span className="gb2-step-detail">{step.detail}</span> : null}
</span>
</li>
))}
</ol>
</div>
) : null}
<div className="gb2-close">
<div className="gb2-terms">{typeof termsNode === "string" ? <p>{termsNode}</p> : termsNode}</div>
{href && !isDisabled ? (
<a className={buttonClass} href={href} onClick={onAction}>
{buttonInner}
</a>
) : (
<button type="button" className={buttonClass} disabled={isDisabled} onClick={isDisabled ? undefined : onAction}>
{buttonInner}
</button>
)}
</div>
</div>
</div>
</section>
)
}
export default GuaranteeBand2
const DEFAULT_COPY: GuaranteeBand2Copy = {
headlineBefore: "Sleep on it for ",
headlineMark: "{length} nights",
headlineAfter: ". Then decide.",
lead: "Your trial starts the day it arrives. Every night until night {length} is covered.",
scrubberLabel: "Scrub through your {length}-night trial",
captionStart: "Delivery day: your {length} nights start tonight",
captionMid: "Night {night}: still fully covered",
captionEnd: "Night {night}: last night to ask, still covered",
statusStart: "Covered from tonight",
statusMid: "Fully covered",
statusEnd: "Covered through tonight",
leftMany: "{left} nights left to decide",
leftOne: "1 night left to decide",
leftNone: "Ask before tonight ends",
ofLength: "/ {length}",
startLabel: "Delivery day",
nightLabel: "Night {night}",
startTitle: "It arrives",
startDetail: "Unpack it and sleep on it. Your trial starts tonight.",
midTitle: "Still deciding? Good.",
midDetail: "Halfway through and every night is still covered.",
endTitle: "Last night to ask",
endDetail: "Tell us by tonight to use your trial.",
claimHeading: "Changed your mind? Here's how you claim.",
terms: "Your {length}-night trial starts on the day your order is delivered.",
buttonLabel: "Add To Cart",
buttonNote: "{price} · Try it for {length} nights",
buttonNoteNoPrice: "Try it for {length} nights",
productAlt: "The product",
sealAlt: "{length}-night trial seal",
}
const DEFAULT_STEPS: GuaranteeClaimStep[] = [
{ title: "Tell us before night {length}", detail: "Contact us with your order details." },
{ title: "Send it back", detail: "Follow the return steps we send you." },
{ title: "Get your refund", detail: "It goes back the way you paid." },
]
function fill(template: string, values: Record<string, string | number>) {
return template.replace(/\{(\w+)\}/g, (match, key: string) => (key in values ? String(values[key]) : match))
}
function clamp01(value: number) {
return Math.min(1, Math.max(0, value))
}
function definedOnly<T extends object>(value?: Partial<T>): Partial<T> {
if (!value) return {}
return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined)) as Partial<T>
}
const CSS = `
.cf-guarantee-band-2{--gb2-shadow:var(--shadow, oklch(0.22 0.03 260));--gb2-well:color-mix(in oklch, var(--ink, #101828) 4%, var(--card, #ffffff));--gb2-rail:color-mix(in oklch, var(--ink, #101828) 13%, var(--card, #ffffff));--gb2-fill:var(--accent-fill, var(--accent, #2563eb));--gb2-marker:color-mix(in oklch, var(--marker, #fae37c) 88%, transparent);--gb2-thumb:28px;position:relative;isolation:isolate;overflow-x:clip;background:var(--surface, #ffffff);color:var(--ink, #101828);font-family:var(--font-body, inherit);padding-bottom:clamp(64px, 8.5vw, 120px)}
.cf-guarantee-band-2.no-scene{padding-top:clamp(56px, 8vw, 112px)}
.cf-guarantee-band-2 .gb2-scene{position:relative;height:clamp(260px, 36vw, 520px);overflow:hidden;background:var(--gb2-well)}
.cf-guarantee-band-2 .gb2-scene::after{content:"";position:absolute;left:0;right:0;bottom:0;height:42%;pointer-events:none;background:linear-gradient(oklch(from var(--surface, #ffffff) l c h / 0), oklch(from var(--surface, #ffffff) l c h / 0.88))}
.cf-guarantee-band-2 .gb2-scene img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 45%}
.cf-guarantee-band-2 .gb2-shell{position:relative;box-sizing:content-box;max-width:1120px;margin-inline:auto;padding-inline:clamp(16px, 5vw, 48px)}
.cf-guarantee-band-2.has-scene .gb2-shell{margin-top:calc(-1 * clamp(96px, 13vw, 200px))}
.cf-guarantee-band-2 .gb2-card{position:relative;box-sizing:border-box;background:var(--card, #ffffff);color:var(--ink, #101828);border:1px solid var(--card-border, oklch(from var(--ink, #101828) l c h / 0.12));border-radius:var(--card-radius, var(--radius, 14px));box-shadow:var(--card-shadow, var(--shadow-lg, 0 2px 4px oklch(from var(--gb2-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--gb2-shadow) l c h / 0.32)));padding:clamp(20px, 3.6vw, 48px);animation:gb2-rise .45s cubic-bezier(.2,.7,.2,1) both}
@keyframes gb2-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-guarantee-band-2 .gb2-head{max-width:52rem;margin-inline:auto;text-align:center}
.cf-guarantee-band-2 .gb2-h2{margin:0;color:var(--ink, #101828);font-family:var(--font-display, inherit);font-size:clamp(2rem, 3.6vw, 3.25rem);line-height:1.06;font-weight:var(--display-weight, 800);letter-spacing:var(--display-tracking, -0.025em);text-transform:var(--display-case, none);text-wrap:balance}
.cf-guarantee-band-2 .gb2-h2 mark{color:inherit;background-color:transparent;background-image:linear-gradient(var(--gb2-marker), var(--gb2-marker));background-repeat:no-repeat;background-size:100% 0.44em;background-position:0 86%;padding-inline:0.08em;margin-inline:-0.04em;border-radius:0.12em;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-guarantee-band-2 .gb2-lead{margin:16px auto 0;max-width:60ch;color:var(--muted, #475467);font-size:clamp(1.125rem, 1.5vw, 1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty}
.cf-guarantee-band-2 .gb2-stage{--gb2-pw:clamp(120px, 14vw, 190px);--gb2-sw:clamp(100px, 11vw, 150px);margin-top:clamp(32px, 4.5vw, 56px);display:grid;grid-template-columns:var(--gb2-cols, minmax(0, 1fr));grid-template-areas:var(--gb2-areas, "readout" "track" "miles");column-gap:clamp(16px, 2.5vw, 32px);align-items:start}
.cf-guarantee-band-2 .gb2-product{grid-area:product;align-self:center;min-width:0}
.cf-guarantee-band-2 .gb2-seal{grid-area:seal;align-self:center;min-width:0}
.cf-guarantee-band-2 .gb2-product img,.cf-guarantee-band-2 .gb2-seal img{display:block;width:100%;height:auto;aspect-ratio:1 / 1;object-fit:contain;background:transparent;border-radius:0;filter:drop-shadow(0 2px 3px oklch(from var(--gb2-shadow) l c h / 0.28)) drop-shadow(0 14px 14px oklch(from var(--gb2-shadow) l c h / 0.16))}
.cf-guarantee-band-2 .gb2-readout{grid-area:readout;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 28px;min-width:0}
.cf-guarantee-band-2 .gb2-count{display:flex;align-items:baseline;gap:6px;color:var(--ink, #101828);font-family:var(--font-display, inherit);font-weight:800;font-variant-numeric:tabular-nums}
.cf-guarantee-band-2 .gb2-num{font-size:clamp(2.5rem, 4.2vw, 3.75rem);line-height:1;letter-spacing:-0.03em}
.cf-guarantee-band-2 .gb2-of{color:var(--muted, #475467);font-size:clamp(1.3125rem, 1.8vw, 1.625rem);line-height:1.15;letter-spacing:-0.01em}
.cf-guarantee-band-2 .gb2-status{display:flex;align-items:flex-start;gap:12px;min-width:0;margin:0}
.cf-guarantee-band-2 .gb2-badge{flex:0 0 auto;display:inline-grid;place-items:center;width:28px;height:28px;margin-top:1px;border-radius:999px;background:var(--success, oklch(0.5 0.14 150));color:var(--gb2-badge-ink, #ffffff)}
.cf-guarantee-band-2 .gb2-status-main{display:block;font-size:clamp(1.125rem, 1.5vw, 1.375rem);line-height:1.25;font-weight:800}
.cf-guarantee-band-2 .gb2-status-sub{display:block;margin-top:2px;color:var(--muted, #475467);font-size:0.9375rem;line-height:1.4;font-weight:600}
.cf-guarantee-band-2 .gb2-track{grid-area:track;position:relative;min-width:0;margin-top:16px;padding-top:48px}
.cf-guarantee-band-2 .gb2-tag{position:absolute;bottom:calc(var(--gb2-thumb) + 10px);left:calc(var(--p, 0) * 100%);transform:translateX(calc(var(--p, 0) * -100%));box-sizing:border-box;width:max-content;max-width:100%;padding:6px 14px;border-radius:999px;background:var(--band, #1d2939);color:var(--band-ink, #ffffff);font-size:0.9375rem;line-height:1.35;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;box-shadow:var(--shadow-sm, 0 1px 3px oklch(from var(--gb2-shadow) l c h / 0.22));transition:left .12s ease, transform .12s ease}
.cf-guarantee-band-2 .gb2-rail-wrap{position:relative;height:var(--gb2-thumb)}
.cf-guarantee-band-2 .gb2-rail{position:absolute;left:calc(var(--gb2-thumb) / 2);right:calc(var(--gb2-thumb) / 2);top:50%;height:8px;margin-top:-4px;border-radius:999px;background:var(--gb2-rail)}
.cf-guarantee-band-2 .gb2-fill{position:absolute;left:0;top:0;bottom:0;width:calc(100% * var(--p, 0));border-radius:inherit;background:var(--gb2-fill);transition:width .12s ease}
.cf-guarantee-band-2 .gb2-dot,.cf-guarantee-band-2 .gb2-mile-dot{position:absolute;box-sizing:border-box;width:16px;height:16px;border-radius:999px;border:3px solid var(--card, #ffffff);background:color-mix(in oklch, var(--ink, #101828) 30%, var(--card, #ffffff));transition:background-color .16s ease}
.cf-guarantee-band-2 .gb2-dot{top:50%;left:calc(100% * var(--mp, 0));margin:-8px 0 0 -8px}
.cf-guarantee-band-2 .gb2-dot.is-passed,.cf-guarantee-band-2 .gb2-mile.is-passed .gb2-mile-dot{background:var(--gb2-fill)}
.cf-guarantee-band-2 .gb2-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;background:transparent;-webkit-appearance:none;appearance:none;cursor:pointer;outline:none;touch-action:pan-y}
.cf-guarantee-band-2 .gb2-input::-webkit-slider-runnable-track{height:var(--gb2-thumb);background:transparent;border:0}
.cf-guarantee-band-2 .gb2-input::-moz-range-track{height:var(--gb2-thumb);background:transparent;border:0}
.cf-guarantee-band-2 .gb2-input::-moz-range-progress{background:transparent}
.cf-guarantee-band-2 .gb2-input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;box-sizing:border-box;width:var(--gb2-thumb);height:var(--gb2-thumb);border-radius:999px;border:5px solid var(--accent, #2563eb);background:var(--card, #ffffff);box-shadow:0 1px 2px oklch(from var(--gb2-shadow) l c h / 0.3), 0 4px 10px -2px oklch(from var(--gb2-shadow) l c h / 0.32);transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease}
.cf-guarantee-band-2 .gb2-input::-moz-range-thumb{box-sizing:border-box;width:var(--gb2-thumb);height:var(--gb2-thumb);border-radius:999px;border:5px solid var(--accent, #2563eb);background:var(--card, #ffffff);box-shadow:0 1px 2px oklch(from var(--gb2-shadow) l c h / 0.3), 0 4px 10px -2px oklch(from var(--gb2-shadow) l c h / 0.32);transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease}
.cf-guarantee-band-2 .gb2-input:hover::-webkit-slider-thumb{transform:scale(1.08)}
.cf-guarantee-band-2 .gb2-input:hover::-moz-range-thumb{transform:scale(1.08)}
.cf-guarantee-band-2 .gb2-input:active::-webkit-slider-thumb{transform:scale(0.94)}
.cf-guarantee-band-2 .gb2-input:active::-moz-range-thumb{transform:scale(0.94)}
.cf-guarantee-band-2 .gb2-input:focus-visible::-webkit-slider-thumb{border-color:var(--ink, #101828);box-shadow:0 0 0 5px oklch(from var(--field-focus, var(--accent, #2563eb)) l c h / 0.4), 0 4px 10px -2px oklch(from var(--gb2-shadow) l c h / 0.32)}
.cf-guarantee-band-2 .gb2-input:focus-visible::-moz-range-thumb{border-color:var(--ink, #101828);box-shadow:0 0 0 5px oklch(from var(--field-focus, var(--accent, #2563eb)) l c h / 0.4), 0 4px 10px -2px oklch(from var(--gb2-shadow) l c h / 0.32)}
.cf-guarantee-band-2 .gb2-miles{grid-area:miles;list-style:none;margin:12px -12px 0;padding:0;display:grid;grid-template-columns:repeat(var(--n, 3), minmax(0, 1fr));gap:8px}
.cf-guarantee-band-2 .gb2-mile{position:relative;min-width:0;text-align:center}
.cf-guarantee-band-2 .gb2-mile:first-child{text-align:left}
.cf-guarantee-band-2 .gb2-mile:last-child{text-align:right}
.cf-guarantee-band-2 .gb2-mile-dot{display:none}
.cf-guarantee-band-2 .gb2-mile-btn{display:block;box-sizing:border-box;width:100%;margin:0;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:inherit;font:inherit;text-align:inherit;cursor:pointer;transition:background-color .16s ease}
.cf-guarantee-band-2 .gb2-mile-btn:hover{background:var(--gb2-well)}
.cf-guarantee-band-2 .gb2-mile-btn:focus-visible{outline:3px solid var(--field-focus, var(--accent, #2563eb));outline-offset:2px}
.cf-guarantee-band-2 .gb2-mile-label{display:block;color:var(--muted, #475467);font-size:0.875rem;line-height:1.2;font-weight:800;letter-spacing:0.06em;text-transform:uppercase;font-variant-numeric:tabular-nums}
.cf-guarantee-band-2 .gb2-mile.is-passed .gb2-mile-label{color:var(--accent, #2563eb)}
.cf-guarantee-band-2 .gb2-mile-title{display:block;margin-top:8px;color:var(--ink, #101828);font-family:var(--font-display, inherit);font-size:clamp(1.125rem, 1.5vw, 1.375rem);line-height:1.2;font-weight:var(--display-weight, 800);letter-spacing:-0.01em;text-wrap:balance}
.cf-guarantee-band-2 .gb2-mile-detail{display:block;margin-top:8px;color:var(--muted, #475467);font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.5;text-wrap:pretty}
.cf-guarantee-band-2 .gb2-claim{margin-top:clamp(32px, 4vw, 48px);padding:clamp(20px, 3vw, 32px);border-radius:10px;background:var(--gb2-well)}
.cf-guarantee-band-2 .gb2-claim-h{margin:0;color:var(--ink, #101828);font-family:var(--font-display, inherit);font-size:clamp(1.3125rem, 1.8vw, 1.625rem);line-height:1.15;font-weight:var(--display-weight, 800);letter-spacing:-0.01em;text-wrap:balance}
.cf-guarantee-band-2 .gb2-steps{list-style:none;margin:20px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit, minmax(min(100%, 240px), 1fr));gap:20px 32px}
.cf-guarantee-band-2 .gb2-step{display:grid;grid-template-columns:auto minmax(0, 1fr);gap:14px;align-items:start}
.cf-guarantee-band-2 .gb2-step-num{min-width:1ch;color:var(--accent, #2563eb);font-family:var(--font-display, inherit);font-size:clamp(1.3125rem, 1.8vw, 1.625rem);line-height:1.15;font-weight:800;font-variant-numeric:tabular-nums}
.cf-guarantee-band-2 .gb2-step-title{display:block;padding-top:2px;color:var(--ink, #101828);font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.4;font-weight:800;text-wrap:balance}
.cf-guarantee-band-2 .gb2-step-detail{display:block;margin-top:4px;color:var(--muted, #475467);font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.5;text-wrap:pretty}
.cf-guarantee-band-2 .gb2-close{margin-top:clamp(32px, 4vw, 48px);display:grid;grid-template-columns:minmax(0, 1fr) auto;align-items:center;gap:20px 40px}
.cf-guarantee-band-2 .gb2-terms{max-width:62ch;color:var(--muted, #475467);font-size:clamp(1.0625rem, 1.25vw, 1.125rem);line-height:1.5;text-wrap:pretty}
.cf-guarantee-band-2 .gb2-terms p{margin:0}
.cf-guarantee-band-2 .gb2-terms p + p{margin-top:8px}
.cf-guarantee-band-2 .gb2-terms strong{color:var(--ink, #101828);font-weight:800}
.cf-guarantee-band-2 .gb2-btn{--gb2-b:var(--button-bg, var(--cta, #e5484d));--gb2-b2:var(--button-bg-2, var(--cta-2, var(--gb2-b)));box-sizing:border-box;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:72px;min-width:320px;margin:0;padding:12px 28px;border:0;border-radius:var(--button-radius, var(--radius, 12px));background:linear-gradient(oklch(from var(--gb2-b) calc(l + 0.04) c h), oklch(from var(--gb2-b2) calc(l - 0.02) c h));color:var(--button-ink, var(--cta-ink, #ffffff));font-family:var(--button-font, var(--font-display, inherit));text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow, none);box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--gb2-b) calc(l + 0.14) c h / 0.7), inset 0 -3px 0 oklch(from var(--gb2-b) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--gb2-shadow) l c h / 0.3), 0 8px 16px -6px oklch(from var(--gb2-shadow) l c h / 0.45));cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .16s ease, box-shadow .16s ease, background .16s ease}
.cf-guarantee-band-2 .gb2-btn-main{display:inline-flex;align-items:center;justify-content:center;gap:10px;font-size:clamp(1.125rem, 1.55vw, 1.375rem);line-height:1.15;font-weight:var(--button-weight, 800);text-transform:var(--button-case, none);white-space:nowrap}
.cf-guarantee-band-2 .gb2-btn-sub{font-family:var(--font-body, inherit);font-size:0.9375rem;line-height:1.3;font-weight:600;font-variant-numeric:tabular-nums;text-wrap:pretty}
.cf-guarantee-band-2 .gb2-btn:not(:disabled):hover,.cf-guarantee-band-2 .gb2-btn.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--gb2-b) calc(l - 0.01) c h), oklch(from var(--gb2-b2) calc(l - 0.07) c h));box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--gb2-b) calc(l + 0.1) c h / 0.6), inset 0 -3px 0 oklch(from var(--gb2-b) calc(l - 0.2) c h), 0 1px 2px oklch(from var(--gb2-shadow) l c h / 0.32), 0 10px 18px -6px oklch(from var(--gb2-shadow) l c h / 0.5))}
.cf-guarantee-band-2 .gb2-btn:not(:disabled):active,.cf-guarantee-band-2 .gb2-btn.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--gb2-b) calc(l - 0.04) c h), oklch(from var(--gb2-b2) calc(l - 0.09) c h));box-shadow:inset 0 2px 4px oklch(from var(--gb2-b) calc(l - 0.24) c h / 0.5), inset 0 -2px 0 oklch(from var(--gb2-b) calc(l - 0.18) c h), 0 1px 1px oklch(from var(--gb2-shadow) l c h / 0.3)}
.cf-guarantee-band-2 .gb2-btn:focus-visible{outline:3px solid var(--field-focus, var(--accent, #2563eb));outline-offset:3px}
.cf-guarantee-band-2 .gb2-btn:disabled{background:var(--button-2-bg, var(--secondary, #e4e7ec));color:var(--button-2-ink, var(--secondary-ink, #101828));box-shadow:var(--button-2-shadow, var(--shadow-sm, 0 1px 3px oklch(from var(--gb2-shadow) l c h / 0.2)));text-shadow:none;cursor:not-allowed}
@media (max-width: 819.98px){
.cf-guarantee-band-2 .gb2-head{text-align:left;margin-inline:0}
.cf-guarantee-band-2 .gb2-lead{margin-inline:0}
.cf-guarantee-band-2 .gb2-stage{grid-template-columns:minmax(0, 1fr);grid-template-areas:"product" "readout" "track" "miles" "seal"}
.cf-guarantee-band-2 .gb2-product{width:min(220px, 70%);justify-self:center;margin-bottom:16px}
.cf-guarantee-band-2 .gb2-seal{width:132px;justify-self:center;margin-top:16px}
.cf-guarantee-band-2 .gb2-track{padding-top:64px}
.cf-guarantee-band-2 .gb2-tag{white-space:normal;text-wrap:balance}
.cf-guarantee-band-2 .gb2-miles{grid-template-columns:minmax(0, 1fr);margin:20px 0 0;gap:4px}
.cf-guarantee-band-2 .gb2-mile,.cf-guarantee-band-2 .gb2-mile:first-child,.cf-guarantee-band-2 .gb2-mile:last-child{text-align:left;padding-left:36px}
.cf-guarantee-band-2 .gb2-mile-dot{display:block;left:6px;top:10px;z-index:1}
.cf-guarantee-band-2 .gb2-mile.has-next::before,.cf-guarantee-band-2 .gb2-mile.has-next::after{content:"";position:absolute;left:11px;top:18px;bottom:-22px;width:6px;border-radius:999px}
.cf-guarantee-band-2 .gb2-mile.has-next::before{background:var(--gb2-rail)}
.cf-guarantee-band-2 .gb2-mile.has-next::after{background:var(--gb2-fill);transform:scaleY(var(--seg, 0));transform-origin:top;transition:transform .12s ease}
.cf-guarantee-band-2 .gb2-close{grid-template-columns:minmax(0, 1fr)}
.cf-guarantee-band-2 .gb2-btn{width:100%;min-width:0}
}
@media (prefers-reduced-motion: reduce){
.cf-guarantee-band-2 .gb2-card{animation:none}
.cf-guarantee-band-2 .gb2-fill,.cf-guarantee-band-2 .gb2-tag,.cf-guarantee-band-2 .gb2-dot,.cf-guarantee-band-2 .gb2-mile-dot,.cf-guarantee-band-2 .gb2-mile.has-next::after,.cf-guarantee-band-2 .gb2-mile-btn,.cf-guarantee-band-2 .gb2-btn{transition:none}
.cf-guarantee-band-2 .gb2-input::-webkit-slider-thumb{transition:none}
.cf-guarantee-band-2 .gb2-input::-moz-range-thumb{transition:none}
}
`
pieces/offer/guarantee-band-2/specimen.tsx 59 lines
import __studioImaged1a5da94 from "../assets/462446fe5bfa07c5.webp";
import __studioImage85cc8ea2 from "../assets/9f4abd19af935905.webp";
import __studioImage15c20de8 from "../assets/cf45ac2b53b6844c.webp";
// Specimen: the fictional Driftwood mattress topper with its supplied 100-night trial.
import { GuaranteeBand2 } from "../guarantee-band-2"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled"]
type SpecimenState = "default" | "hover" | "active" | "disabled"
export default function GuaranteeBand2Specimen({ state = "default" }: { state?: SpecimenState }) {
return (
<GuaranteeBand2
length={100}
initialNight={40}
state={state}
headline={
<>
Sleep on Driftwood for <mark>100 nights</mark>. Then decide.
</>
}
lead="Your trial starts the night it arrives. Love how you sleep, or send it back before night 100."
milestones={[
{ night: 0, label: "Delivery day", title: "Driftwood arrives", detail: "Unroll it on your mattress. Night one is tonight." },
{ night: 50, title: "Halfway, still covered", detail: "Give your back time to settle in. Nothing to decide yet." },
{ night: 100, title: "Last night to ask", detail: "Email us by tonight and you get a full refund." },
]}
steps={[
{ title: "Email us before night 100", detail: "Send your order number and say you'd like a refund." },
{ title: "Roll it up and send it back", detail: "We email you a return label to print." },
{ title: "Get your money back", detail: "The full price goes back to your card." },
]}
terms={
<p>
Your trial starts on the day Driftwood is delivered. <strong>Ask by night 100 and we refund the full price</strong> of your topper.
</p>
}
price="$249"
buttonNote="{price} · 100-night trial included"
sceneImage={slot(
"scene",
__studioImage85cc8ea2
)}
sceneAlt=""
productImage={slot(
"product",
__studioImaged1a5da94
)}
productAlt="Driftwood mattress topper, rolled half open"
sealGuaranteeImage={slot(
"seal-guarantee",
__studioImage15c20de8
)}
sealAlt="100-night trial seal"
/>
)
}
| Name | Type | Details |
|---|---|---|
length OptionalGuaranteeBand2 |
number |
Default 100
|
initialNight OptionalGuaranteeBand2 |
number |
|
headline OptionalGuaranteeBand2 |
React.ReactNode |
|
lead OptionalGuaranteeBand2 |
React.ReactNode |
|
milestones OptionalGuaranteeBand2 |
GuaranteeMilestone[] |
|
steps OptionalGuaranteeBand2 |
GuaranteeClaimStep[] |
|
terms OptionalGuaranteeBand2 |
React.ReactNode |
|
price OptionalGuaranteeBand2 |
string |
|
buttonLabel OptionalGuaranteeBand2 |
string |
|
buttonNote OptionalGuaranteeBand2 |
string |
|
href OptionalGuaranteeBand2 |
string |
|
onAction OptionalGuaranteeBand2 |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalGuaranteeBand2 |
boolean |
Default false
|
state OptionalGuaranteeBand2 |
"default" | "hover" | "active" | "disabled" |
Default "default"
|
sceneImage OptionalGuaranteeBand2 |
string |
|
sceneAlt OptionalGuaranteeBand2 |
string |
Default ""
|
productImage OptionalGuaranteeBand2 |
string |
|
productAlt OptionalGuaranteeBand2 |
string |
|
sealGuaranteeImage OptionalGuaranteeBand2 |
string |
|
sealAlt OptionalGuaranteeBand2 |
string |
|
copy OptionalGuaranteeBand2 |
Partial<GuaranteeBand2Copy> |
|
className OptionalGuaranteeBand2 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
product- The main product shot or cover (ebook, kit, bottle).
scene- A wide atmosphere photo behind or beside the copy.
seal-guarantee- The money-back guarantee seal, on a transparent background.
-
462446fe5bfa07c5.webp
image/webp · 61 KB
-
9f4abd19af935905.webp
image/webp · 98.9 KB
-
cf45ac2b53b6844c.webp
image/webp · 191 KB