Guarantee Badge 1
The money-back card with the CSS gold seal on the left and the guarantee headline and plain-spoken terms beside it.
Use it in a prompt
Use offer/guarantee-badge-1 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-badge-1.tsx. - Import it and pass your copy and images (Props tab):
import { GuaranteeBadge1 } from "@/components/funneldna/offer/guarantee-badge-1"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/offer/guarantee-badge-1/component.tsx 307 lines
// Puts the refund promise in writing beside a guarantee seal, with an optional checkout button.
"use client"
import * as React from "react"
import { motion, useReducedMotion } from "motion/react"
import { AlertCircle, CheckCircle2, Loader2, Lock } from "lucide-react"
export type GuaranteeBadge1Props = {
/** {days} and {refund} retain their values and approved emphasis. */
copy?: Partial<GuaranteeBadge1Copy>
sealGuaranteeImage?: string
sceneImage?: string
/** Length of the guarantee window, in days. */
days?: number
/** The guarantee as a headline. Defaults to a two-beat promise built from `days`. */
title?: React.ReactNode
/** The terms: two short paragraphs, one key phrase in <strong>. */
children?: React.ReactNode
/** Short restatements of the guarantee shown beside the seal. Pass [] to hide. */
promises?: Array<GuaranteePromise | string>
/** Generated gold guarantee seal (transparent background). */
sealSrc?: string
sealAlt?: string
/** Generated opened mailer envelope the certificate comes out of (transparent background). */
envelopeSrc?: string
/** Optional action under the terms. Omit to render the guarantee on its own. */
ctaLabel?: string
/** One short reassurance line under the button. */
ctaNote?: string
/** Deprecated: ignored. The builder wires what happens after the action. */
successMessage?: string
errorMessage?: string
/** Checkout destination. With it the button is a link. */
href?: string
/** Called on click. Return a promise to show the loading label until it settles; return false (or throw) to show the error. Never sends data by itself. */
onAction?: () => void | boolean | Promise<void | boolean>
disabled?: boolean
/** Studio preview state. */
state?: GuaranteeBadge1State
className?: string
}
export function GuaranteeBadge1({
copy: copyOverrides,
days = 30,
title,
children,
promises,
sealSrc,
sealGuaranteeImage = sealSrc,
sealAlt,
envelopeSrc,
sceneImage = envelopeSrc,
ctaLabel,
ctaNote = "",
href,
errorMessage = "We couldn’t open checkout. Please try again.",
onAction,
disabled = false,
state = "default",
className,
}: GuaranteeBadge1Props) {
const copy = { ...DEFAULT_COPY, ...Object.fromEntries(Object.entries(copyOverrides ?? {}).filter(([, value]) => value !== undefined)) }
const reduce = useReducedMotion()
const headingId = React.useId()
const forced: Status = state === "error" ? "error" : "idle"
const [status, setStatus] = React.useState<Status>(forced)
const alive = React.useRef(true)
React.useEffect(() => {
alive.current = true
return () => {
alive.current = false
}
}, [])
React.useEffect(() => {
setStatus(forced)
}, [forced])
const isDisabled = disabled || state === "disabled"
const force = state === "hover" || state === "active" ? state : undefined
const promiseList = promises ?? [{ text: copy.promiseWindow.replace("{days}", () => String(days)) }, { text: copy.promiseRefund }]
async function handleAction() {
if (isDisabled || status === "loading" || !onAction) return
try {
const pending = onAction()
if (pending instanceof Promise) setStatus("loading")
const result = await pending
if (alive.current) setStatus(result === false ? "error" : "idle")
} catch {
if (alive.current) setStatus("error")
}
}
const headline = title ?? guaranteeCopy(copy.headline, days, <span className="gb1-em">{copy.headlineRefund}</span>)
const terms = children ?? <>
<p>{guaranteeCopy(copy.termsOpening, days)}</p>
<p>{guaranteeCopy(copy.termsRefund, days, <strong>{copy.termsRefundEmphasis}</strong>)}</p>
</>
return (
<div className={cn("cf-guarantee-badge-1 gb1", className)}>
<style>{CSS}</style>
<div className="gb1-stage" data-scene={sceneImage ? "on" : "none"}>
{sceneImage ? (
<div className="gb1-envelope" aria-hidden="true">
<motion.img
src={sceneImage}
alt=""
width={1536}
height={1024}
decoding="async"
draggable={false}
initial={{ y: 18 }}
whileInView={{ y: 0 }}
viewport={{ once: true, amount: 0.3 }}
transition={reduce ? { duration: 0 } : { duration: 0.55, ease: [0.22, 1, 0.36, 1] }}
/>
</div>
) : null}
<motion.article
className="gb1-card"
aria-labelledby={headingId}
style={{ backgroundImage: PAPER_GRAIN }}
initial={{ y: -28, x: 12, rotate: 1.4 }}
whileInView={{ y: 0, x: 0, rotate: 0 }}
whileHover={reduce ? undefined : { y: -4 }}
viewport={{ once: true, amount: 0.3 }}
transition={reduce ? { duration: 0 } : { type: "spring", stiffness: 150, damping: 20, mass: 0.9 }}
>
<div className="gb1-inner" data-seal={sealGuaranteeImage ? "on" : "none"}>
{sealGuaranteeImage ? (
<div className="gb1-sealwrap">
<motion.img
className="gb1-seal"
src={sealGuaranteeImage}
alt={sealAlt ?? copy.sealAlt.replace("{days}", () => String(days))}
width={1024}
height={1024}
decoding="async"
draggable={false}
style={{ rotate: -7 }}
initial={{ scale: 1.2, rotate: -20 }}
whileInView={{ scale: 1, rotate: -7 }}
viewport={{ once: true, amount: 0.4 }}
transition={reduce ? { duration: 0 } : { type: "spring", stiffness: 260, damping: 16, delay: 0.2 }}
/>
{promiseList.length ? (
<ul className="gb1-promises">
{promiseList.map((item, index) => (
<li key={index}>
<CheckCircle2 size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{typeof item === "string" ? item : item.text}</span>
</li>
))}
</ul>
) : null}
</div>
) : null}
<div className="gb1-copy">
<h2 id={headingId} className="gb1-title">
{headline}
</h2>
<div className="gb1-terms">{terms}</div>
{ctaLabel ? (
<div className="gb1-action">
<>
{href && !isDisabled ? (
<a className="gb1-btn" href={href} data-force={force} onClick={() => void handleAction()}>
<span>{ctaLabel}</span>
</a>
) : (
<button
type="button"
className="gb1-btn"
data-force={force}
disabled={isDisabled}
aria-busy={status === "loading" ? true : undefined}
onClick={() => void handleAction()}
>
{status === "loading" ? (
<>
<Loader2 className="gb1-spin" size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{copy.loadingLabel}</span>
</>
) : (
<span>{ctaLabel}</span>
)}
</button>
)}
{status === "error" ? (
<p className="gb1-error" role="alert">
<AlertCircle size={18} strokeWidth={2.5} aria-hidden="true" />
<span>{errorMessage}</span>
</p>
) : ctaNote ? (
<p className="gb1-note">
<Lock size={15} strokeWidth={2.5} aria-hidden="true" />
<span>{ctaNote}</span>
</p>
) : null}
</>
</div>
) : null}
</div>
</div>
</motion.article>
</div>
</div>
)
}
export default GuaranteeBadge1
function cn(...values: Array<string | false | undefined>) {
return values.filter(Boolean).join(" ")
}
export type GuaranteeBadge1State = "default" | "hover" | "active" | "disabled" | "error" | "success"
type Status = "idle" | "loading" | "error"
const PAPER_GRAIN = `url("data:image/svg+xml,${encodeURIComponent(
'<svg xmlns="http://www.w3.org/2000/svg" width="180" height="180"><filter id="g"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="2" stitchTiles="stitch"/><feColorMatrix values="0 0 0 0 0.42 0 0 0 0 0.33 0 0 0 0 0.18 0 0 0 0.07 0"/></filter><rect width="100%" height="100%" filter="url(#g)"/></svg>'
)}")`
export type GuaranteePromise = { text: React.ReactNode }
const DEFAULT_COPY = {
headline: "Try it for {days} days. Love it, or get {refund}",
headlineRefund: "your money back.",
termsOpening: "Take the full {days} days to put it to work. Read every page, use every tool and see how it fits your business.",
termsRefund: "If it isn’t right for you, ask for a refund within {days} days and {refund}. That’s the promise, in writing.",
termsRefundEmphasis: "you get your money back",
promiseWindow: "{days} full days to decide",
promiseRefund: "Full refund if it’s not right",
sealAlt: "{days}-day money-back guarantee seal",
loadingLabel: "Opening secure checkout",
}
type GuaranteeBadge1Copy = typeof DEFAULT_COPY
function guaranteeCopy(template: string, days: number, refund?: React.ReactNode) {
return template.split(/(\{days\}|\{refund\})/).map((part, index) => <React.Fragment key={index}>{part === "{days}" ? days : part === "{refund}" ? refund : part}</React.Fragment>)
}
const CSS = `
.cf-guarantee-badge-1{--gb-paper:color-mix(in oklch, var(--ink) 4%, var(--card));--gb-edge:oklch(from var(--ink) l c h / 0.3);--gb-rule:oklch(from var(--ink) l c h / 0.22);--gb-marker:var(--marker, var(--warning-soft));--gb-ok:var(--success);--gb-check:var(--success);--gb-err:var(--danger);position:relative;width:100%;max-width:880px;margin-inline:auto;color:var(--ink,#101828);font-family:var(--font-body,Arial,sans-serif)}
.cf-guarantee-badge-1 *,.cf-guarantee-badge-1 *::before,.cf-guarantee-badge-1 *::after{box-sizing:border-box}
.cf-guarantee-badge-1 .gb1-stage{position:relative;padding-top:104px}
.cf-guarantee-badge-1 .gb1-envelope{position:absolute;top:0;right:4px;z-index:0;width:min(62%,250px);transform:rotate(5deg);transform-origin:50% 60%;pointer-events:none;user-select:none}
.cf-guarantee-badge-1 .gb1-envelope img{display:block;width:100%;height:auto;filter:drop-shadow(0 2px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.28)) drop-shadow(0 2px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.28))}
.cf-guarantee-badge-1 .gb1-card{position:relative;z-index:1;border-radius:var(--card-radius, var(--radius,14px));background-color:var(--gb-paper);border:1px solid var(--card-border, var(--gb-edge));box-shadow:var(--card-shadow, inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .7),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)))}
.cf-guarantee-badge-1 .gb1-card::before{content:"";position:absolute;inset:9px;border:1px solid var(--gb-rule);border-radius:max(2px,calc(var(--radius,14px) - 5px));pointer-events:none}
.cf-guarantee-badge-1 .gb1-inner{position:relative;z-index:1;display:grid;gap:18px;padding:0 22px 26px}
.cf-guarantee-badge-1 .gb1-sealwrap{display:flex;align-items:flex-start;gap:14px;margin-top:-58px;min-width:0}
.cf-guarantee-badge-1 .gb1-seal{display:block;flex:none;width:116px;height:auto;aspect-ratio:1/1;object-fit:contain;filter:drop-shadow(0 2px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.28)) drop-shadow(0 2px 2px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.28))}
.cf-guarantee-badge-1 .gb1-promises{display:grid;gap:10px;margin:0;padding:66px 0 0;list-style:none;min-width:0}
.cf-guarantee-badge-1 .gb1-promises li{display:flex;align-items:flex-start;gap:8px;font-size:.9375rem;font-weight:700;line-height:1.3;color:var(--ink,#101828);text-wrap:balance}
.cf-guarantee-badge-1 .gb1-promises svg{flex:none;margin-top:-1px;color:var(--gb-check)}
.cf-guarantee-badge-1 .gb1-copy{min-width:0}
.cf-guarantee-badge-1 .gb1-title{margin:0;max-width:19ch;font-family:var(--font-display,Arial,sans-serif);font-size:clamp(1.875rem,1.15rem + 2.6vw,2.875rem);font-weight:var(--display-weight, 800);line-height:1.06;letter-spacing:var(--display-tracking, -.025em);color:var(--ink,#101828);text-wrap:balance;text-transform:var(--display-case, none)}
.cf-guarantee-badge-1 .gb1-em{font-style:normal;white-space:nowrap;padding:0 .14em;margin:0 -.06em;background-image:linear-gradient(var(--gb-marker),var(--gb-marker));background-repeat:no-repeat;background-size:100% .62em;background-position:0 92%;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-guarantee-badge-1 .gb1-terms{display:grid;gap:12px;max-width:58ch;margin-top:16px;font-size:clamp(1.0625rem,1rem + .25vw,1.1875rem);line-height:1.6;color:var(--muted,#4a5565);text-wrap:pretty}
.cf-guarantee-badge-1 .gb1-terms p{margin:0}
.cf-guarantee-badge-1 .gb1-terms strong,.cf-guarantee-badge-1 .gb1-terms b{font-weight:700;color:var(--ink,#101828)}
.cf-guarantee-badge-1 .gb1-action{display:grid;gap:10px;margin-top:24px;justify-items:stretch}
.cf-guarantee-badge-1 .gb1-btn{position:relative;display:inline-flex;width:100%;align-items:center;justify-content:center;gap:10px;min-height:62px;padding:14px 22px;border-radius:var(--button-radius, var(--radius, 12px));border:1px solid color-mix(in oklch,var(--button-bg-2, var(--cta-2,#b42318)) 70%,var(--ink));background:linear-gradient(180deg,var(--button-bg,var(--cta)),var(--button-bg-2,oklch(from var(--button-bg,var(--cta)) calc(l - 0.05) c h)));color:var(--button-ink, var(--cta-ink,#ffffff));text-shadow:var(--button-text-shadow, 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.2) c h / 0.75));font-family:var(--button-font, var(--font-display,Arial,sans-serif));font-size:clamp(1.0625rem,1rem + .3vw,1.25rem);font-weight:var(--button-weight, 800);line-height:1.15;letter-spacing:-.005em;text-align:center;text-decoration:none;cursor:pointer;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));transition:transform .16s ease,box-shadow .16s ease,filter .16s ease;text-transform:var(--button-case, none)}
.cf-guarantee-badge-1 .gb1-btn:hover:not(:disabled),.cf-guarantee-badge-1 .gb1-btn[data-force="hover"]:not(:disabled){transform:translateY(-2px);filter:none;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -3px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-md, 0 1px 2px oklch(0.22 0.03 260 / 0.22), 0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h)}
.cf-guarantee-badge-1 .gb1-btn:active:not(:disabled),.cf-guarantee-badge-1 .gb1-btn[data-force="active"]:not(:disabled){transform:translateY(1px);filter:none;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--button-bg, var(--cta)) calc(l + 0.12) c h / 0.5),inset 0 -1px 0 oklch(from var(--button-bg, var(--cta)) calc(l - 0.16) c h),var(--shadow-sm, 0 1px 1px oklch(0.22 0.03 260 / 0.18), 0 1px 3px oklch(0.22 0.03 260 / 0.14)));background:oklch(from var(--button-bg,var(--cta)) calc(l - 0.06) c h)}
.cf-guarantee-badge-1 .gb1-btn:focus-visible{outline:3px solid var(--accent,#0f5fc2);outline-offset:3px}
.cf-guarantee-badge-1 .gb1-btn:disabled{cursor:not-allowed;background:var(--card);border-color:var(--card);color:var(--ink);text-shadow:none;box-shadow:var(--button-shadow, inset 0 1px 0 oklch(from var(--card) calc(l + 0.04) c h / .6));filter:none;transform:none}
.cf-guarantee-badge-1 .gb1-btn[aria-busy="true"]{cursor:progress}
.cf-guarantee-badge-1 .gb1-spin{flex:none;animation:gb1-spin .8s linear infinite}
@keyframes gb1-spin{to{transform:rotate(360deg)}}
.cf-guarantee-badge-1 .gb1-note{display:flex;align-items:center;justify-content:center;gap:6px;margin:0;font-size:.875rem;line-height:1.4;color:var(--muted,#4a5565);text-align:center;text-wrap:pretty}
.cf-guarantee-badge-1 .gb1-note svg{flex:none}
.cf-guarantee-badge-1 .gb1-error svg{flex:none;margin-top:1px}
.cf-guarantee-badge-1 .gb1-error{display:flex;align-items:flex-start;justify-content:center;gap:8px;margin:0;font-size:.9375rem;font-weight:700;line-height:1.45;color:var(--gb-err);text-align:center;text-wrap:pretty}
.cf-guarantee-badge-1 .gb1-stage[data-scene="none"]{padding-top:0}
.cf-guarantee-badge-1 .gb1-stage[data-scene="none"] .gb1-sealwrap{margin-top:0;align-items:center}
.cf-guarantee-badge-1 .gb1-stage[data-scene="none"] .gb1-promises{padding-top:0}
@media (max-width:767px){.cf-guarantee-badge-1 .gb1-stage[data-scene="none"] .gb1-inner{padding-top:30px}}
@media (min-width:768px){
.cf-guarantee-badge-1 .gb1-stage{padding-top:176px}
.cf-guarantee-badge-1 .gb1-envelope{right:40px;width:min(50%,430px)}
.cf-guarantee-badge-1 .gb1-inner{grid-template-columns:220px minmax(0,1fr);align-items:start;column-gap:40px;padding:48px 48px 46px 36px}
.cf-guarantee-badge-1 .gb1-inner[data-seal="none"]{grid-template-columns:minmax(0,1fr)}
.cf-guarantee-badge-1 .gb1-sealwrap{flex-direction:column;align-items:center;gap:18px;margin-top:-150px}
.cf-guarantee-badge-1 .gb1-seal{width:220px}
.cf-guarantee-badge-1 .gb1-promises{padding:0 6px;width:100%}
.cf-guarantee-badge-1 .gb1-promises li{font-size:1rem}
.cf-guarantee-badge-1 .gb1-action{margin-top:28px}
.cf-guarantee-badge-1 .gb1-stage[data-scene="none"] .gb1-inner{align-items:center}
.cf-guarantee-badge-1 .gb1-stage[data-scene="none"] .gb1-seal{width:200px}
}
@media (prefers-reduced-motion:reduce){
.cf-guarantee-badge-1 .gb1-btn{transition:none}
.cf-guarantee-badge-1 .gb1-btn:hover:not(:disabled),.cf-guarantee-badge-1 .gb1-btn[data-force="hover"]:not(:disabled){transform:none}
.cf-guarantee-badge-1 .gb1-spin{animation:none}
}
`
pieces/offer/guarantee-badge-1/specimen.tsx 34 lines
import { slot } from "../../slots";
import __studioImage94b85020 from "../assets/807d5d549af97b14.webp";
import __studioImagead3a3a2c from "../assets/5f3742ea423280c0.webp";
import defaults from "../../studio-defaults.json"
import { GuaranteeBadge1, type GuaranteeBadge1State } from "../guarantee-badge-1"
export const states = ["default", "hover", "active", "disabled", "error"]
export default function GuaranteeBadge1Specimen({ state = "default" }: { state?: string }) {
const sample = defaults.sample
return (
<GuaranteeBadge1
days={30}
state={state as GuaranteeBadge1State}
sealGuaranteeImage={slot("seal-guarantee", __studioImage94b85020)}
sealAlt="Gold 30-day money-back guarantee seal"
sceneImage={slot("scene", __studioImagead3a3a2c)}
promises={[{ text: "30 full days to decide" }, { text: "Full refund if it’s not right" }]}
ctaLabel={sample.label}
ctaNote={sample.sublabel}
errorMessage="We couldn’t open checkout. Please try again."
>
<p>
Get {sample.name} and take a full 30 days to work through the guide, the workbook and the checklist. Map your
offer, write your page copy and check every step.
</p>
<p>
If it isn’t right for you, ask for a refund within 30 days and <strong>you get your money back</strong>.
That’s our {sample.guarantee}, in writing.
</p>
</GuaranteeBadge1>
)
}
| Name | Type | Details |
|---|---|---|
copy OptionalGuaranteeBadge1 |
Partial<GuaranteeBadge1Copy> |
|
sealGuaranteeImage OptionalGuaranteeBadge1 |
string |
Default sealSrc
|
sceneImage OptionalGuaranteeBadge1 |
string |
Default envelopeSrc
|
days OptionalGuaranteeBadge1 |
number |
Default 30
|
title OptionalGuaranteeBadge1 |
React.ReactNode |
|
children OptionalGuaranteeBadge1 |
React.ReactNode |
|
promises OptionalGuaranteeBadge1 |
Array<GuaranteePromise | string> |
|
sealSrc OptionalGuaranteeBadge1 |
string |
|
sealAlt OptionalGuaranteeBadge1 |
string |
|
envelopeSrc OptionalGuaranteeBadge1 |
string |
|
ctaLabel OptionalGuaranteeBadge1 |
string |
|
ctaNote OptionalGuaranteeBadge1 |
string |
Default ""
|
successMessage OptionalGuaranteeBadge1 |
string |
|
errorMessage OptionalGuaranteeBadge1 |
string |
Default "We couldn’t open checkout. Please try again."
|
href OptionalGuaranteeBadge1 |
string |
|
onAction OptionalGuaranteeBadge1 |
() => void | boolean | Promise<void | boolean> |
|
disabled OptionalGuaranteeBadge1 |
boolean |
Default false
|
state OptionalGuaranteeBadge1 |
GuaranteeBadge1State |
Default "default"
|
className OptionalGuaranteeBadge1 |
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-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
seal-guarantee- The money-back guarantee seal, on a transparent background.
-
5f3742ea423280c0.webp
image/webp · 89.6 KB
-
807d5d549af97b14.webp
image/webp · 358 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB