Freebie Delivery 3
Freebie delivery spread: the plan’s pages fan out on a dark stage so the reader can flip through them before one big download. A contents index turns the pages, then a short feature makes one soft step to the first paid box.
Use it in a prompt
Use checkout/freebie-delivery-3 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-3.tsx. - Import it and pass your copy and images (Props tab):
import { FreebieDelivery3 } from "@/components/funneldna/checkout/freebie-delivery-3"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/checkout/freebie-delivery-3/component.tsx 578 lines
// layout: magazine-spread
// Freebie delivery spread: the plan’s pages fan out on a dark stage so the reader can flip through them before one big download. A contents index turns the pages, then a short feature makes one soft step to the first paid box.
import * as React from 'react'
import { AlertCircle, ChevronLeft, ChevronRight, Loader2, Smartphone } from 'lucide-react'
import { FX_HOST, Texture } from '../fx/fx'
import leak from '../fx/textures/leak'
export type FreebieDelivery3Page = {
// Slot 'item-n': a generated preview image of one page of the download.
image: string
alt?: string
title: string
// One line under the title in the contents index.
detail?: string
}
export type FreebieDelivery3Props = {
headline?: string
// Phrase inside the headline set in the accent colour.
emphasis?: string
lead?: string
// Page previews fanned on the stage. Pages without an image are skipped.
pages?: FreebieDelivery3Page[]
// Accessible name of the page fan.
previewLabel?: string
prevLabel?: string
nextPageLabel?: string
// '{n}' is replaced with the page number.
dotLabel?: string
// '{n}' and '{total}' are replaced.
countLabel?: string
// '{n}', '{total}' and '{title}' are replaced.
slideLabel?: string
// Accessible name of the contents index.
indexLabel?: string
downloadLabel?: string
loadingLabel?: string
// Leads the button's second line, before the file type and size.
freeLabel?: string
fileType?: string
fileSize?: string
// File URL. When set, the button renders as a download link.
downloadHref?: string
// true keeps the server file name; a string renames the file.
download?: boolean | string
onDownload?: () => void
// Shows the preparing state on the button.
loading?: boolean
// Quiet line under the button. It flips to the next page.
flipLabel?: string
// Shown on touch devices only.
touchTip?: string
errorMessage?: string
// Large editorial line that opens the feature row.
pullLine?: string
storyHeadline?: string
story?: React.ReactNode[]
nextHeadline?: string
nextText?: React.ReactNode
// Small-caps label before the supplied price, e.g. 'Your investment:'.
investmentLabel?: string
// Supplied price of the next offer. The investment line is hidden without it.
offerPrice?: string
// Rest of the investment sentence, e.g. 'for your first box.'
offerNote?: string
nextLabel?: string
// Destination of the soft next step.
nextHref?: string
// Handles the soft next-step click.
onAction?: () => void
psLabel?: string
// Line after 'P.S.' that restates the guarantee or the main benefit.
ps?: string
// Forces a look on the download button.
state?: 'default' | 'hover' | 'active' | 'disabled' | 'error'
className?: string
}
export function FreebieDelivery3(props: FreebieDelivery3Props) {
const {
headline = 'Seven dinners, planned and ready to cook',
emphasis = 'ready to cook',
lead = 'Flip through every page of your free meal plan, then save it for the week ahead.',
pages = [],
previewLabel = 'Preview the meal plan pages',
prevLabel = 'Previous page',
nextPageLabel = 'Next page',
dotLabel = 'Show page {n}',
countLabel = 'Page {n} of {total}',
slideLabel = '{n} of {total}: {title}',
indexLabel = 'Pages in your plan',
downloadLabel = 'Download my meal plan',
loadingLabel = 'Preparing your plan…',
freeLabel = 'Free',
fileType = 'PDF',
fileSize,
downloadHref,
download = true,
onDownload,
loading = false,
flipLabel = 'or flip through every page first',
touchTip = 'Save it to your phone. Download it now and your plan is with you at the store.',
errorMessage = 'Your download didn’t start. Tap the button again to retry.',
pullLine = 'Seven dinners. One shopping list. Planned before Monday.',
storyHeadline = 'Cook from it all week',
story = DEFAULT_STORY,
nextHeadline = 'Rather skip the grocery run?',
nextText = 'Your first box brings the ingredients for this week’s recipes to your door.',
investmentLabel = 'Your investment:',
offerPrice,
offerNote = 'for your first box.',
nextLabel = 'Show me my first box',
nextHref,
onAction,
psLabel = 'P.S.',
ps,
state = 'default',
className,
} = props
const headingId = React.useId()
const errorId = React.useId()
const pageList = pages.filter((page) => Boolean(page && page.image))
const total = pageList.length
const hasFan = total > 0
const canFlip = total > 1
const [active, setActive] = React.useState(0)
const current = hasFan ? Math.min(active, total - 1) : 0
const currentPage = pageList[current]
const go = React.useCallback(
(step: number) => {
if (total < 2) return
setActive((a) => (((Math.min(a, total - 1) + step) % total) + total) % total)
},
[total],
)
const startX = React.useRef<number | null>(null)
const swiped = React.useRef(false)
const onKey = (event: React.KeyboardEvent<HTMLDivElement>) => {
if (!canFlip) return
if (event.key === 'ArrowRight') {
event.preventDefault()
go(1)
} else if (event.key === 'ArrowLeft') {
event.preventDefault()
go(-1)
} else if (event.key === 'Home') {
event.preventDefault()
setActive(0)
} else if (event.key === 'End') {
event.preventDefault()
setActive(total - 1)
}
}
const onPointerDown = (event: React.PointerEvent<HTMLDivElement>) => {
if (!canFlip) return
startX.current = event.clientX
swiped.current = false
}
const onPointerUp = (event: React.PointerEvent<HTMLDivElement>) => {
if (startX.current === null) return
const dx = event.clientX - startX.current
startX.current = null
if (Math.abs(dx) > 40) {
swiped.current = true
go(dx < 0 ? 1 : -1)
}
}
const onPointerCancel = () => {
startX.current = null
}
const onPageClick = (index: number, rel: number) => {
if (swiped.current) {
swiped.current = false
return
}
if (!canFlip) return
if (rel === 0) go(1)
else setActive(index)
}
const disabled = state === 'disabled'
const busy = loading && !disabled
const blocked = disabled || busy
const showError = state === 'error' && !blocked
const meta = [freeLabel, fileType, fileSize].filter(Boolean).join(' · ')
const downloadAttr = download === true ? '' : download === false ? undefined : download
const onDl = (event: React.MouseEvent<HTMLElement>) => {
if (blocked) {
event.preventDefault()
return
}
onDownload?.()
}
const btnClass = [
'fd3-btn',
state === 'hover' && !blocked ? 'is-hover' : '',
state === 'active' && !blocked ? 'is-active' : '',
busy ? 'is-loading' : '',
]
.filter(Boolean)
.join(' ')
const btnInner = (
<>
<span className='fd3-btn-main'>
{busy ? <Loader2 className='fd3-spin' strokeWidth={2.5} aria-hidden='true' /> : null}
<span>{busy ? loadingLabel : downloadLabel}</span>
</span>
{meta ? <span className='fd3-btn-sub'>{meta}</span> : null}
</>
)
const hasStory = Boolean(storyHeadline || story.length)
const hasNext = Boolean(nextHeadline || nextLabel)
const featureCols = [Boolean(pullLine), hasStory, hasNext].filter(Boolean).length
return (
<section
className={['cf-freebie-delivery-3', className].filter(Boolean).join(' ')}
aria-labelledby={headingId}
data-state={state}
>
<style>{CSS}</style>
<div className='fd3-wrap'>
<div className={hasFan ? 'fd3-spread' : 'fd3-spread is-solo'}>
<header className='fd3-head fd3-rise' style={{ '--i': 0 } as React.CSSProperties}>
<h2 id={headingId} className='fd3-h'>
{renderHeadline(headline, emphasis)}
</h2>
{lead ? <p className='fd3-lead'>{lead}</p> : null}
</header>
{hasFan ? (
<div className='fd3-stage fd3-rise' style={{ '--i': 1 } as React.CSSProperties}>
<div className='fd3-stage-in' style={FX_HOST}>
<Texture src={leak} tone='band-ink' position='top right' />
<div
className={canFlip ? 'fd3-fan' : 'fd3-fan is-single'}
role='region'
aria-roledescription='carousel'
aria-label={previewLabel}
tabIndex={canFlip ? 0 : undefined}
onKeyDown={onKey}
onPointerDown={onPointerDown}
onPointerUp={onPointerUp}
onPointerCancel={onPointerCancel}
onPointerLeave={onPointerCancel}
>
{pageList.map((page, i) => {
const rel = (i - current + total) % total
const right = rel > 0 && rel <= Math.ceil((total - 1) / 2)
const depth = rel === 0 ? 0 : right ? rel : total - rel
const side = rel === 0 ? 0 : right ? 1 : -1
const pos = rel === 0 ? 'front' : right ? 'right' : 'left'
const style = { '--side': side, '--depth': depth, zIndex: total - depth } as React.CSSProperties
return (
<div
key={`${page.title}-${i}`}
className='fd3-page'
data-pos={pos}
style={style}
role='group'
aria-roledescription='slide'
aria-label={fill(slideLabel, { n: i + 1, total, title: page.title })}
aria-hidden={rel !== 0 || undefined}
onClick={() => onPageClick(i, rel)}
>
<div className='fd3-sheet'>
<img
src={page.image}
alt={rel === 0 ? page.alt || page.title : ''}
width={600}
height={800}
draggable={false}
decoding='async'
loading={i === 0 ? 'eager' : 'lazy'}
/>
</div>
</div>
)
})}
</div>
<div className='fd3-foot'>
<p className='fd3-cap' aria-live='polite'>
{canFlip ? <span className='fd3-count'>{fill(countLabel, { n: current + 1, total })}</span> : null}
{currentPage ? <span className='fd3-cap-title'>{currentPage.title}</span> : null}
</p>
{canFlip ? (
<div className='fd3-ctrl'>
<button type='button' className='fd3-nav' aria-label={prevLabel} onClick={() => go(-1)}>
<ChevronLeft strokeWidth={2.5} aria-hidden='true' />
</button>
<div className='fd3-dots'>
{pageList.map((page, i) => (
<button
key={`dot-${page.title}-${i}`}
type='button'
className='fd3-dot'
aria-label={fill(dotLabel, { n: i + 1 })}
aria-pressed={i === current}
onClick={() => setActive(i)}
>
<span aria-hidden='true' />
</button>
))}
</div>
<button type='button' className='fd3-nav' aria-label={nextPageLabel} onClick={() => go(1)}>
<ChevronRight strokeWidth={2.5} aria-hidden='true' />
</button>
</div>
) : null}
</div>
</div>
</div>
) : null}
<div className='fd3-action fd3-rise' style={{ '--i': 2 } as React.CSSProperties}>
<div className='fd3-act'>
{downloadHref && !disabled ? (
<a
className={btnClass}
href={downloadHref}
download={downloadAttr}
onClick={onDl}
aria-disabled={busy || undefined}
aria-describedby={showError ? errorId : undefined}
>
{btnInner}
</a>
) : (
<button
type='button'
className={btnClass}
disabled={disabled}
aria-disabled={busy || undefined}
aria-describedby={showError ? errorId : undefined}
onClick={onDl}
>
{btnInner}
</button>
)}
{showError && errorMessage ? (
<p id={errorId} className='fd3-err' role='alert'>
<AlertCircle className='fd3-ico' strokeWidth={2.5} aria-hidden='true' />
{errorMessage}
</p>
) : null}
{canFlip && flipLabel ? (
<p className='fd3-quiet'>
<button type='button' className='fd3-flip' onClick={() => go(1)}>
{flipLabel}
</button>
</p>
) : null}
{touchTip ? (
<p className='fd3-tip'>
<Smartphone className='fd3-ico' strokeWidth={2.5} aria-hidden='true' />
{touchTip}
</p>
) : null}
</div>
</div>
{canFlip ? (
<ol className='fd3-index fd3-rise' aria-label={indexLabel} style={{ '--i': 3 } as React.CSSProperties}>
{pageList.map((page, i) => (
<li key={`ix-${page.title}-${i}`}>
<button type='button' className='fd3-ix' aria-pressed={i === current} onClick={() => setActive(i)}>
<span className='fd3-ix-n'>{i + 1}</span>
<span>
<span className='fd3-ix-t'>{page.title}</span>
{page.detail ? <span className='fd3-ix-d'>{page.detail}</span> : null}
</span>
</button>
</li>
))}
</ol>
) : null}
</div>
{featureCols ? (
<div className='fd3-feature' data-cols={featureCols}>
{pullLine ? (
<p className='fd3-pull fd3-rise' style={{ '--i': 3 } as React.CSSProperties}>
{pullLine}
</p>
) : null}
{hasStory ? (
<div className='fd3-story fd3-rise' style={{ '--i': 4 } as React.CSSProperties}>
{storyHeadline ? <h3 className='fd3-h3'>{storyHeadline}</h3> : null}
{story.map((paragraph, i) => (
<p key={i} className='fd3-p'>
{paragraph}
</p>
))}
</div>
) : null}
{hasNext ? (
<div className='fd3-next fd3-rise' style={{ '--i': 4 } as React.CSSProperties}>
{nextHeadline ? <h3 className='fd3-h3'>{nextHeadline}</h3> : null}
{nextText ? <p className='fd3-p'>{nextText}</p> : null}
{offerPrice ? (
<p className='fd3-offer'>
{investmentLabel ? <span className='fd3-offer-l'>{investmentLabel} </span> : null}
<span className='fd3-price'>{offerPrice}</span>
{offerNote ? <span className='fd3-offer-note'> {offerNote}</span> : null}
</p>
) : null}
{nextLabel ? (
nextHref ? (
<a className='fd3-btn2' href={nextHref} onClick={() => onAction?.()}>
{nextLabel}
</a>
) : (
<button type='button' className='fd3-btn2' onClick={() => onAction?.()}>
{nextLabel}
</button>
)
) : null}
{ps ? (
<p className='fd3-ps'>
<b>{psLabel}</b> {ps}
</p>
) : null}
</div>
) : null}
</div>
) : null}
</div>
</section>
)
}
export default FreebieDelivery3
const DEFAULT_STORY: React.ReactNode[] = [
'Every day gets one dinner, its prep time and what you’ll need. Cook them in any order.',
'The last page is your shopping list, sorted by aisle, so one trip covers the whole week.',
]
function fill(template: string, values: Record<string, string | number>) {
return Object.keys(values).reduce((out, key) => out.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='fd3-em'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
)
}
const CSS = `
.cf-freebie-delivery-3{--fd3-shadow:var(--shadow,oklch(0.22 0.03 260));position:relative;overflow:clip;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)}
.cf-freebie-delivery-3 *,.cf-freebie-delivery-3 *::before,.cf-freebie-delivery-3 *::after{box-sizing:border-box}
.cf-freebie-delivery-3 .fd3-wrap{max-width:1120px;margin:0 auto}
.cf-freebie-delivery-3 .fd3-spread{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);grid-template-rows:auto auto 1fr;grid-template-areas:'stage head' 'stage action' 'stage index';column-gap:clamp(32px,5vw,72px);align-items:start}
.cf-freebie-delivery-3 .fd3-spread.is-solo{grid-template-columns:minmax(0,46rem);grid-template-rows:auto;grid-template-areas:'head' 'action';justify-content:center}
.cf-freebie-delivery-3 .fd3-head{grid-area:head;min-width:0}
.cf-freebie-delivery-3 .fd3-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;color:var(--ink);text-wrap:balance}
.cf-freebie-delivery-3 .fd3-em{color:var(--accent)}
.cf-freebie-delivery-3 .fd3-lead{margin:16px 0 0;max-width:60ch;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-freebie-delivery-3 .fd3-stage{grid-area:stage;min-width:0;position:sticky;top:24px}
.cf-freebie-delivery-3 .fd3-stage-in{position:relative;overflow:hidden;border-radius:var(--card-radius,var(--radius,14px));background:var(--band);color:var(--band-ink);border:1px solid oklch(from var(--band-ink) l c h / 0.08);padding:clamp(16px,2.4vw,28px);box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32))}
.cf-freebie-delivery-3 .fd3-fan{position:relative;z-index:1;width:100%;max-width:34rem;margin:0 auto;aspect-ratio:1/0.88;touch-action:pan-y;border-radius:12px;outline:none}
.cf-freebie-delivery-3 .fd3-fan:focus-visible{outline:3px solid var(--band-ink);outline-offset:4px}
.cf-freebie-delivery-3 .fd3-page{position:absolute;left:50%;top:50%;width:58%;aspect-ratio:3/4;transform:translate(-50%,-50%) translateX(calc(var(--side,0) * var(--depth,0) * 30%)) translateY(calc(var(--depth,0) * 2%)) rotate(calc(var(--side,0) * var(--depth,0) * 6deg)) scale(calc(1 - var(--depth,0) * 0.07));filter:drop-shadow(0 2px 3px oklch(from var(--fd3-shadow) l c h / 0.45)) drop-shadow(0 14px 18px oklch(from var(--fd3-shadow) l c h / 0.32));transition:transform .45s cubic-bezier(.2,.7,.2,1),translate .16s ease,opacity .3s ease;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.cf-freebie-delivery-3 .fd3-fan.is-single .fd3-page{cursor:default}
.cf-freebie-delivery-3 .fd3-sheet{position:relative;width:100%;height:100%;border-radius:12px;overflow:hidden;background:var(--card)}
.cf-freebie-delivery-3 .fd3-sheet img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center;pointer-events:none;-webkit-user-drag:none}
.cf-freebie-delivery-3 .fd3-sheet::after{content:'';position:absolute;inset:0;background:oklch(from var(--band) l c h / 0.34);opacity:0;transition:opacity .3s ease}
.cf-freebie-delivery-3 .fd3-page:not([data-pos='front']) .fd3-sheet::after{opacity:1}
@media (hover:hover) and (pointer:fine){
.cf-freebie-delivery-3 .fd3-page:not([data-pos='front']):hover{translate:0 -10px}
.cf-freebie-delivery-3 .fd3-page:not([data-pos='front']):hover .fd3-sheet::after{opacity:.45}
.cf-freebie-delivery-3 .fd3-fan:not(.is-single) .fd3-page[data-pos='front']:hover{translate:0 -4px}
}
.cf-freebie-delivery-3 .fd3-foot{position:relative;z-index:1;margin-top:16px;display:grid;gap:8px;justify-items:center;text-align:center}
.cf-freebie-delivery-3 .fd3-cap{margin:0;color:var(--band-ink)}
.cf-freebie-delivery-3 .fd3-count{display:block;font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;font-variant-numeric:tabular-nums}
.cf-freebie-delivery-3 .fd3-cap-title{display:block;margin-top:4px;font-size:1.0625rem;font-weight:700;line-height:1.4;text-wrap:balance}
.cf-freebie-delivery-3 .fd3-ctrl{display:flex;align-items:center;justify-content:center;gap:12px}
.cf-freebie-delivery-3 .fd3-nav{width:44px;height:44px;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:999px;background:oklch(from var(--band-ink) l c h / 0.12);color:var(--band-ink);cursor:pointer;transition:background .16s ease,transform .16s ease}
.cf-freebie-delivery-3 .fd3-nav svg{width:20px;height:20px}
.cf-freebie-delivery-3 .fd3-nav:hover{background:oklch(from var(--band-ink) l c h / 0.22)}
.cf-freebie-delivery-3 .fd3-nav:active{transform:scale(.94)}
.cf-freebie-delivery-3 .fd3-nav:focus-visible,.cf-freebie-delivery-3 .fd3-dot:focus-visible{outline:3px solid var(--band-ink);outline-offset:2px}
.cf-freebie-delivery-3 .fd3-dots{display:flex;align-items:center;gap:2px}
.cf-freebie-delivery-3 .fd3-dot{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:999px;background:transparent;cursor:pointer}
.cf-freebie-delivery-3 .fd3-dot span{display:block;width:8px;height:8px;border-radius:999px;background:oklch(from var(--band-ink) l c h / 0.45);transition:width .2s ease,background .2s ease}
.cf-freebie-delivery-3 .fd3-dot:hover span{background:oklch(from var(--band-ink) l c h / 0.7)}
.cf-freebie-delivery-3 .fd3-dot[aria-pressed='true'] span{width:22px;background:var(--band-ink)}
.cf-freebie-delivery-3 .fd3-action{grid-area:action;min-width:0;padding-top:32px}
.cf-freebie-delivery-3 .fd3-act{max-width:30rem}
.cf-freebie-delivery-3 .fd3-btn{--fd3-bg:var(--button-bg,var(--cta));--fd3-bg2:var(--button-bg-2,var(--cta-2));--fd3-g1:oklch(from var(--fd3-bg) calc(l + 0.04) c h);--fd3-g2:oklch(from var(--fd3-bg2) calc(l - 0.02) c h);--fd3-amb:0 8px 16px -6px oklch(from var(--fd3-shadow) l c h / 0.42);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;min-height:72px;padding:12px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(var(--fd3-g1),var(--fd3-g2));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--fd3-bg) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--fd3-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--fd3-shadow) l c h / 0.3),var(--fd3-amb));transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-freebie-delivery-3 .fd3-btn:hover:not(:disabled):not([aria-disabled='true']),.cf-freebie-delivery-3 .fd3-btn.is-hover{--fd3-g1:oklch(from var(--fd3-bg) calc(l - 0.01) c h);--fd3-g2:oklch(from var(--fd3-bg2) calc(l - 0.07) c h);--fd3-amb:0 10px 20px -6px oklch(from var(--fd3-shadow) l c h / 0.5);transform:translateY(-1px)}
.cf-freebie-delivery-3 .fd3-btn:active:not(:disabled):not([aria-disabled='true']),.cf-freebie-delivery-3 .fd3-btn.is-active{--fd3-g1:oklch(from var(--fd3-bg) calc(l - 0.03) c h);--fd3-g2:oklch(from var(--fd3-bg2) calc(l - 0.08) c h);transform:translateY(1px);box-shadow:var(--button-shadow,inset 0 2px 4px oklch(from var(--fd3-bg) calc(l - 0.22) c h / 0.45),inset 0 -2px 0 oklch(from var(--fd3-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--fd3-shadow) l c h / 0.3))}
.cf-freebie-delivery-3 .fd3-btn:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / 0.55);outline-offset:3px}
.cf-freebie-delivery-3 .fd3-btn:disabled{cursor:not-allowed;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / 0.25)));text-shadow:none;transform:none}
.cf-freebie-delivery-3 .fd3-btn.is-loading{cursor:progress}
.cf-freebie-delivery-3 .fd3-btn-main{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-size:clamp(1.125rem,1.55vw,1.375rem);font-weight:var(--button-weight,800);text-transform:var(--button-case,none);line-height:1.15;text-wrap:balance}
.cf-freebie-delivery-3 .fd3-btn-sub{font-family:var(--font-body);font-size:.9375rem;font-weight:600;line-height:1.3;font-variant-numeric:tabular-nums}
.cf-freebie-delivery-3 .fd3-spin{width:20px;height:20px;flex:0 0 auto;animation:fd3-spin .8s linear infinite}
.cf-freebie-delivery-3 .fd3-ico{display:inline-block;width:16px;height:16px;vertical-align:-0.15em;margin-inline-end:.4em}
.cf-freebie-delivery-3 .fd3-err{margin:12px 0 0;padding:12px 16px;border-radius:10px;background:var(--danger-soft);color:var(--danger);font-size:.9375rem;font-weight:600;line-height:1.4;text-wrap:pretty}
.cf-freebie-delivery-3 .fd3-quiet{margin:12px 0 0;text-align:center}
.cf-freebie-delivery-3 .fd3-flip{display:inline;padding:4px 0;border:0;background:none;font-family:var(--font-body);font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--muted);text-decoration:underline;text-decoration-color:oklch(from var(--muted) l c h / 0.45);text-underline-offset:.18em;cursor:pointer}
.cf-freebie-delivery-3 .fd3-flip:hover{color:var(--ink);text-decoration-color:currentColor}
.cf-freebie-delivery-3 .fd3-flip:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / 0.5);outline-offset:2px;border-radius:4px}
.cf-freebie-delivery-3 .fd3-tip{display:none;margin:12px 0 0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-align:center;text-wrap:pretty}
@media (hover:none) and (pointer:coarse){.cf-freebie-delivery-3 .fd3-tip{display:block}}
.cf-freebie-delivery-3 .fd3-index{grid-area:index;list-style:none;margin:40px 0 0;padding:0;display:grid;gap:4px;max-width:30rem}
.cf-freebie-delivery-3 .fd3-ix{width:100%;display:grid;grid-template-columns:2.25rem minmax(0,1fr);column-gap:12px;align-items:baseline;padding:12px 16px;border:0;border-radius:10px;background:transparent;color:var(--ink);font-family:var(--font-body);text-align:left;cursor:pointer;transition:background .16s ease}
.cf-freebie-delivery-3 .fd3-ix:hover{background:color-mix(in oklch,var(--ink) 4%,var(--surface))}
.cf-freebie-delivery-3 .fd3-ix[aria-pressed='true']{background:color-mix(in oklch,var(--accent) 10%,var(--surface))}
.cf-freebie-delivery-3 .fd3-ix:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / 0.5);outline-offset:2px}
.cf-freebie-delivery-3 .fd3-ix-n{font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--accent);font-variant-numeric:tabular-nums}
.cf-freebie-delivery-3 .fd3-ix-t{display:block;font-size:1.0625rem;font-weight:800;line-height:1.3}
.cf-freebie-delivery-3 .fd3-ix-d{display:block;margin-top:4px;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-freebie-delivery-3 .fd3-ix[aria-pressed='true'] .fd3-ix-d{color:var(--ink)}
.cf-freebie-delivery-3 .fd3-feature{margin-top:clamp(56px,7vw,96px);display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,0.95fr) minmax(0,1.1fr);gap:clamp(24px,3.5vw,48px);align-items:start}
.cf-freebie-delivery-3 .fd3-feature[data-cols='2']{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.cf-freebie-delivery-3 .fd3-feature[data-cols='1']{grid-template-columns:minmax(0,46rem)}
.cf-freebie-delivery-3 .fd3-pull{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;color:var(--ink);text-wrap:balance}
.cf-freebie-delivery-3 .fd3-h3{margin:0;font-family:var(--font-display);font-weight:800;letter-spacing:-0.01em;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--ink);text-wrap:balance}
.cf-freebie-delivery-3 .fd3-p{margin:12px 0 0;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ink);text-wrap:pretty}
.cf-freebie-delivery-3 .fd3-offer{margin:16px 0 0;display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px;row-gap:8px;padding:16px;border-radius:10px;background:color-mix(in oklch,var(--ink) 4%,var(--card));color:var(--ink)}
.cf-freebie-delivery-3 .fd3-offer-l{flex-basis:100%;font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.cf-freebie-delivery-3 .fd3-price{font-family:var(--font-display);font-weight:var(--display-weight,800);font-size:2rem;line-height:1;letter-spacing:-0.03em;font-variant-numeric:tabular-nums;color:var(--ink)}
.cf-freebie-delivery-3 .fd3-offer-note{font-size:1.0625rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-freebie-delivery-3 .fd3-next{background:var(--card);color:var(--ink);border:1px solid var(--card-border,oklch(from var(--ink) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(0.22 0.03 260 / 0.22),0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));padding:clamp(20px,3vw,32px)}
.cf-freebie-delivery-3 .fd3-btn2{margin-top:24px;display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:56px;padding:8px 16px;border:1px solid var(--button-2-border,transparent);border-radius:var(--button-radius,var(--radius,12px));background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / 0.25)));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:1.125rem;line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;cursor:pointer;transition:background .16s ease,transform .16s ease}
.cf-freebie-delivery-3 .fd3-btn2:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.04) c h)}
.cf-freebie-delivery-3 .fd3-btn2:active{transform:translateY(1px);background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - 0.07) c h)}
.cf-freebie-delivery-3 .fd3-btn2:focus-visible{outline:3px solid oklch(from var(--field-focus,var(--accent)) l c h / 0.55);outline-offset:3px}
.cf-freebie-delivery-3 .fd3-ps{margin:16px 0 0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--muted);text-wrap:pretty}
.cf-freebie-delivery-3 .fd3-ps b{color:var(--ink);font-weight:800}
.cf-freebie-delivery-3 .fd3-rise{animation:fd3-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(min(var(--i,0) * .07s, .28s))}
@keyframes fd3-rise{from{opacity:.82;transform:translateY(8px)}}
@keyframes fd3-spin{to{transform:rotate(360deg)}}
@media (max-width:900px){
.cf-freebie-delivery-3 .fd3-spread{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;grid-template-areas:'head' 'stage' 'action' 'index'}
.cf-freebie-delivery-3 .fd3-spread.is-solo{grid-template-areas:'head' 'action'}
.cf-freebie-delivery-3 .fd3-stage{position:relative;top:auto;margin-top:32px}
.cf-freebie-delivery-3 .fd3-action{padding-top:24px}
.cf-freebie-delivery-3 .fd3-feature[data-cols]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.cf-freebie-delivery-3 .fd3-feature[data-cols='1']{grid-template-columns:minmax(0,1fr)}
.cf-freebie-delivery-3 .fd3-feature[data-cols='3'] .fd3-pull{grid-column:1/-1}
}
@media (max-width:640px){
.cf-freebie-delivery-3 .fd3-act{max-width:none}
.cf-freebie-delivery-3 .fd3-fan{aspect-ratio:1/1.12}
.cf-freebie-delivery-3 .fd3-page{width:76%}
.cf-freebie-delivery-3 .fd3-page[data-pos='right']{transform:translate(-50%,-50%) translateX(118%);opacity:0;pointer-events:none}
.cf-freebie-delivery-3 .fd3-page[data-pos='left']{transform:translate(-50%,-50%) translateX(-118%);opacity:0;pointer-events:none}
.cf-freebie-delivery-3 .fd3-nav{display:none}
.cf-freebie-delivery-3 .fd3-index{display:none}
.cf-freebie-delivery-3 .fd3-feature[data-cols]{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion:reduce){
.cf-freebie-delivery-3 .fd3-rise,.cf-freebie-delivery-3 .fd3-spin{animation:none}
.cf-freebie-delivery-3 .fd3-page,.cf-freebie-delivery-3 .fd3-sheet::after,.cf-freebie-delivery-3 .fd3-dot span,.cf-freebie-delivery-3 .fd3-btn,.cf-freebie-delivery-3 .fd3-btn2,.cf-freebie-delivery-3 .fd3-nav,.cf-freebie-delivery-3 .fd3-ix{transition:none}
.cf-freebie-delivery-3 .fd3-page:hover{translate:none}
}
`
pieces/checkout/freebie-delivery-3/specimen.tsx 66 lines
import __studioImage928596c9 from "../assets/9d72d286ab97245f.webp";
import __studioImage5c0fa5cb from "../assets/c164da25ea94e4db.webp";
import __studioImage3944feff from "../assets/ce0d5c87c6542c25.webp";
import defaults from '../../studio-defaults.json'
import { slot } from '../../slots'
import { FreebieDelivery3 } from '../freebie-delivery-3'
export const states = ['default', 'hover', 'active', 'disabled', 'error']
type State = 'default' | 'hover' | 'active' | 'disabled' | 'error'
export default function FreebieDelivery3Specimen({ state = 'default' }: { state?: State }) {
const sample = defaults.sample
return (
<FreebieDelivery3
state={state}
headline='Seven dinners, planned and ready to cook'
emphasis='ready to cook'
lead='Flip through your free Greenroot Kitchen meal plan, then save it for the week ahead.'
pages={[
{
image: slot(
'item-1',
__studioImage928596c9,
),
alt: 'Meal plan page with three dinner recipes for days one to three',
title: 'Days 1–3: weeknight dinners',
detail: 'Traybake chicken, a veggie stir-fry and a bean pasta.',
},
{
image: slot(
'item-2',
__studioImage5c0fa5cb,
),
alt: 'Meal plan page with four dinner recipes for days four to seven',
title: 'Days 4–7: the rest of the week',
detail: 'Salmon bowls, tacos, risotto and a one-pot curry.',
},
{
image: slot(
'item-3',
__studioImage3944feff,
),
alt: 'Shopping list page grouped by aisle with tick boxes',
title: 'Your shopping list',
detail: 'Sorted by aisle, so one trip covers the week.',
},
]}
downloadLabel='Download my meal plan'
fileType='PDF'
fileSize='3.1 MB'
pullLine='Seven dinners. One shopping list. Planned before Monday.'
storyHeadline='Cook from it all week'
story={[
'Every day gets one dinner, its prep time and what you’ll need. Cook them in any order.',
'The last page is your shopping list, sorted by aisle, so one trip covers the whole week.',
]}
nextHeadline='Rather skip the grocery run?'
nextText='Your first Greenroot Kitchen box brings the ingredients for this week’s recipes to your door.'
offerPrice={sample.price}
offerNote='for your first box.'
nextLabel='Show me my first box'
ps={`Keep the plan either way. Your first box comes with a ${sample.guarantee}.`}
/>
)
}
| Name | Type | Details |
|---|---|---|
headline OptionalFreebieDelivery3 |
string |
|
emphasis OptionalFreebieDelivery3 |
string |
|
lead OptionalFreebieDelivery3 |
string |
|
pages OptionalFreebieDelivery3 |
FreebieDelivery3Page[] |
|
previewLabel OptionalFreebieDelivery3 |
string |
|
prevLabel OptionalFreebieDelivery3 |
string |
|
nextPageLabel OptionalFreebieDelivery3 |
string |
|
dotLabel OptionalFreebieDelivery3 |
string |
|
countLabel OptionalFreebieDelivery3 |
string |
|
slideLabel OptionalFreebieDelivery3 |
string |
|
indexLabel OptionalFreebieDelivery3 |
string |
|
downloadLabel OptionalFreebieDelivery3 |
string |
|
loadingLabel OptionalFreebieDelivery3 |
string |
|
freeLabel OptionalFreebieDelivery3 |
string |
|
fileType OptionalFreebieDelivery3 |
string |
|
fileSize OptionalFreebieDelivery3 |
string |
|
downloadHref OptionalFreebieDelivery3 |
string |
|
download OptionalFreebieDelivery3 |
boolean | string |
|
onDownload OptionalFreebieDelivery3 |
() => void |
|
loading OptionalFreebieDelivery3 |
boolean |
|
flipLabel OptionalFreebieDelivery3 |
string |
|
touchTip OptionalFreebieDelivery3 |
string |
|
errorMessage OptionalFreebieDelivery3 |
string |
|
pullLine OptionalFreebieDelivery3 |
string |
|
storyHeadline OptionalFreebieDelivery3 |
string |
|
story OptionalFreebieDelivery3 |
React.ReactNode[] |
|
nextHeadline OptionalFreebieDelivery3 |
string |
|
nextText OptionalFreebieDelivery3 |
React.ReactNode |
|
investmentLabel OptionalFreebieDelivery3 |
string |
|
offerPrice OptionalFreebieDelivery3 |
string |
|
offerNote OptionalFreebieDelivery3 |
string |
|
nextLabel OptionalFreebieDelivery3 |
string |
|
nextHref OptionalFreebieDelivery3 |
string |
|
onAction OptionalFreebieDelivery3 |
() => void |
|
psLabel OptionalFreebieDelivery3 |
string |
|
ps OptionalFreebieDelivery3 |
string |
|
state OptionalFreebieDelivery3 |
'default' | 'hover' | 'active' | 'disabled' | 'error' |
|
className OptionalFreebieDelivery3 |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
item-1- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-2- One image per offer item (item-1, item-2…), shown in stacks and lists.
item-3- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
986367d82c360c9a.webp
image/webp · 102 KB
-
9d72d286ab97245f.webp
image/webp · 77.8 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
c164da25ea94e4db.webp
image/webp · 141 KB
-
ce0d5c87c6542c25.webp
image/webp · 76.1 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB