Freebie Delivery 1
Hands the new lead their free guide on the thank-you page: its cover, a "your price today: Free" ledger and one big download button.
Use it in a prompt
Use checkout/freebie-delivery 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/freebie-delivery.tsx. - Import it and pass your copy and images (Props tab):
import { FreebieDelivery } from "@/components/funneldna/checkout/freebie-delivery"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/freebie-delivery/component.tsx 319 lines
// Hands the new lead their free guide on the thank-you page: its cover, a "your price today: Free" ledger and one big download button.
// layout: ledger-receipt
import * as React from "react"
import { AlertCircle, CheckCircle2, Loader2, Mail } from "lucide-react"
export type FreebieDeliveryLine = {
label: string
value: string
// Extra line of small print under the row.
detail?: string
// Shows the value as a crossed-out anchor (use only a supplied regular value).
struck?: boolean
}
export type FreebieDeliveryProps = {
headline?: string
// Phrase inside the headline that gets the marker stroke.
highlight?: string
lead?: string
// Slot "product": transparent cover mockup of the lead magnet.
coverImage?: string
coverAlt?: string
// Small chip resting on the cover.
readyLabel?: string
lines?: FreebieDeliveryLine[]
// Accessible name of the ledger card.
ledgerLabel?: string
totalLabel?: string
totalValue?: string
actionLabel?: string
loadingLabel?: string
// File type and size shown on the button's second line.
fileType?: string
fileSize?: string
inboxNote?: string
// Used when `email` is set; {email} is replaced with the address.
inboxNoteWithEmail?: string
email?: string
errorMessage?: string
// File URL; renders the button as a download link.
href?: string
// Download attribute: true keeps the server file name, a string renames the file.
download?: boolean | string
onAction?: () => void
// Shows the preparing state on the button while the file is fetched.
loading?: boolean
state?: "default" | "hover" | "active" | "disabled" | "error"
className?: string
}
export function FreebieDelivery(props: FreebieDeliveryProps) {
const {
headline = "Your free guide is ready",
highlight = "is ready",
lead = "Map your offer and the pages your funnel needs. Open it now and plan your first funnel today.",
coverImage,
coverAlt = "Funnel Planning Guide cover",
readyLabel = "Ready to download",
lines = DEFAULT_LINES,
ledgerLabel = "Your delivery",
totalLabel = "Your price today",
totalValue = "Free",
actionLabel = "Download Your Guide",
loadingLabel = "Preparing your download\u2026",
fileType = "PDF",
fileSize,
inboxNote = "Also sent to your inbox.",
inboxNoteWithEmail = "Also sent to {email}.",
email,
errorMessage = "We couldn\u2019t start your download. Tap the button again, or open the copy in your inbox.",
href,
download = true,
onAction,
loading = false,
state = "default",
className,
} = props
const headingId = React.useId()
const errorId = React.useId()
const disabled = state === "disabled"
const busy = loading && !disabled
const blocked = disabled || busy
const showError = state === "error" && !blocked
const fileMeta = [fileType, fileSize].filter(Boolean).join(" \u00b7 ")
const inbox = email ? fillEmail(inboxNoteWithEmail, email) : inboxNote
const handleClick = (event: React.MouseEvent<HTMLElement>) => {
if (blocked) {
event.preventDefault()
return
}
onAction?.()
}
const btnClass = [
"cf-fd__btn",
state === "hover" && !blocked ? "is-hover" : "",
state === "active" && !blocked ? "is-active" : "",
busy ? "is-loading" : "",
]
.filter(Boolean)
.join(" ")
const label = (
<>
<span className="cf-fd__btn-main">
{busy ? <Loader2 className="cf-fd__spin" aria-hidden="true" /> : null}
<span>{busy ? loadingLabel : actionLabel}</span>
</span>
{fileMeta ? <span className="cf-fd__btn-sub">{fileMeta}</span> : null}
</>
)
const downloadAttr = download === true ? "" : download === false ? undefined : download
return (
<div
className={["cf-freebie-delivery", className].filter(Boolean).join(" ")}
data-state={state}
role="region"
aria-labelledby={headingId}
>
<style>{CSS}</style>
<div className={coverImage ? "cf-fd__grid" : "cf-fd__grid is-solo"}>
{coverImage ? (
<figure className="cf-fd__media">
<span className="cf-fd__halo" aria-hidden="true" />
<span className="cf-fd__floor" aria-hidden="true" />
<img className="cf-fd__cover" src={coverImage} alt={coverAlt} width={640} height={640} decoding="async" />
{readyLabel ? (
<span className="cf-fd__chip">
<CheckCircle2 aria-hidden="true" />
{readyLabel}
</span>
) : null}
</figure>
) : null}
<div className="cf-fd__copy">
<h2 id={headingId} className="cf-fd__title">
{renderHeadline(headline, highlight)}
</h2>
{lead ? <p className="cf-fd__lead">{lead}</p> : null}
<div className="cf-fd__card" role="group" aria-label={ledgerLabel}>
<ul className="cf-fd__ledger" role="list">
{lines.map((line, i) => (
<li
className="cf-fd__row"
key={`${line.label}-${i}`}
style={{ "--i": Math.min(i, 4) } as React.CSSProperties}
>
<div className="cf-fd__line">
<span className="cf-fd__label">{line.label}</span>
<span className="cf-fd__dots" aria-hidden="true" />
{line.struck ? (
<s className="cf-fd__value is-struck">{line.value}</s>
) : (
<span className="cf-fd__value">{line.value}</span>
)}
</div>
{line.detail ? <p className="cf-fd__detail">{line.detail}</p> : null}
</li>
))}
</ul>
<div className="cf-fd__total" style={{ "--i": Math.min(lines.length, 4) } as React.CSSProperties}>
<span className="cf-fd__total-label">{totalLabel}</span>
<span className="cf-fd__dots" aria-hidden="true" />
<span className="cf-fd__free">
<span className="cf-fd__free-text">{totalValue}</span>
</span>
</div>
{href ? (
<a
className={btnClass}
href={blocked ? undefined : href}
download={blocked ? undefined : downloadAttr}
aria-disabled={blocked || undefined}
aria-busy={busy || undefined}
aria-describedby={showError ? errorId : undefined}
onClick={handleClick}
>
{label}
</a>
) : (
<button
type="button"
className={btnClass}
disabled={disabled}
aria-disabled={busy || undefined}
aria-busy={busy || undefined}
aria-describedby={showError ? errorId : undefined}
onClick={handleClick}
>
{label}
</button>
)}
{showError ? (
<p className="cf-fd__error" id={errorId} role="alert">
<AlertCircle aria-hidden="true" />
<span>{errorMessage}</span>
</p>
) : null}
{inbox ? (
<p className="cf-fd__inbox">
<Mail aria-hidden="true" />
<span>{inbox}</span>
</p>
) : null}
</div>
</div>
</div>
</div>
)
}
export default FreebieDelivery
const DEFAULT_LINES: FreebieDeliveryLine[] = [
{ label: "Funnel Planning Guide", value: "PDF" },
{ label: "Delivery", value: "Download" },
]
function renderHeadline(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text
const at = text.indexOf(phrase)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className="cf-fd__mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
function fillEmail(template: string, email: string): React.ReactNode {
const [before, after = ""] = template.split("{email}")
return (
<>
{before}
<strong>{email}</strong>
{after}
</>
)
}
const CSS = `
.cf-freebie-delivery{container-type:inline-size;width:100%;max-width:68rem;margin-inline:auto;color:var(--ink);font-family:var(--font-body)}
.cf-freebie-delivery *,.cf-freebie-delivery *::before,.cf-freebie-delivery *::after{box-sizing:border-box}
.cf-fd__grid{display:grid;grid-template-columns:minmax(0,1fr);gap:1.25rem;align-items:start}
.cf-fd__grid.is-solo{max-width:40rem;margin-inline:auto}
.cf-fd__copy{min-width:0}
.cf-fd__media{position:relative;margin:0;justify-self:center;display:grid;place-items:center;width:100%;max-width:17.5rem;padding:.5rem 0 1.75rem}
.cf-fd__halo{position:absolute;inset:9% 4% 13%;border-radius:calc(var(--radius,12px) * 2.5);background:color-mix(in oklch,var(--ink) 5%,var(--surface,#fff));transform:rotate(-4deg)}
.cf-fd__floor{position:absolute;left:20%;right:20%;bottom:1.1rem;height:1.25rem;border-radius:50%;background:radial-gradient(closest-side,oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3),transparent)}
.cf-fd__cover{position:relative;z-index:1;display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 2px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .28)) drop-shadow(0 12px 14px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .2));transition:transform .35s cubic-bezier(.2,.8,.2,1)}
.cf-fd__chip{position:absolute;z-index:2;left:0;bottom:2.25rem;display:inline-flex;align-items:center;gap:.45rem;padding:.5rem .9rem .5rem .75rem;border:1px solid var(--card-border,color-mix(in oklch,var(--ink) 12%,transparent));border-radius:999px;background:var(--card,#fff);color:var(--ink);font-size:.9375rem;font-weight:700;line-height:1.2;white-space:nowrap;box-shadow:var(--shadow-sm,0 1px 1px oklch(0.22 0.03 260 / .18),0 1px 3px oklch(0.22 0.03 260 / .14))}
.cf-fd__chip svg{width:1.1rem;height:1.1rem;flex:none;color:var(--success)}
.cf-fd__title{margin:0;color:var(--ink);font-family:var(--font-display);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.035em);font-size:clamp(2.375rem,1.35rem + 4.4cqi,4.25rem);line-height:1.02;text-wrap:balance}
.cf-fd__mark{padding:0 .08em;margin:0 -.04em;border-radius:.18em .32em .22em .36em;background-image:linear-gradient(transparent 56%,color-mix(in oklch,var(--marker,#fae37c) 75%,transparent) 56%,color-mix(in oklch,var(--marker,#fae37c) 75%,transparent) 94%,transparent 94%);background-repeat:no-repeat;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-fd__lead{margin:1.1rem 0 0;max-width:38rem;color:var(--muted);font-size:clamp(1.125rem,1rem + .6cqi,1.3125rem);font-weight:500;line-height:1.5;text-wrap:pretty}
.cf-fd__card{margin-top:1.75rem;padding:clamp(1.25rem,.9rem + 1.6cqi,1.875rem);border:1px solid var(--card-border,color-mix(in oklch,var(--ink) 12%,transparent));border-radius:var(--card-radius,calc(var(--radius,12px) + 6px));background:var(--card,#fff);box-shadow:inset 0 1px 0 oklch(from var(--card,#fff) calc(l + 0.04) c h / .6),var(--card-shadow,var(--shadow-md,0 1px 2px oklch(0.22 0.03 260 / .22),0 4px 10px -2px oklch(0.22 0.03 260 / .2)))}
.cf-fd__ledger{list-style:none;margin:0;padding:0}
.cf-fd__row{padding:.7rem 0}
.cf-fd__row:first-child{padding-top:0}
.cf-fd__line{display:flex;align-items:baseline;gap:.6rem;font-size:1.0625rem;line-height:1.35}
.cf-fd__label{min-width:0;color:var(--ink);font-weight:700;text-wrap:pretty}
.cf-fd__dots{flex:1 1 1.5rem;min-width:1.25rem;height:0;border-bottom:2px dotted oklch(from var(--ink) l c h / .3);transform:translateY(-.3em)}
.cf-fd__value{flex:none;color:var(--ink);font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap;text-decoration:none}
.cf-fd__value.is-struck{color:var(--muted);font-weight:700;text-decoration:line-through;text-decoration-color:var(--danger);text-decoration-thickness:2px}
.cf-fd__detail{margin:.3rem 0 0;color:var(--muted);font-size:.9375rem;line-height:1.5;text-wrap:pretty}
.cf-fd__total{display:flex;align-items:center;gap:.75rem;margin-top:.6rem;padding:.85rem 1.25rem;border-radius:calc(var(--radius,12px) + 2px);background:color-mix(in oklch,var(--ink) 4%,var(--card,#fff))}
.cf-fd__total .cf-fd__dots{transform:none;align-self:center}
.cf-fd__total-label{min-width:0;color:var(--ink);font-size:1.125rem;font-weight:800;line-height:1.25;text-wrap:balance}
.cf-fd__free{flex:none;display:inline-grid;place-items:center}
.cf-fd__free-text{color:var(--success);font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2rem,1.6rem + 1.8cqi,2.75rem);line-height:1;letter-spacing:-.02em}
.cf-fd__btn{appearance:none;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;width:100%;min-height:4.5rem;margin-top:1.25rem;padding:.85rem 1.25rem;border:1px solid oklch(from var(--button-bg,var(--cta)) calc(l - 0.12) c h);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,var(--cta))) calc(l + 0.01) c h));color:var(--button-ink,var(--cta-ink,#fff));font-family:var(--button-font,var(--font-display));text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);text-align:center;text-decoration:none;cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),var(--button-shadow,0 1px 2px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .32),0 6px 14px -4px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .45));transition:transform .14s cubic-bezier(.23,1,.32,1),box-shadow .16s ease,background .16s ease}
.cf-fd__btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-fd__btn-main{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;font-size:clamp(1.3125rem,1.05rem + 1.2cqi,1.75rem);font-weight:var(--button-weight,800);line-height:1.1;letter-spacing:-.01em;text-wrap:balance}
.cf-fd__btn-sub{font-family:var(--font-body);font-size:.875rem;font-weight:600;line-height:1.3;letter-spacing:.03em;text-wrap:pretty}
.cf-fd__spin{width:1em;height:1em;flex:none}
.cf-fd__btn.is-hover{transform:translateY(-1px);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,var(--cta))) calc(l - 0.04) c h));box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.18) c h),0 2px 3px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3),0 10px 18px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .5)}
@media (hover:hover) and (pointer:fine){
.cf-fd__media:hover .cf-fd__cover{transform:translateY(-4px) rotate(-1.5deg)}
.cf-fd__btn:not(:disabled):not([aria-disabled=true]):hover{transform:translateY(-1px);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,var(--cta))) calc(l - 0.04) c h));box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.18) c h),0 2px 3px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3),0 10px 18px -6px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .5)}
}
.cf-fd__btn:not(:disabled):not([aria-disabled=true]):active,.cf-fd__btn.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - 0.03) c h),oklch(from var(--button-bg-2,var(--cta-2,var(--cta))) calc(l - 0.06) c h));box-shadow:inset 0 2px 3px oklch(from var(--button-bg,var(--cta)) calc(l - 0.22) c h / .45),inset 0 -1px 0 oklch(from var(--button-bg,var(--cta)) calc(l - 0.16) c h),0 1px 1px oklch(from var(--shadow,oklch(0.22 0.03 260)) l c h / .3)}
.cf-fd__btn.is-loading{cursor:progress}
.cf-fd__btn:disabled,.cf-fd__btn[aria-disabled=true]:not(.is-loading){cursor:not-allowed;transform:none;border-color:transparent;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow, var(--shadow-sm))}
.cf-fd__error{display:flex;align-items:flex-start;gap:.6rem;margin:.9rem 0 0;padding:.75rem 1rem;border-radius:var(--radius,12px);background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:600;line-height:1.45;text-wrap:pretty}
.cf-fd__error svg{width:1.15rem;height:1.15rem;flex:none;margin-top:.12rem}
.cf-fd__inbox{display:flex;align-items:center;justify-content:center;gap:.45rem;margin:.9rem 0 0;color:var(--muted);font-size:1rem;line-height:1.45;text-align:center;text-wrap:pretty}
.cf-fd__inbox svg{width:1.15rem;height:1.15rem;flex:none;color:var(--accent)}
.cf-fd__inbox strong{color:var(--ink);font-weight:700;overflow-wrap:anywhere}
@container (min-width: 46rem){
.cf-fd__grid{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:3rem}
.cf-fd__grid.is-solo{grid-template-columns:minmax(0,1fr)}
.cf-fd__media{position:sticky;top:1.5rem;max-width:26rem;padding:1.5rem 0 2.25rem}
.cf-fd__chip{left:2%;bottom:2.75rem}
}
@keyframes cf-fd-rise{from{opacity:.82;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes cf-fd-in{from{opacity:.82;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes cf-fd-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:no-preference){
.cf-fd__cover{animation:cf-fd-rise .52s cubic-bezier(.2,.8,.2,1) backwards}
.cf-fd__row,.cf-fd__total{animation:cf-fd-in .45s ease backwards;animation-delay:calc(var(--i,0) * 70ms)}
.cf-fd__spin{animation:cf-fd-spin .8s linear infinite}
}
@media (prefers-reduced-motion:reduce){
.cf-freebie-delivery *{transition:none !important;animation:none !important}
.cf-fd__media:hover .cf-fd__cover,.cf-fd__btn:hover,.cf-fd__btn:active,.cf-fd__btn.is-hover,.cf-fd__btn.is-active{transform:none !important}
}
`
pieces/checkout/freebie-delivery/specimen.tsx 37 lines
import __studioImage65cbd802 from "../assets/4069271e14cb8256.webp";
import FreebieDelivery from "../freebie-delivery"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled", "error"]
type SpecimenState = "default" | "hover" | "active" | "disabled" | "error"
export default function FreebieDeliverySpecimen({ state = "default" }: { state?: SpecimenState }) {
const guide = defaults.sample.items[0]
return (
<FreebieDelivery
state={state}
headline="Your free guide is ready"
highlight="is ready"
lead={`${guide.detail} Open it now and plan your first funnel today.`}
coverImage={slot(
"product",
__studioImage65cbd802
)}
coverAlt={`${guide.name} cover`}
readyLabel="Ready to download"
lines={[
{ label: guide.name, value: guide.value, struck: true },
{ label: "Format", value: "PDF" },
{ label: "Delivery", value: "Instant download" },
]}
totalLabel="Your price today"
totalValue="Free"
actionLabel="Download Your Guide"
fileType="PDF"
fileSize="2.4 MB"
inboxNote="Also sent to your inbox."
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalFreebieDelivery |
string |
|
highlight OptionalFreebieDelivery |
string |
|
lead OptionalFreebieDelivery |
string |
|
coverImage OptionalFreebieDelivery |
string |
|
coverAlt OptionalFreebieDelivery |
string |
|
readyLabel OptionalFreebieDelivery |
string |
|
lines OptionalFreebieDelivery |
FreebieDeliveryLine[] |
|
ledgerLabel OptionalFreebieDelivery |
string |
|
totalLabel OptionalFreebieDelivery |
string |
|
totalValue OptionalFreebieDelivery |
string |
|
actionLabel OptionalFreebieDelivery |
string |
|
loadingLabel OptionalFreebieDelivery |
string |
|
fileType OptionalFreebieDelivery |
string |
|
fileSize OptionalFreebieDelivery |
string |
|
inboxNote OptionalFreebieDelivery |
string |
|
inboxNoteWithEmail OptionalFreebieDelivery |
string |
|
email OptionalFreebieDelivery |
string |
|
errorMessage OptionalFreebieDelivery |
string |
|
href OptionalFreebieDelivery |
string |
|
download OptionalFreebieDelivery |
boolean | string |
|
onAction OptionalFreebieDelivery |
() => void |
|
loading OptionalFreebieDelivery |
boolean |
|
state OptionalFreebieDelivery |
"default" | "hover" | "active" | "disabled" | "error" |
|
className OptionalFreebieDelivery |
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).
-
4069271e14cb8256.webp
image/webp · 75.3 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB