Freebie Delivery 2
Turns the freebie thank-you page into a quick-start path the buyer ticks off (download, set up, first win), so they get a real result and reach the one soft next step ready to say yes.
Use it in a prompt
Use checkout/freebie-delivery-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/checkout/freebie-delivery-2.tsx. - Import it and pass your copy and images (Props tab):
import { FreebieDelivery2 } from "@/components/funneldna/checkout/freebie-delivery-2"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/freebie-delivery-2/component.tsx 446 lines
// layout: path-to-action
// Turns the freebie thank-you page into a quick-start path the buyer ticks off (download, set up, first win), so they get a real result and reach the one soft next step ready to say yes.
import * as React from 'react'
import { Check, Clock, FileText, Flag, ShieldCheck } from 'lucide-react'
import { FX_HOST, Pattern, Spot } from '../fx/fx'
import calendarSpot from '../fx/spots/calendar'
export type FreebieDelivery2Stop = {
title: string
// Short instruction under the stop title.
text: string
// Small time chip, e.g. '2 min'.
time?: string
// Slot 'item-n': screenshot-style image of this stop.
image?: string
imageAlt?: string
}
export type FreebieDelivery2File = {
name: string
// File type shown on the button, e.g. 'ZIP'.
type?: string
size?: string
// File URL; renders a download link instead of a button.
href?: string
// Download attribute value; empty keeps the server file name.
fileName?: string
}
export type FreebieDelivery2Next = {
// Lead with the risk reversal, e.g. 'Try it for 30 days'.
headline: string
text?: string
// Button label; the price follows here.
actionLabel: string
// Reassurance line under the button (the guarantee, if supplied).
note?: string
href?: string
}
export type FreebieDelivery2Props = {
headline?: string
// Phrase inside the headline that gets the marker stroke.
highlight?: string
lead?: string
// Italic aside in the author's voice under the lead.
aside?: string
stops?: FreebieDelivery2Stop[]
// The first file is the main download button; the rest are quiet links.
files?: FreebieDelivery2File[]
// Index of the stop that carries the download button.
downloadStop?: number
downloadLabel?: string
onDownload?: (file?: FreebieDelivery2File) => void
// {done} and {total} are replaced with numbers.
progressLabel?: string
doneLabel?: string
doneCheckedLabel?: string
// Stop indexes ticked on first render (e.g. restored by the page).
defaultDone?: number[]
// Fires when a stop is ticked or unticked, with every stop's state, so the page can save it.
onToggle?: (index: number, done: boolean, all: boolean[]) => void
// The one soft next step after the last stop; omit it for the empty variant.
next?: FreebieDelivery2Next
// Spot illustration beside the next step (an imported fx spot asset).
nextSpot?: string
onAction?: () => void
// Forces a look on the download button.
state?: 'default' | 'hover' | 'active' | 'disabled'
className?: string
}
export function FreebieDelivery2(props: FreebieDelivery2Props) {
const {
headline = 'Get your first win in 10 minutes',
highlight = 'first win',
lead = 'Your files are ready. Follow the three stops below and tick each one off as you go.',
aside,
stops = DEFAULT_STOPS,
files = DEFAULT_FILES,
downloadStop = 0,
downloadLabel = 'Download the pack',
onDownload,
progressLabel = '{done} of {total} done',
doneLabel = 'Mark as done',
doneCheckedLabel = 'Done',
defaultDone,
onToggle,
next,
nextSpot = calendarSpot,
onAction,
state = 'default',
className,
} = props
const headingId = React.useId()
const [done, setDone] = React.useState<boolean[]>(() => stops.map((_, i) => (defaultDone ?? []).includes(i)))
const flags = stops.map((_, i) => Boolean(done[i]))
const doneCount = flags.filter(Boolean).length
const allDone = stops.length > 0 && doneCount === stops.length
const current = flags.indexOf(false)
const disabled = state === 'disabled'
const toggle = (index: number, checked: boolean) => {
const all = flags.map((value, i) => (i === index ? checked : value))
setDone(all)
onToggle?.(index, checked, all)
}
const primary = files[0]
const extras = files.slice(1)
const primaryMeta = fileMeta(primary)
const btnClass = [
'cf-fd2__btn',
state === 'hover' && !disabled ? 'is-hover' : '',
state === 'active' && !disabled ? 'is-active' : '',
]
.filter(Boolean)
.join(' ')
const btnInner = (
<>
<span className='cf-fd2__btn-main'>{downloadLabel}</span>
{primaryMeta ? <span className='cf-fd2__btn-sub'>{primaryMeta}</span> : null}
</>
)
const downloadBlock = (
<>
{primary?.href && !disabled ? (
<a className={btnClass} href={primary.href} download={primary.fileName ?? ''} onClick={() => onDownload?.(primary)}>
{btnInner}
</a>
) : (
<button type='button' className={btnClass} disabled={disabled} onClick={() => onDownload?.(primary)}>
{btnInner}
</button>
)}
{extras.length ? (
<ul className='cf-fd2__files' role='list'>
{extras.map((file, i) => {
const meta = fileMeta(file)
return (
<li key={`${file.name}-${i}`} className='cf-fd2__file-row'>
<FileText className='cf-fd2__file-icon' strokeWidth={2.5} aria-hidden='true' />
{file.href && !disabled ? (
<a className='cf-fd2__file' href={file.href} download={file.fileName ?? ''} onClick={() => onDownload?.(file)}>
{file.name}
</a>
) : (
<button type='button' className='cf-fd2__file' disabled={disabled} onClick={() => onDownload?.(file)}>
{file.name}
</button>
)}
{meta ? <span className='cf-fd2__file-meta'> {meta}</span> : null}
</li>
)
})}
</ul>
) : null}
</>
)
return (
<section
className={['cf-freebie-delivery-2', className].filter(Boolean).join(' ')}
style={FX_HOST}
aria-labelledby={headingId}
data-state={state}
>
<style>{CSS}</style>
<Pattern name='grid' fade='top' />
<div className='cf-fd2__inner'>
<header className='cf-fd2__header'>
<h2 id={headingId} className='cf-fd2__h'>
{renderHeadline(headline, highlight)}
</h2>
{lead ? <p className='cf-fd2__lead'>{lead}</p> : null}
{aside ? <p className='cf-fd2__aside'>{aside}</p> : null}
{stops.length ? (
<p className={allDone ? 'cf-fd2__progress is-complete' : 'cf-fd2__progress'} aria-live='polite'>
{allDone ? <Check strokeWidth={3} aria-hidden='true' /> : null}
{fill(progressLabel, { done: doneCount, total: stops.length })}
</p>
) : null}
</header>
<ol
className='cf-fd2__path'
role='list'
style={{ '--cols': Math.max(1, Math.min(stops.length, 4)) } as React.CSSProperties}
>
{stops.map((stop, i) => {
const isDone = flags[i]
const last = i === stops.length - 1
const showSeg = !last || Boolean(next)
return (
<li
key={`${stop.title}-${i}`}
className={['cf-fd2__stop', isDone ? 'is-done' : '', i === current ? 'is-current' : ''].filter(Boolean).join(' ')}
style={{ '--i': Math.min(i, 4) } as React.CSSProperties}
>
<div className='cf-fd2__rail' aria-hidden='true'>
<span className='cf-fd2__node'>{isDone ? <Check strokeWidth={3} /> : <span className='cf-fd2__dot' />}</span>
{showSeg ? (
<span className={last ? 'cf-fd2__seg is-tail' : 'cf-fd2__seg'}>
<span className='cf-fd2__fill' />
</span>
) : null}
</div>
<article className='cf-fd2__card'>
<div className='cf-fd2__head'>
<span className='cf-fd2__num' aria-hidden='true'>
{i + 1}
</span>
{stop.time ? (
<span className='cf-fd2__time'>
<Clock strokeWidth={2.5} aria-hidden='true' />
{stop.time}
</span>
) : null}
</div>
<h3 className='cf-fd2__stop-title'>{stop.title}</h3>
<p className='cf-fd2__text'>{stop.text}</p>
{stop.image ? (
<div className='cf-fd2__shot'>
<img src={stop.image} alt={stop.imageAlt ?? ''} width={640} height={400} loading='lazy' decoding='async' />
</div>
) : null}
<div className='cf-fd2__extra'>{i === downloadStop ? downloadBlock : null}</div>
<label className='cf-fd2__done'>
<input
className='cf-fd2__check'
type='checkbox'
checked={isDone}
onChange={(event) => toggle(i, event.currentTarget.checked)}
/>
<span className='cf-fd2__box' aria-hidden='true'>
<Check strokeWidth={3} />
</span>
<span className='cf-fd2__done-text'>
{isDone ? doneCheckedLabel : doneLabel}
<span className='cf-fd2__sr'>: {stop.title}</span>
</span>
</label>
</article>
</li>
)
})}
</ol>
{next ? (
<div className={allDone ? 'cf-fd2__next is-ready' : 'cf-fd2__next'}>
<div className='cf-fd2__rail' aria-hidden='true'>
<span className='cf-fd2__node cf-fd2__node--end'>
<Flag strokeWidth={2.5} />
</span>
</div>
<div className={nextSpot ? 'cf-fd2__next-card has-spot' : 'cf-fd2__next-card'}>
{nextSpot ? (
<div className='cf-fd2__spot'>
<Spot src={nextSpot} size={64} />
</div>
) : null}
<div className='cf-fd2__next-copy'>
<h3 className='cf-fd2__next-h'>{next.headline}</h3>
{next.text ? <p className='cf-fd2__next-text'>{next.text}</p> : null}
</div>
<div className='cf-fd2__next-action'>
{next.href ? (
<a className='cf-fd2__btn cf-fd2__btn--next' href={next.href} onClick={() => onAction?.()}>
<span className='cf-fd2__btn-main'>{next.actionLabel}</span>
</a>
) : (
<button type='button' className='cf-fd2__btn cf-fd2__btn--next' onClick={() => onAction?.()}>
<span className='cf-fd2__btn-main'>{next.actionLabel}</span>
</button>
)}
{next.note ? (
<p className='cf-fd2__note'>
<ShieldCheck strokeWidth={2.5} aria-hidden='true' />
{next.note}
</p>
) : null}
</div>
</div>
</div>
) : null}
</div>
</section>
)
}
export default FreebieDelivery2
const DEFAULT_STOPS: FreebieDelivery2Stop[] = [
{ title: 'Download your files', text: 'Grab the pack and unzip it. Your quick-start guide is inside.', time: '1 min' },
{ title: 'Duplicate the template', text: 'Open the template link, click Duplicate, and choose your workspace.', time: '2 min' },
{ title: 'Get your first win', text: 'Fill in the first page with your own numbers and watch it work.', time: '7 min' },
]
const DEFAULT_FILES: FreebieDelivery2File[] = [{ name: 'Template pack', type: 'ZIP' }]
function fileMeta(file?: FreebieDelivery2File) {
return file ? [file.type, file.size].filter(Boolean).join(' · ') : ''
}
function fill(template: string, values: Record<string, string | number>) {
return Object.keys(values).reduce((text, key) => text.split('{' + key + '}').join(String(values[key])), template)
}
function renderHeadline(text: string, phrase?: string) {
if (!phrase) return text
const at = text.indexOf(phrase)
if (at < 0) return text
return (
<>
{text.slice(0, at)}
<span className='cf-fd2__mark'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
const R = '.cf-freebie-delivery-2'
const CSS = `
${R}{--gap:24px;--node:28px;--pad:clamp(20px,3vw,32px);--rail-x:var(--pad);--fd2-shadow:var(--shadow,oklch(0.22 0.03 260));position:relative;overflow:hidden;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
${R} *,${R} *::before,${R} *::after{box-sizing:border-box}
${R} .cf-fd2__inner{position:relative;z-index:1;max-width:1120px;margin:0 auto}
${R} .cf-fd2__header{max-width:46rem;margin:0 auto clamp(32px,4vw,56px);text-align:center}
${R} .cf-fd2__h{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;text-wrap:balance;color:var(--ink)}
${R} .cf-fd2__mark{padding:0 .08em;border-radius:.12em;background-image:linear-gradient(transparent 56%,color-mix(in oklch,var(--marker,#fae37c) 72%,transparent) 56%,color-mix(in oklch,var(--marker,#fae37c) 72%,transparent) 93%,transparent 93%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
${R} .cf-fd2__lead{margin:16px auto 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--ink);text-wrap:pretty}
${R} .cf-fd2__aside{margin:8px 0 0;font-style:italic;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
${R} .cf-fd2__progress{display:inline-flex;align-items:center;gap:8px;min-height:32px;margin:24px 0 0;padding:4px 14px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--card));color:var(--ink);font-size:.875rem;font-weight:800;line-height:1.2;font-variant-numeric:tabular-nums;transition:background .3s ease,color .3s ease}
${R} .cf-fd2__progress svg{width:16px;height:16px;flex:none}
${R} .cf-fd2__progress.is-complete{background:var(--success-soft);color:var(--success)}
${R} .cf-fd2__path{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(var(--cols,3),minmax(0,1fr));grid-template-rows:repeat(7,auto);column-gap:var(--gap);row-gap:0}
${R} .cf-fd2__stop{position:relative;min-width:0;grid-row:span 7;display:grid;grid-template-rows:subgrid;animation:cf-fd2-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0) * .07s)}
${R} .cf-fd2__rail{grid-row:1;position:relative;height:var(--node);margin-bottom:16px}
${R} .cf-fd2__node{position:relative;z-index:1;display:grid;place-items:center;width:var(--node);height:var(--node);margin-left:var(--rail-x);border-radius:999px;border:3px solid oklch(from var(--ink) l c h / .22);background:var(--card);color:var(--success-ink,#fff);transition:background .2s ease,border-color .2s ease}
${R} .cf-fd2__node svg{width:16px;height:16px}
${R} .cf-fd2__dot{width:8px;height:8px;border-radius:999px}
${R} .cf-fd2__stop.is-current .cf-fd2__node{border-color:var(--accent-fill,var(--accent))}
${R} .cf-fd2__stop.is-current .cf-fd2__dot{background:var(--accent-fill,var(--accent))}
${R} .cf-fd2__stop.is-done .cf-fd2__node{background:var(--success);border-color:var(--success);animation:cf-fd2-pop .3s cubic-bezier(.2,.7,.2,1) both}
${R} .cf-fd2__node--end{background:var(--accent-fill,var(--accent));border-color:var(--accent-fill,var(--accent));color:var(--accent-fill-ink,var(--card))}
${R} .cf-fd2__seg{position:absolute;left:calc(var(--rail-x) + var(--node));top:calc(50% - 2px);width:calc(100% + var(--gap) - var(--node));height:4px;border-radius:999px;background:oklch(from var(--ink) l c h / .12);overflow:hidden}
${R} .cf-fd2__seg.is-tail{display:none}
${R} .cf-fd2__fill{position:absolute;inset:0;border-radius:inherit;background:var(--success);transform:scaleX(0);transform-origin:left center;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
${R} .cf-fd2__stop.is-done>.cf-fd2__rail .cf-fd2__fill{transform:none}
${R} .cf-fd2__card{grid-row:2 / span 6;display:grid;grid-template-rows:subgrid;min-width:0;padding:var(--pad);background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--fd2-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--fd2-shadow) l c h / .2)));transition:border-color .2s ease}
${R} .cf-fd2__stop.is-done .cf-fd2__card{border-color:oklch(from var(--success) l c h / .5)}
${R} .cf-fd2__shot{grid-row:1;margin:0 0 20px;padding:8px;border-radius:12px;background:color-mix(in oklch,var(--ink) 4%,var(--card))}
${R} .cf-fd2__shot img{display:block;width:100%;height:auto;aspect-ratio:16 / 10;object-fit:cover;object-position:left top;border-radius:8px}
${R} .cf-fd2__head{grid-row:2;display:flex;align-items:center;justify-content:space-between;gap:12px}
${R} .cf-fd2__num{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:clamp(2.5rem,4.2vw,3.75rem);line-height:1;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--accent)}
${R} .cf-fd2__time{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:4px 12px;border-radius:999px;background:color-mix(in oklch,var(--ink) 6%,var(--card));color:var(--ink);font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap}
${R} .cf-fd2__time svg{width:16px;height:16px;flex:none}
${R} .cf-fd2__stop-title{grid-row:3;margin:12px 0 0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;color:var(--ink)}
${R} .cf-fd2__text{grid-row:4;margin:8px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
${R} .cf-fd2__extra{grid-row:5;margin-top:20px}
${R} .cf-fd2__extra:empty{margin-top:0}
${R} .cf-fd2__btn{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;min-height:64px;margin:0;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 + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .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);text-shadow:var(--button-text-shadow,none);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 + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--fd2-shadow) l c h / .3),0 8px 16px -6px oklch(from var(--fd2-shadow) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
${R} .cf-fd2__btn-main{font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-wrap:balance}
${R} .cf-fd2__btn-sub{font-family:var(--font-body);font-size:.9375rem;font-weight:600;line-height:1.3;text-transform:none;letter-spacing:.01em}
@media (hover:hover){${R} .cf-fd2__btn:not(:disabled):not([aria-disabled=true]):hover{background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .1) c h / .6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),0 1px 2px oklch(from var(--fd2-shadow) l c h / .32),0 10px 18px -6px oklch(from var(--fd2-shadow) l c h / .5)}}
${R} .cf-fd2__btn.is-hover{background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .1) c h / .6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .2) c h),0 1px 2px oklch(from var(--fd2-shadow) l c h / .32),0 10px 18px -6px oklch(from var(--fd2-shadow) l c h / .5)}
${R} .cf-fd2__btn:not(:disabled):active,${R} .cf-fd2__btn.is-active{transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .05) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--fd2-shadow) l c h / .35),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .18) c h),0 1px 2px oklch(from var(--fd2-shadow) l c h / .3)}
${R} .cf-fd2__btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
${R} .cf-fd2__btn:disabled,${R} .cf-fd2__btn[aria-disabled=true]{background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--fd2-shadow) l c h / .2)));cursor:not-allowed;transform:none}
${R} .cf-fd2__files{list-style:none;margin:12px 0 0;padding:0;display:grid;gap:2px}
${R} .cf-fd2__file-row{font-size:.9375rem;line-height:1.4;padding:6px 0;text-wrap:pretty}
${R} .cf-fd2__file-icon{display:inline-block;width:16px;height:16px;vertical-align:-.15em;margin-inline-end:.4em;color:var(--muted)}
${R} .cf-fd2__file{display:inline;margin:0;padding:0;border:0;background:none;font:inherit;font-weight:700;color:var(--link,var(--accent));text-align:left;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent)) l c h / .45);text-underline-offset:.18em;cursor:pointer;border-radius:4px}
${R} .cf-fd2__file:hover{color:oklch(from var(--link,var(--accent)) calc(l - .08) c h);text-decoration-color:currentColor}
${R} .cf-fd2__file:focus-visible{outline:2px solid var(--field-focus,var(--accent));outline-offset:2px}
${R} .cf-fd2__file:disabled{color:var(--muted);text-decoration:none;cursor:not-allowed}
${R} .cf-fd2__file-meta{color:var(--muted);font-weight:500;font-variant-numeric:tabular-nums}
${R} .cf-fd2__done{grid-row:6;align-self:end;position:relative;display:flex;align-items:center;gap:12px;min-height:44px;margin-top:20px;cursor:pointer;color:var(--ink);font-size:1rem;font-weight:700;line-height:1.3;user-select:none;-webkit-tap-highlight-color:transparent}
${R} .cf-fd2__check{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;opacity:0}
${R} .cf-fd2__box{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:7px;border:2px solid oklch(from var(--ink) l c h / .35);background:var(--field);color:transparent;transition:background .16s ease,border-color .16s ease,box-shadow .16s ease}
${R} .cf-fd2__box svg{width:16px;height:16px}
${R} .cf-fd2__done:hover .cf-fd2__box{border-color:oklch(from var(--ink) l c h / .6)}
${R} .cf-fd2__check:checked+.cf-fd2__box{background:var(--success);border-color:var(--success);color:var(--success-ink,#fff)}
${R} .cf-fd2__check:focus-visible+.cf-fd2__box{outline:2px solid var(--field-focus,var(--accent));outline-offset:2px;box-shadow:0 0 0 5px oklch(from var(--field-focus,var(--accent)) l c h / .3)}
${R} .cf-fd2__stop.is-done .cf-fd2__done-text{color:var(--success)}
${R} .cf-fd2__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
${R} .cf-fd2__next{margin-top:40px}
${R} .cf-fd2__next>.cf-fd2__rail{display:none}
${R} .cf-fd2__next-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px 32px;padding:var(--pad);background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / .12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(from var(--fd2-shadow) l c h / .22),0 4px 10px -2px oklch(from var(--fd2-shadow) l c h / .2)));transition:box-shadow .3s ease,border-color .3s ease}
${R} .cf-fd2__next-card.has-spot{grid-template-columns:auto minmax(0,1fr) auto}
${R} .cf-fd2__next.is-ready .cf-fd2__next-card{border-color:color-mix(in oklch,var(--accent) 40%,var(--card));box-shadow:var(--shadow-lg,0 2px 4px oklch(from var(--fd2-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--fd2-shadow) l c h / .32))}
${R} .cf-fd2__spot{width:64px;line-height:0}
${R} .cf-fd2__next-copy{min-width:0}
${R} .cf-fd2__next-h{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;text-wrap:balance;color:var(--ink)}
${R} .cf-fd2__next-text{margin:8px 0 0;max-width:62ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--muted);text-wrap:pretty}
${R} .cf-fd2__next-action{display:grid;justify-items:center;gap:10px;min-width:280px}
${R} .cf-fd2__btn--next{white-space:nowrap}
${R} .cf-fd2__note{margin:0;font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-align:center;text-wrap:pretty}
${R} .cf-fd2__note svg{display:inline-block;width:16px;height:16px;vertical-align:-.15em;margin-inline-end:.4em;color:var(--success)}
@supports not (grid-template-rows: subgrid){
@media (min-width:900px){
${R} .cf-fd2__stop{display:flex;flex-direction:column}
${R} .cf-fd2__card{display:flex;flex-direction:column;flex:1}
${R} .cf-fd2__shot{order:-1}
${R} .cf-fd2__done{margin-top:auto;padding-top:20px}
}
}
@media (max-width:899px){
${R}{--gap:16px;--rail-x:0px}
${R} .cf-fd2__path{display:flex;flex-direction:column;gap:var(--gap);max-width:44rem;margin-inline:auto}
${R} .cf-fd2__stop{display:grid;grid-template-columns:var(--node) minmax(0,1fr);grid-template-rows:auto;column-gap:14px;grid-row:auto}
${R} .cf-fd2__rail{grid-column:1;grid-row:1;height:auto;margin:0;padding-top:22px}
${R} .cf-fd2__seg{left:calc(var(--node) / 2 - 2px);top:calc(22px + var(--node));width:4px;height:calc(100% + var(--gap) - var(--node))}
${R} .cf-fd2__seg.is-tail{display:block}
${R} .cf-fd2__fill{transform:scaleY(0);transform-origin:center top}
${R} .cf-fd2__card{grid-column:2;grid-row:1;display:flex;flex-direction:column}
${R} .cf-fd2__stop-title{margin-top:8px}
${R} .cf-fd2__shot{margin:16px 0 0}
${R} .cf-fd2__extra{margin-top:16px}
${R} .cf-fd2__extra:empty{margin-top:0}
${R} .cf-fd2__done{margin-top:16px}
${R} .cf-fd2__btn{padding:10px 16px}
${R} .cf-fd2__next{display:grid;grid-template-columns:var(--node) minmax(0,1fr);column-gap:14px;max-width:44rem;margin:var(--gap) auto 0}
${R} .cf-fd2__next>.cf-fd2__rail{display:block}
${R} .cf-fd2__next-card,${R} .cf-fd2__next-card.has-spot{grid-template-columns:minmax(0,1fr);align-items:start;gap:16px}
${R} .cf-fd2__next-card.has-spot{grid-template-columns:auto minmax(0,1fr)}
${R} .cf-fd2__spot{width:56px}
${R} .cf-fd2__next-action{grid-column:1 / -1;min-width:0}
${R} .cf-fd2__btn--next{width:100%;white-space:normal}
}
@keyframes cf-fd2-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes cf-fd2-pop{from{transform:scale(.9)}to{transform:none}}
@media (prefers-reduced-motion:reduce){${R} *,${R} *::before,${R} *::after{animation:none!important;transition:none!important}}
`
pieces/checkout/freebie-delivery-2/specimen.tsx 66 lines
import __studioImageddb8a11e from "../assets/9a84b76af07117fb.webp";
import __studioImage890921a7 from "../assets/9eb79c9e58286e78.webp";
import __studioImagefef61ff9 from "../assets/f93f96e310b9573f.webp";
// Specimen: Ledgerly Notion budgeting templates, the quick-start path with one soft next step.
import * as React from 'react'
import { FreebieDelivery2 } from '../freebie-delivery-2'
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
export const states = ['default', 'hover', 'active', 'disabled', 'empty']
type SpecimenState = 'default' | 'hover' | 'active' | 'disabled' | 'empty'
export default function FreebieDelivery2Specimen({ state = 'default' }: { state?: SpecimenState }) {
const sample = defaults.sample
const stops = [
{
title: 'Download your templates',
text: 'Grab the pack and unzip it. The quick-start guide inside has your three template links.',
time: '1 min',
image: slot('item-1', __studioImageddb8a11e),
imageAlt: 'The unzipped template folder with the budget files and the quick-start guide',
},
{
title: 'Duplicate the budget into Notion',
text: 'Open the Monthly Budget link, click Duplicate in the top right, and pick your workspace.',
time: '2 min',
image: slot('item-2', __studioImage890921a7),
imageAlt: 'The Monthly Budget template open in a workspace, ready to duplicate',
},
{
title: 'See your safe-to-spend number',
text: 'Add this month’s income and your three biggest bills. Your safe-to-spend number fills in by itself.',
time: '7 min',
image: slot('item-3', __studioImagefef61ff9),
imageAlt: 'A filled-in budget dashboard showing the safe-to-spend ring and the month’s bills',
},
]
return (
<FreebieDelivery2
state={state === 'empty' ? 'default' : state}
headline='Get your first win in 10 minutes'
highlight='first win'
lead='Your Ledgerly budget templates are ready. Three quick stops, and you’ll know exactly where your money stands tonight.'
aside='(Ten minutes. I timed it with the kettle on.)'
stops={stops}
files={[
{ name: 'Ledgerly Budget Templates', type: 'ZIP', size: '4.2 MB' },
{ name: 'Quick-start guide', type: 'PDF', size: '1.1 MB' },
]}
downloadLabel='Download the pack'
defaultDone={[0]}
next={
state === 'empty'
? undefined
: {
headline: 'Try the Ledgerly Yearly Planner for 30 days',
text: 'Plan all twelve months with the same system you just set up. Keep it only if it earns its place.',
actionLabel: `Get the Planner for ${sample.price}`,
note: sample.guarantee,
}
}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalFreebieDelivery2 |
string |
|
highlight OptionalFreebieDelivery2 |
string |
|
lead OptionalFreebieDelivery2 |
string |
|
aside OptionalFreebieDelivery2 |
string |
|
stops OptionalFreebieDelivery2 |
FreebieDelivery2Stop[] |
|
files OptionalFreebieDelivery2 |
FreebieDelivery2File[] |
|
downloadStop OptionalFreebieDelivery2 |
number |
|
downloadLabel OptionalFreebieDelivery2 |
string |
|
onDownload OptionalFreebieDelivery2 |
(file?: FreebieDelivery2File) => void |
|
progressLabel OptionalFreebieDelivery2 |
string |
|
doneLabel OptionalFreebieDelivery2 |
string |
|
doneCheckedLabel OptionalFreebieDelivery2 |
string |
|
defaultDone OptionalFreebieDelivery2 |
number[] |
|
onToggle OptionalFreebieDelivery2 |
(index: number, done: boolean, all: boolean[]) => void |
|
next OptionalFreebieDelivery2 |
FreebieDelivery2Next |
|
nextSpot OptionalFreebieDelivery2 |
string |
|
onAction OptionalFreebieDelivery2 |
() => void |
|
state OptionalFreebieDelivery2 |
'default' | 'hover' | 'active' | 'disabled' |
|
className OptionalFreebieDelivery2 |
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-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--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-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.
item-3- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
321240b3188e2da4.webp
image/webp · 18.7 KB
-
9a84b76af07117fb.webp
image/webp · 24.3 KB
-
9eb79c9e58286e78.webp
image/webp · 19.6 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
f93f96e310b9573f.webp
image/webp · 24.7 KB