Book Shipped Hero 1
Free + shipping confirmation, first screen. The dark scrim half confirms the book and the buyer by name and gives the
Use it in a prompt
Use hero/book-shipped-hero 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/hero/book-shipped-hero.tsx. - Import it and pass your copy and images (Props tab):
import { BookShippedHero } from "@/components/funneldna/hero/book-shipped-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/book-shipped-hero/component.tsx 359 lines
// layout: split-contrast
// Free + shipping confirmation, first screen. The dark scrim half confirms the book and the buyer by name and gives the
// one action (read chapter one today). The photo half shows the copy waiting at the door, and the route under it sets
// delivery expectations from supplied facts only.
import * as React from "react";
import { BookOpen, Mail, Package } from "lucide-react";
import { motion, useReducedMotion } from "motion/react";
export type BookShippedHeroCopy = {
/** Headline with {book} and {name}. */
headline: string;
/** Headline when no first name is supplied ({book}). */
headlineNoName: string;
/** Headline when no book title is supplied ({name}). */
headlineNoBook: string;
/** Headline with neither name nor title. */
headlineBare: string;
lead: string;
/** Small-caps label in front of the shipping amount. */
investmentLabel: string;
/** Sentence after the label; {amount} is the supplied shipping charge. */
investment: string;
actionLabel: string;
/** One short line under the button. */
actionNote: string;
/** Accessible name of the route list. */
routeLabel: string;
stopPlaced: string;
stopShipped: string;
stopDoor: string;
/** {estimate} is the supplied delivery estimate. */
doorDetail: string;
/** {region} is the supplied delivery region. */
regionDetail: string;
statusDone: string;
statusCurrent: string;
statusNext: string;
/** {sender} is who the tracking email comes from. */
sender: string;
/** {order} is the supplied order number. */
order: string;
};
export type BookShippedHeroProps = {
/** `scene` slot: the doorstep photo. Without it the band stays a plain themed band. */
sceneImage?: string;
sceneAlt?: string;
/** object-position of the photo; keep the mailer clear of the text side. */
scenePosition?: string;
bookTitle?: string;
firstName?: string;
/** Supplied shipping charge, e.g. "$7.95". The investment line hides when missing. */
shippingPaid?: string;
/** Route facts. A stop is hidden when its fact is missing. */
orderedDate?: string;
dispatchWindow?: string;
deliveryEstimate?: string;
region?: string;
/** Stop in progress: 0 order placed, 1 packed and shipped, 2 at your door. Earlier stops show as done. */
currentStop?: 0 | 1 | 2;
/** Name or address the shipping email comes from. */
sender?: string;
orderNumber?: string;
/** Digital preview link (chapter one). */
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
state?: "default" | "hover" | "active" | "disabled";
copy?: Partial<BookShippedHeroCopy>;
className?: string;
};
const DEFAULT_COPY: BookShippedHeroCopy = {
headline: "Your copy of {book} is on its way, {name}.",
headlineNoName: "Your copy of {book} is on its way.",
headlineNoBook: "Your book is on its way, {name}.",
headlineBare: "Your book is on its way.",
lead: "Chapter one is ready to read right now. Start tonight while your copy makes its way to you.",
investmentLabel: "Your investment:",
investment: "{amount} for shipping. The book itself is free.",
actionLabel: "Start reading chapter one now",
actionNote: "Free preview · opens in your browser",
routeLabel: "Your delivery route",
stopPlaced: "Order placed",
stopShipped: "Packed and shipped",
stopDoor: "At your door",
doorDetail: "Expected {estimate}",
regionDetail: "Delivering to {region}",
statusDone: "Done:",
statusCurrent: "In progress:",
statusNext: "Coming up:",
sender: "Tracking updates come from {sender}",
order: "Order {order}",
};
export function BookShippedHero(props: BookShippedHeroProps) {
const {
sceneImage,
sceneAlt = "A padded mailer with a hardback book waiting on a front doorstep",
scenePosition = "68% 45%",
bookTitle,
firstName,
shippingPaid,
orderedDate,
dispatchWindow,
deliveryEstimate,
region,
currentStop = 1,
sender,
orderNumber,
href,
onAction,
state = "default",
copy,
className,
} = props;
const c: BookShippedHeroCopy = { ...DEFAULT_COPY, ...copy };
const reduce = useReducedMotion();
const headingId = React.useId();
const template = bookTitle
? firstName
? c.headline
: c.headlineNoName
: firstName
? c.headlineNoBook
: c.headlineBare;
const headline = fillNodes(template, {
book: bookTitle ? <span className="bsh-book">{bookTitle}</span> : null,
name: firstName ?? "",
});
const stops = [
{ key: "placed", index: 0, label: c.stopPlaced, details: [orderedDate], show: Boolean(orderedDate) },
{ key: "shipped", index: 1, label: c.stopShipped, details: [dispatchWindow], show: Boolean(dispatchWindow) },
{
key: "door",
index: 2,
label: c.stopDoor,
details: [
deliveryEstimate ? fill(c.doorDetail, { estimate: deliveryEstimate }) : undefined,
region ? fill(c.regionDetail, { region }) : undefined,
],
show: Boolean(deliveryEstimate),
},
].filter((s) => s.show);
const meta: string[] = [];
if (sender) meta.push(fill(c.sender, { sender }));
if (orderNumber) meta.push(fill(c.order, { order: orderNumber }));
const MetaIcon = sender ? Mail : Package;
const disabled = state === "disabled" || (!href && !onAction);
const btnClass = ["bsh-btn", state === "hover" ? "is-hover" : "", state === "active" ? "is-active" : ""]
.filter(Boolean)
.join(" ");
const button =
!disabled && href ? (
<a className={btnClass} href={href} onClick={onAction}>
{c.actionLabel}
</a>
) : (
<button type="button" className={btnClass} disabled={disabled} onClick={disabled ? undefined : onAction}>
{c.actionLabel}
</button>
);
return (
<section
className={["cf-book-shipped-hero", sceneImage ? "has-media" : "no-media", className].filter(Boolean).join(" ")}
aria-labelledby={headingId}
>
<style>{CSS}</style>
{sceneImage ? (
<div className="bsh-media">
<img
className="bsh-img"
src={sceneImage}
alt={sceneAlt}
width={1600}
height={1067}
loading="eager"
decoding="async"
style={{ objectPosition: scenePosition }}
/>
<span className="bsh-scrim bsh-scrim--side" aria-hidden="true" />
<span className="bsh-scrim bsh-scrim--foot" aria-hidden="true" />
</div>
) : null}
<div className="bsh-inner">
<div className="bsh-copy">
<h1 id={headingId} className="bsh-h1 bsh-rise" style={{ "--i": 0 } as React.CSSProperties}>
{headline}
</h1>
<p className="bsh-lead bsh-rise" style={{ "--i": 1 } as React.CSSProperties}>
{c.lead}
{shippingPaid ? (
<span className="bsh-invest">
<span className="bsh-invest-label">{c.investmentLabel}</span>{" "}
{fill(c.investment, { amount: shippingPaid })}
</span>
) : null}
</p>
<div className="bsh-action bsh-rise" style={{ "--i": 2 } as React.CSSProperties}>
{button}
<p className="bsh-note">
<BookOpen className="bsh-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{c.actionNote}
</p>
</div>
</div>
{stops.length ? (
<div className="bsh-route-wrap bsh-rise" style={{ "--i": 3 } as React.CSSProperties}>
<ol className="bsh-route" aria-label={c.routeLabel} style={{ "--bsh-n": stops.length } as React.CSSProperties}>
{stops.map((s, i) => {
const status = s.index < currentStop ? "done" : s.index === currentStop ? "current" : "next";
const next = stops[i + 1];
const linkDone = next ? next.index <= currentStop : false;
const statusText =
status === "done" ? c.statusDone : status === "current" ? c.statusCurrent : c.statusNext;
return (
<li
key={s.key}
className={`bsh-stop is-${status}${linkDone ? " link-done" : ""}`}
aria-current={status === "current" ? "step" : undefined}
>
<span className="bsh-node" aria-hidden="true">
<span className="bsh-dot" />
{status === "current" && !reduce ? (
<motion.span
className="bsh-ping"
initial={{ opacity: 0, scale: 1 }}
whileInView={{ opacity: [0.6, 0], scale: [1, 2.8] }}
viewport={{ once: true, amount: 1 }}
transition={{ duration: 1.2, delay: 0.4, ease: [0.2, 0.7, 0.2, 1] }}
/>
) : null}
</span>
<span className="bsh-sr">{statusText} </span>
<span className="bsh-stop-label">{s.label}</span>
{s.details.filter(Boolean).map((d) => (
<span key={d} className="bsh-stop-detail">
{d}
</span>
))}
</li>
);
})}
</ol>
</div>
) : null}
{meta.length ? (
<p className="bsh-meta bsh-rise" style={{ "--i": 4 } as React.CSSProperties}>
<MetaIcon className="bsh-inline-icon" size={16} strokeWidth={2.5} aria-hidden="true" />
{meta.map((m, i) => (
<React.Fragment key={m}>
{i ? (
<span className="bsh-sep" aria-hidden="true">
·
</span>
) : null}
<span>{m}</span>
</React.Fragment>
))}
</p>
) : null}
</div>
</section>
);
}
export default BookShippedHero;
function fill(template: string, values: Record<string, string>): string {
return template.replace(/\{([a-zA-Z]+)\}/g, (_m, k: string) => values[k] ?? "");
}
function fillNodes(template: string, values: Record<string, React.ReactNode>): React.ReactNode[] {
return template
.split(/(\{[a-zA-Z]+\})/g)
.filter((part) => part !== "")
.map((part, i) => {
const m = /^\{([a-zA-Z]+)\}$/.exec(part);
if (m && m[1] in values) return <React.Fragment key={i}>{values[m[1]]}</React.Fragment>;
return <React.Fragment key={i}>{part}</React.Fragment>;
});
}
const CSS = `
.cf-book-shipped-hero{position:relative;isolation:isolate;overflow:hidden;background:var(--band);color:var(--band-ink);font-family:var(--font-body);}
.cf-book-shipped-hero *,.cf-book-shipped-hero *::before,.cf-book-shipped-hero *::after{box-sizing:border-box;}
.cf-book-shipped-hero .bsh-media{position:relative;aspect-ratio:4/3;overflow:hidden;background:oklch(from var(--band) calc(l + 0.06) c h);}
.cf-book-shipped-hero .bsh-img{position:absolute;inset:0;width:100%;height:100%;display:block;object-fit:cover;}
.cf-book-shipped-hero .bsh-scrim{display:none;position:absolute;inset:0;pointer-events:none;}
.cf-book-shipped-hero .bsh-inner{position:relative;z-index:1;width:100%;max-width:1216px;margin:0 auto;padding:32px clamp(16px,5vw,48px) 64px;}
.cf-book-shipped-hero.no-media .bsh-inner{padding-top:clamp(56px,8vw,112px);}
.cf-book-shipped-hero .bsh-copy{max-width:40rem;}
.cf-book-shipped-hero .bsh-h1{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(2.5rem,5.4vw,4.875rem);line-height:1.04;text-wrap:balance;color:oklch(from var(--band-ink) calc(l - 0.14) c h);}
.cf-book-shipped-hero .bsh-book{color:var(--band-ink);}
.cf-book-shipped-hero .bsh-lead{margin:clamp(16px,1.6vw,24px) 0 0;max-width:34rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;text-wrap:pretty;color:oklch(from var(--band-ink) calc(l - 0.08) c h);}
.cf-book-shipped-hero .bsh-invest{display:block;margin-top:12px;font-weight:600;text-wrap:pretty;color:var(--band-ink);}
.cf-book-shipped-hero .bsh-invest-label{font-weight:800;}
.cf-book-shipped-hero .bsh-action{margin-top:32px;display:grid;justify-items:center;width:fit-content;max-width:100%;}
.cf-book-shipped-hero .bsh-btn{--bsh-bg:var(--button-bg,var(--cta));--bsh-bg-2:var(--button-bg-2,var(--cta-2));--bsh-shadow:var(--shadow,oklch(0.22 0.03 260));display:flex;align-items:center;justify-content:center;width:100%;min-height:72px;max-width:100%;margin:0;padding:14px 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--bsh-bg) calc(l + 0.04) c h),oklch(from var(--bsh-bg-2) calc(l - 0.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);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-wrap:balance;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--bsh-bg) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--bsh-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--bsh-shadow) l c h / 0.45),0 8px 16px -6px oklch(from var(--bsh-shadow) l c h / 0.55));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent;}
.cf-book-shipped-hero .bsh-btn:hover:not(:disabled),.cf-book-shipped-hero .bsh-btn.is-hover{background:linear-gradient(oklch(from var(--bsh-bg) calc(l - 0.01) c h),oklch(from var(--bsh-bg-2) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--bsh-bg) calc(l + 0.1) c h / 0.6),inset 0 -3px 0 oklch(from var(--bsh-bg) calc(l - 0.2) c h),0 1px 2px oklch(from var(--bsh-shadow) l c h / 0.5),0 10px 18px -6px oklch(from var(--bsh-shadow) l c h / 0.65);}
.cf-book-shipped-hero .bsh-btn:active:not(:disabled),.cf-book-shipped-hero .bsh-btn.is-active{transform:translateY(2px);background:linear-gradient(oklch(from var(--bsh-bg) calc(l - 0.06) c h),oklch(from var(--bsh-bg-2) calc(l - 0.08) c h));box-shadow:inset 0 2px 4px oklch(from var(--bsh-bg) calc(l - 0.22) c h / 0.55),inset 0 -2px 0 oklch(from var(--bsh-bg) calc(l - 0.16) c h),0 1px 2px oklch(from var(--bsh-shadow) l c h / 0.4);}
.cf-book-shipped-hero .bsh-btn:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px;}
.cf-book-shipped-hero .bsh-btn:disabled{cursor:not-allowed;background:color-mix(in oklch,var(--band-ink) 16%,var(--band));color:color-mix(in oklch,var(--band-ink) 72%,var(--band));text-shadow:none;box-shadow:none;transform:none;}
.cf-book-shipped-hero .bsh-note{margin:12px 0 0;max-width:100%;font-size:0.9375rem;line-height:1.4;font-weight:600;text-align:center;text-wrap:pretty;color:oklch(from var(--band-ink) calc(l - 0.08) c h);}
.cf-book-shipped-hero .bsh-inline-icon{display:inline-block;vertical-align:-0.15em;margin-inline-end:0.4em;}
.cf-book-shipped-hero .bsh-route-wrap{margin-top:40px;}
.cf-book-shipped-hero .bsh-route{list-style:none;margin:0;padding:0;display:grid;gap:20px;}
.cf-book-shipped-hero .bsh-stop{position:relative;min-width:0;padding-left:32px;}
.cf-book-shipped-hero .bsh-node{position:absolute;left:0;top:3px;width:16px;height:16px;display:grid;place-items:center;}
.cf-book-shipped-hero .bsh-dot{position:relative;z-index:1;width:12px;height:12px;border-radius:50%;background:var(--band);border:2px solid oklch(from var(--band-ink) l c h / 0.6);}
.cf-book-shipped-hero .is-done .bsh-dot{background:var(--band-ink);border-color:var(--band-ink);}
.cf-book-shipped-hero .is-current .bsh-dot{width:16px;height:16px;background:var(--accent-fill,var(--accent));border:3px solid var(--band-ink);}
.cf-book-shipped-hero .bsh-ping{position:absolute;inset:0;border-radius:50%;background:var(--accent-fill,var(--accent));pointer-events:none;}
.cf-book-shipped-hero .bsh-stop:not(:last-child)::after{content:"";position:absolute;left:7px;top:27px;bottom:-15px;width:2px;border-radius:2px;background:oklch(from var(--band-ink) l c h / 0.32);}
.cf-book-shipped-hero .bsh-stop.link-done::after{background:var(--band-ink);}
.cf-book-shipped-hero .bsh-stop-label{display:block;font-size:1.0625rem;line-height:1.3;font-weight:800;color:var(--band-ink);}
.cf-book-shipped-hero .bsh-stop-detail{display:block;margin-top:4px;font-size:0.9375rem;line-height:1.4;font-weight:500;text-wrap:pretty;color:oklch(from var(--band-ink) calc(l - 0.08) c h);}
.cf-book-shipped-hero .bsh-stop-detail + .bsh-stop-detail{margin-top:0;}
.cf-book-shipped-hero .bsh-meta{margin:28px 0 0;font-size:0.9375rem;line-height:1.4;font-weight:500;overflow-wrap:anywhere;text-wrap:pretty;color:oklch(from var(--band-ink) calc(l - 0.08) c h);}
.cf-book-shipped-hero .bsh-sep{padding-inline:0.4em;}
.cf-book-shipped-hero .bsh-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}
@keyframes bsh-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
.cf-book-shipped-hero .bsh-rise{animation:bsh-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0) * .07s);}
@media (max-width:640px){
.cf-book-shipped-hero .bsh-action{width:100%;}
.cf-book-shipped-hero .bsh-btn{min-height:64px;padding:12px 16px;font-size:min(1.125rem,4.4vw);}
}
@media (min-width:641px){
.cf-book-shipped-hero .bsh-route{grid-template-columns:repeat(var(--bsh-n,3),minmax(0,1fr));gap:24px;}
.cf-book-shipped-hero .bsh-stop{padding-left:0;padding-top:32px;}
.cf-book-shipped-hero .bsh-node{top:0;}
.cf-book-shipped-hero .bsh-stop:not(:last-child)::after{left:24px;right:-16px;top:7px;bottom:auto;width:auto;height:2px;}
}
@media (min-width:641px) and (max-width:899px){
.cf-book-shipped-hero .bsh-media{aspect-ratio:16/9;}
}
@media (min-width:900px){
.cf-book-shipped-hero .bsh-media{position:absolute;inset:0;z-index:0;aspect-ratio:auto;}
.cf-book-shipped-hero .bsh-scrim{display:block;}
.cf-book-shipped-hero .bsh-scrim--side{background:linear-gradient(90deg,oklch(from var(--band) l c h / 0.94) 0%,oklch(from var(--band) l c h / 0.9) 48%,oklch(from var(--band) l c h / 0.55) 64%,oklch(from var(--band) l c h / 0) 82%);}
.cf-book-shipped-hero .bsh-scrim--foot{background:linear-gradient(0deg,oklch(from var(--band) l c h / 0.96) 0%,oklch(from var(--band) l c h / 0.88) 28%,oklch(from var(--band) l c h / 0) 52%);}
.cf-book-shipped-hero .bsh-inner,.cf-book-shipped-hero.no-media .bsh-inner{padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) clamp(40px,4.5vw,64px);}
.cf-book-shipped-hero .bsh-route-wrap{margin-top:clamp(48px,5vw,72px);}
}
@media (min-width:900px) and (max-width:1199px){
.cf-book-shipped-hero .bsh-scrim--side{background:linear-gradient(90deg,oklch(from var(--band) l c h / 0.94) 0%,oklch(from var(--band) l c h / 0.92) 58%,oklch(from var(--band) l c h / 0.6) 74%,oklch(from var(--band) l c h / 0) 92%);}
}
@media (prefers-reduced-motion:reduce){
.cf-book-shipped-hero .bsh-rise{animation:none;}
.cf-book-shipped-hero .bsh-btn{transition:none;}
.cf-book-shipped-hero .bsh-btn:active:not(:disabled),.cf-book-shipped-hero .bsh-btn.is-active{transform:none;}
}
`;
pieces/hero/book-shipped-hero/specimen.tsx 34 lines
import __studioImage64739b1a from "../assets/32fc808ce1ba91f8.webp";
import { BookShippedHero } from "../book-shipped-hero";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled"] as const;
type SpecimenState = (typeof states)[number];
export default function BookShippedHeroSpecimen({ state = "default" }: { state?: SpecimenState }) {
return (
<BookShippedHero
state={state}
sceneImage={slot(
"scene",
__studioImage64739b1a
)}
sceneAlt="A padded mailer with a hardback copy of The Quiet Close waiting on a front doorstep"
scenePosition="70% 42%"
bookTitle="The Quiet Close"
firstName="Maya"
shippingPaid="$7.95"
orderedDate="Nov 22, 2026"
dispatchWindow="Ships in 1–2 business days"
deliveryEstimate="Nov 27–29"
region="Portland, OR"
currentStop={1}
sender="Dana Whitcombe Books"
orderNumber="#QC-20481"
href="#chapter-one"
copy={{
lead: "Dana’s first chapter is ready to read right now. Start tonight while your hardback makes its way to you.",
}}
/>
);
}
| Name | Type | Details |
|---|---|---|
sceneImage OptionalBookShippedHero |
string |
|
sceneAlt OptionalBookShippedHero |
string |
|
scenePosition OptionalBookShippedHero |
string |
|
bookTitle OptionalBookShippedHero |
string |
|
firstName OptionalBookShippedHero |
string |
|
shippingPaid OptionalBookShippedHero |
string |
|
orderedDate OptionalBookShippedHero |
string |
|
dispatchWindow OptionalBookShippedHero |
string |
|
deliveryEstimate OptionalBookShippedHero |
string |
|
region OptionalBookShippedHero |
string |
|
currentStop OptionalBookShippedHero |
0 | 1 | 2 |
|
sender OptionalBookShippedHero |
string |
|
orderNumber OptionalBookShippedHero |
string |
|
href OptionalBookShippedHero |
string |
|
onAction OptionalBookShippedHero |
(event: React.MouseEvent<HTMLElement>) => void |
|
state OptionalBookShippedHero |
"default" | "hover" | "active" | "disabled" |
|
copy OptionalBookShippedHero |
Partial<BookShippedHeroCopy> |
|
className OptionalBookShippedHero |
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.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
scene- A wide atmosphere photo behind or beside the copy.
-
32fc808ce1ba91f8.webp
image/webp · 71.2 KB