Whiteboard Hero 1
Explains the problem and the fix as a whiteboard sketch that ends on the button.
Use it in a prompt
Use attention/whiteboard-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/attention/whiteboard-hero.tsx. - Import it and pass your copy and images (Props tab):
import { WhiteboardHero } from "@/components/funneldna/attention/whiteboard-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/attention/whiteboard-hero/component.tsx 622 lines
// Explains the problem and the fix as a whiteboard sketch that ends on the button.
// layout: comparison-columns
// Whiteboard explainer hero: a marker hand sketches the mess and the kit, then highlights the promise, so the last stroke lands near the action.
import * as React from "react";
import { Check, Download, ShieldCheck, X } from "lucide-react";
export type WhiteboardHeroRow = {
/** One short punch line for what this part does ("Map your pages."). */
title: string;
/** Product name shown under the punch line. */
name?: string;
/** Supplied value, shown through valueTemplate. */
value?: string;
/** Item photo (item-n slot). */
image?: string;
imageAlt?: string;
};
export type WhiteboardHeroProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke. */
highlight?: string;
lead?: React.ReactNode;
/** Accessible name for the comparison board. */
boardLabel?: string;
problemTitle?: string;
problemRows?: string[];
/** One-word punch at the bottom of the problem column. */
problemPunch?: string;
/** Transparent line-art sketch; drawn in the theme's muted ink through a mask. */
problemImage?: string;
problemImageAlt?: string;
solutionTitle?: string;
solutionRows?: WhiteboardHeroRow[];
/** One-word punch at the bottom of the winning column. */
solutionPunch?: string;
/** Transparent line-art sketch; drawn in the theme's accent through a mask. */
solutionImage?: string;
solutionImageAlt?: string;
/** Transparent cut-out of a hand holding a marker; draws the sketches and rests by the button. */
handImage?: string;
price?: string;
priceNote?: string;
/** Supplied per-day breakdown under the price. */
priceBreakdown?: string;
label?: string;
reassurance?: string[];
/** Quiet line under the button. */
secondaryLine?: string;
secondaryHref?: string;
/** Template for item values; {value} is replaced with the row value. */
valueTemplate?: string;
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
disabled?: boolean;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
export function WhiteboardHero(props: WhiteboardHeroProps) {
const {
headline = "Build your first funnel with a clear plan",
highlight = "a clear plan",
lead = "Plan your funnel, write your page copy, and check every step before you launch.",
boardLabel = "Winging it compared with the Funnel Starter Kit",
problemTitle = "Winging it",
problemRows = ["Guess which pages you need.", "Stare at a blank headline.", "Hope every link works."],
problemPunch = "Stuck.",
problemImage,
problemImageAlt = "Marker sketch of tangled arrows and question marks",
solutionTitle = "The Funnel Starter Kit",
solutionRows = DEFAULT_ROWS,
solutionPunch = "Launch.",
solutionImage,
solutionImageAlt = "Marker sketch of a simple three-step funnel with ticks",
handImage,
price = "$47",
priceNote = "One payment · Lifetime access",
priceBreakdown = "About $1.57 a day for a month",
label = "Send Me The Starter Kit",
reassurance = ["Instant digital access", "30-day money-back guarantee"],
secondaryLine = "or keep reading to see what’s inside",
secondaryHref,
valueTemplate = "{value} value",
href,
onAction,
disabled = false,
state = "default",
className = "",
} = props;
const headingId = React.useId();
const [before, marked, after] = splitHeadline(headline, highlight);
const isDisabled = disabled || state === "disabled";
const forced = state === "hover" ? " is-hover" : state === "active" ? " is-active" : "";
const buttonClass = `wbh-btn${forced}`;
const rootClass = `cf-whiteboard-hero${isDisabled ? " is-disabled" : ""}${className ? ` ${className}` : ""}`;
const button =
isDisabled || !href ? (
<button type="button" className={buttonClass} disabled={isDisabled} onClick={isDisabled ? undefined : onAction}>
{label}
</button>
) : (
<a className={buttonClass} href={href} onClick={onAction}>
{label}
</a>
);
return (
<div className={rootClass}>
<style>{CSS}</style>
<h1 id={headingId} className="wbh-h1">
{before}
{marked ? <span className="wbh-hl">{marked}</span> : null}
{after}
</h1>
{lead ? <p className="wbh-lead">{lead}</p> : null}
<div className="wbh-board" role="group" aria-label={boardLabel}>
<div className="wbh-col wbh-col--problem">
<h2 className="wbh-badge">{problemTitle}</h2>
{problemImage ? <Sketch src={problemImage} alt={problemImageAlt} hand={handImage} /> : null}
<ul className="wbh-rows">
{problemRows.map((row, index) => (
<li className="wbh-row" key={row}>
<span className="wbh-icon wbh-icon--no" style={order(index)} aria-hidden="true">
<X strokeWidth={3} />
</span>
<span className="wbh-row-text">
<span className="wbh-row-title">{row}</span>
</span>
</li>
))}
</ul>
{problemPunch ? <p className="wbh-punch">{problemPunch}</p> : null}
</div>
<div className="wbh-col wbh-col--win">
<h2 className="wbh-badge">{solutionTitle}</h2>
{solutionImage ? <Sketch src={solutionImage} alt={solutionImageAlt} hand={handImage} /> : null}
<ul className="wbh-rows">
{solutionRows.map((row, index) => {
const meta = [row.name, row.value ? valueTemplate.replace("{value}", row.value) : ""]
.filter(Boolean)
.join(" · ");
return (
<li className={`wbh-row${row.image ? " wbh-row--thumb" : ""}`} key={row.title}>
<span className="wbh-icon wbh-icon--yes" style={order(index)} aria-hidden="true">
<Check strokeWidth={3} />
</span>
{row.image ? (
<img className="wbh-thumb" src={row.image} alt={row.imageAlt ?? ""} width={56} height={56} loading="lazy" decoding="async" />
) : null}
<span className="wbh-row-text">
<span className="wbh-row-title">{row.title}</span>
{meta ? <span className="wbh-row-meta">{meta}</span> : null}
</span>
</li>
);
})}
</ul>
{solutionPunch ? <p className="wbh-punch">{solutionPunch}</p> : null}
</div>
</div>
<div className="wbh-close">
{price ? (
<div className="wbh-price">
<span className="wbh-amount">{price}</span>
{priceNote || priceBreakdown ? (
<span className="wbh-price-copy">
{priceNote ? <span className="wbh-price-note">{priceNote}</span> : null}
{priceBreakdown ? <span className="wbh-price-break">{priceBreakdown}</span> : null}
</span>
) : null}
</div>
) : null}
<div className="wbh-action">
{button}
{handImage ? (
<img className="wbh-hand" src={handImage} alt="" aria-hidden="true" width={320} height={320} decoding="async" />
) : null}
</div>
{reassurance.length ? (
<ul className="wbh-trust">
{reassurance.map((item, index) => {
const Icon = index === 0 ? Download : ShieldCheck;
return (
<li key={item}>
<Icon aria-hidden="true" strokeWidth={2.25} />
<span>{item}</span>
</li>
);
})}
</ul>
) : null}
{secondaryLine ? (
<p className="wbh-more">{secondaryHref ? <a href={secondaryHref}>{secondaryLine}</a> : secondaryLine}</p>
) : null}
</div>
</div>
);
}
export default WhiteboardHero;
const DEFAULT_ROWS: WhiteboardHeroRow[] = [
{ title: "Map your pages.", name: "Funnel Planning Guide", value: "$49" },
{ title: "Write your copy.", name: "Page Copy Workbook", value: "$29" },
{ title: "Check every step.", name: "Launch Checklist", value: "$19" },
];
function Sketch({ src, alt, hand }: { src: string; alt: string; hand?: string }) {
const ink = `url(${JSON.stringify(src)})`;
return (
<div className="wbh-sketch" role="img" aria-label={alt}>
<span className="wbh-ink" style={{ WebkitMaskImage: ink, maskImage: ink }} />
{hand ? (
<span className="wbh-pen" aria-hidden="true">
<img src={hand} alt="" width={240} height={240} decoding="async" />
</span>
) : null}
</div>
);
}
function order(index: number): React.CSSProperties {
return { ["--i" as string]: index } as React.CSSProperties;
}
function splitHeadline(headline: string, phrase?: string): [string, string, string] {
const at = phrase ? headline.indexOf(phrase) : -1;
if (!phrase || at < 0) return [headline, "", ""];
return [headline.slice(0, at), phrase, headline.slice(at + phrase.length)];
}
/*
Theme notes:
- Every colour is a token or an OKLCH recipe on a token; hex appears only as the --marker fallback.
- The hand fade is an alpha mask: --wbh-mask-on (the ink token, fully opaque) and
transparent. A mask reads only alpha, so the token's hue never shows; it just keeps the file free of fixed colours.
- The sketches are drawn through masks in --muted (problem) and --accent (solution), so they follow the theme.
*/
const CSS = `
.cf-whiteboard-hero {
--wbh-shadow: var(--shadow, oklch(0.22 0.03 260));
--wbh-marker: color-mix(in oklch, var(--marker, #fae37c) 62%, transparent);
--wbh-line: oklch(from var(--ink) l c h / 0.12);
--wbh-bg: var(--button-bg, var(--cta));
--wbh-mask-on: oklch(from var(--ink) l c h / 1);
--wbh-mask-off: transparent;
position: relative;
width: 100%;
max-width: 1120px;
margin-inline: auto;
overflow-x: clip;
padding-block: 0.25rem 1.25rem;
color: var(--ink);
font-family: var(--font-body);
text-align: center;
}
.cf-whiteboard-hero *, .cf-whiteboard-hero *::before, .cf-whiteboard-hero *::after { box-sizing: border-box; }
.cf-whiteboard-hero :where(h1, h2, p, ul, li) { margin: 0; padding: 0; }
.cf-whiteboard-hero :where(ul) { list-style: none; }
.cf-whiteboard-hero .wbh-h1 {
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.03em);
font-size: clamp(2.35rem, 1.1rem + 4.4vw, 4.75rem);
line-height: 1.03;
text-wrap: balance;
}
.cf-whiteboard-hero .wbh-hl {
background-image: linear-gradient(var(--wbh-marker), var(--wbh-marker));
background-repeat: no-repeat;
background-size: 100% 0.5em;
background-position: 0 90%;
padding-inline: 0.1em;
margin-inline: -0.04em;
border-radius: 0.2em 0.45em 0.3em 0.5em / 0.35em 0.5em 0.3em 0.45em;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-whiteboard-hero .wbh-lead {
max-width: 60ch;
margin: 1.35rem auto 0;
color: var(--ink);
font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.375rem);
font-weight: 500;
line-height: 1.45;
text-wrap: pretty;
}
.cf-whiteboard-hero .wbh-board {
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
gap: clamp(1.5rem, 3.5vw, 3rem);
align-items: stretch;
margin-top: clamp(2.75rem, 4vw, 3.5rem);
text-align: left;
}
.cf-whiteboard-hero .wbh-col {
--wbh-at: 0.15s;
--wbh-ink: var(--muted);
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
padding: 2.5rem clamp(1.1rem, 2vw, 1.75rem) 1.5rem;
border: 1px solid var(--card-border, color-mix(in oklch, var(--ink) 12%, transparent));
border-radius: var(--card-radius, var(--radius, 16px));
background: var(--card);
box-shadow: var(--card-shadow, var(--shadow-sm, 0 1px 2px oklch(from var(--wbh-shadow) l c h / 0.2)));
}
.cf-whiteboard-hero .wbh-col--win {
--wbh-at: 1.3s;
--wbh-ink: var(--accent);
border: 1.5px solid color-mix(in oklch, var(--accent-fill, var(--accent)) 45%, transparent);
background: color-mix(in oklch, var(--accent-fill, var(--accent)) 6%, var(--card));
box-shadow: var(--shadow-lg, 0 2px 4px oklch(from var(--wbh-shadow) l c h / 0.22), 0 12px 24px -8px oklch(from var(--wbh-shadow) l c h / 0.32));
}
.cf-whiteboard-hero .wbh-badge {
position: absolute;
top: 0;
left: 50%;
width: max-content;
max-width: calc(100% - 2rem);
transform: translate(-50%, -50%);
padding: 0.45rem 1rem;
border: 1px solid oklch(from var(--ink) l c h / 0.1);
border-radius: 999px;
background: var(--secondary);
color: var(--secondary-ink);
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: 0.95rem;
line-height: 1.2;
text-align: center;
text-wrap: balance;
}
.cf-whiteboard-hero .wbh-col--win .wbh-badge {
border-color: oklch(from var(--accent-fill, var(--accent)) calc(l - 0.1) c h);
background: var(--accent-fill, var(--accent));
color: var(--accent-fill-ink, var(--card));
box-shadow: var(--shadow-sm, 0 1px 2px oklch(from var(--wbh-shadow) l c h / 0.22));
}
.cf-whiteboard-hero .wbh-sketch {
position: relative;
height: clamp(130px, 13vw, 176px);
margin: 0.25rem 0 1rem;
}
.cf-whiteboard-hero .wbh-ink {
position: absolute;
inset: 0;
background: var(--wbh-ink);
-webkit-mask-size: contain;
mask-size: contain;
-webkit-mask-repeat: no-repeat;
mask-repeat: no-repeat;
-webkit-mask-position: center;
mask-position: center;
}
.cf-whiteboard-hero .wbh-pen {
position: absolute;
inset: 0;
opacity: 0;
pointer-events: none;
}
.cf-whiteboard-hero .wbh-pen img {
position: absolute;
left: 0;
top: 28%;
width: clamp(84px, 9vw, 116px);
height: auto;
filter: drop-shadow(0 6px 6px oklch(from var(--wbh-shadow) l c h / 0.28));
}
.cf-whiteboard-hero .wbh-rows { display: grid; }
.cf-whiteboard-hero .wbh-row {
display: grid;
grid-template-columns: auto minmax(0, 1fr);
gap: 0.8rem;
align-items: start;
padding-block: 0.75rem;
}
.cf-whiteboard-hero .wbh-row + .wbh-row { border-top: 1px solid var(--wbh-line); }
.cf-whiteboard-hero .wbh-row--thumb { grid-template-columns: auto 56px minmax(0, 1fr); }
.cf-whiteboard-hero .wbh-icon {
display: inline-grid;
place-items: center;
width: 1.75rem;
height: 1.75rem;
margin-top: 0.1rem;
border-radius: 999px;
}
.cf-whiteboard-hero .wbh-icon svg { width: 1rem; height: 1rem; }
.cf-whiteboard-hero .wbh-icon--no { background: var(--danger-soft); color: var(--danger); }
.cf-whiteboard-hero .wbh-icon--yes { background: var(--success-soft); color: var(--success); }
.cf-whiteboard-hero .wbh-thumb {
display: block;
width: 56px;
height: 56px;
object-fit: cover;
object-position: center;
border-radius: calc(var(--radius, 12px) * 0.6);
filter: drop-shadow(0 1px 2px oklch(from var(--wbh-shadow) l c h / 0.25));
}
.cf-whiteboard-hero .wbh-row-text { display: grid; gap: 0.15rem; min-width: 0; }
.cf-whiteboard-hero .wbh-row-title {
display: block;
color: var(--ink);
font-size: 1.0625rem;
font-weight: 700;
line-height: 1.35;
text-wrap: pretty;
}
.cf-whiteboard-hero .wbh-row-meta {
display: block;
color: var(--muted);
font-size: 0.9375rem;
line-height: 1.4;
text-wrap: pretty;
}
.cf-whiteboard-hero .wbh-punch {
margin-top: auto;
padding-top: 1rem;
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
text-transform: var(--display-case, none);
letter-spacing: var(--display-tracking, -0.03em);
font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
line-height: 1.05;
text-align: center;
}
.cf-whiteboard-hero .wbh-col--problem .wbh-punch { color: var(--danger); }
.cf-whiteboard-hero .wbh-col--win .wbh-punch { color: var(--success); }
.cf-whiteboard-hero .wbh-close {
display: flex;
flex-direction: column;
align-items: center;
margin-top: clamp(2.5rem, 4vw, 3.25rem);
}
.cf-whiteboard-hero .wbh-price {
display: inline-flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 0.5rem 0.9rem;
text-align: left;
}
.cf-whiteboard-hero .wbh-amount {
color: var(--ink);
font-family: var(--font-display);
font-weight: var(--display-weight, 800);
font-size: clamp(2.75rem, 2rem + 2.4vw, 3.5rem);
font-variant-numeric: tabular-nums;
letter-spacing: -0.03em;
line-height: 1.1;
}
.cf-whiteboard-hero .wbh-price-copy { display: grid; gap: 0.2rem; }
.cf-whiteboard-hero .wbh-price-note { color: var(--ink); font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.cf-whiteboard-hero .wbh-price-break { color: var(--muted); font-size: 1rem; line-height: 1.35; }
.cf-whiteboard-hero .wbh-action {
position: relative;
isolation: isolate;
display: flex;
justify-content: center;
width: min(100%, 470px);
margin-top: 1.9rem;
}
.cf-whiteboard-hero .wbh-btn {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 100%;
min-height: 4.25rem;
padding: 0.95rem 1.5rem;
border: 1px solid oklch(from var(--wbh-bg) calc(l - 0.14) c h);
border-radius: var(--button-radius, var(--radius, 12px));
background: linear-gradient(oklch(from var(--wbh-bg) calc(l + 0.04) c h), var(--button-bg-2, var(--cta-2)));
box-shadow: var(--button-shadow, inset 0 1px 0 oklch(from var(--wbh-bg) calc(l + 0.14) c h / 0.65), inset 0 -3px 0 oklch(from var(--wbh-bg) calc(l - 0.16) c h), 0 1px 2px oklch(from var(--wbh-shadow) l c h / 0.3), 0 6px 14px -4px oklch(from var(--wbh-shadow) l c h / 0.4));
color: var(--button-ink, var(--cta-ink));
text-shadow: var(--button-text-shadow, none);
font-family: var(--button-font, var(--font-display));
font-weight: var(--button-weight, 800);
text-transform: var(--button-case, none);
font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
letter-spacing: -0.01em;
line-height: 1.15;
text-align: center;
text-decoration: none;
text-wrap: balance;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}
.cf-whiteboard-hero .wbh-btn:not(:disabled):hover,
.cf-whiteboard-hero .wbh-btn.is-hover:not(:disabled) {
background: linear-gradient(oklch(from var(--wbh-bg) calc(l - 0.02) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.05) c h));
transform: translateY(-1px);
}
.cf-whiteboard-hero .wbh-btn:not(:disabled):active,
.cf-whiteboard-hero .wbh-btn.is-active:not(:disabled) {
background: linear-gradient(oklch(from var(--wbh-bg) calc(l - 0.08) c h), oklch(from var(--button-bg-2, var(--cta-2)) calc(l - 0.08) c h));
box-shadow: inset 0 2px 3px oklch(from var(--wbh-bg) calc(l - 0.22) c h / 0.55), 0 1px 1px oklch(from var(--wbh-shadow) l c h / 0.3);
transform: translateY(1px);
}
.cf-whiteboard-hero .wbh-btn:focus-visible {
outline: 3px solid var(--field-focus, var(--accent));
outline-offset: 4px;
}
.cf-whiteboard-hero .wbh-btn:disabled {
border-color: oklch(from var(--ink) l c h / 0.12);
background: var(--button-2-bg, var(--secondary));
box-shadow: none;
color: var(--button-2-ink, var(--secondary-ink));
text-shadow: none;
cursor: not-allowed;
transform: none;
}
.cf-whiteboard-hero .wbh-hand {
position: absolute;
left: calc(100% + 16px);
top: 14%;
width: clamp(120px, 12vw, 160px);
height: auto;
pointer-events: none;
transform: rotate(-4deg);
transform-origin: 20% 80%;
filter: drop-shadow(0 8px 8px oklch(from var(--wbh-shadow) l c h / 0.28));
-webkit-mask-image: linear-gradient(to right, var(--wbh-mask-on) 62%, var(--wbh-mask-off));
mask-image: linear-gradient(to right, var(--wbh-mask-on) 62%, var(--wbh-mask-off));
}
.cf-whiteboard-hero.is-disabled .wbh-hand { opacity: 0.3; animation: none; }
.cf-whiteboard-hero .wbh-trust {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 0.4rem 1.25rem;
margin-top: 1.75rem;
color: var(--ink);
font-size: 0.9375rem;
font-weight: 600;
line-height: 1.4;
}
.cf-whiteboard-hero .wbh-trust li { display: inline-flex; align-items: center; gap: 0.45rem; }
.cf-whiteboard-hero .wbh-trust svg { flex: none; width: 1.05rem; height: 1.05rem; color: var(--success); }
.cf-whiteboard-hero .wbh-more {
margin-top: 0.6rem;
color: var(--muted);
font-size: 1rem;
line-height: 1.45;
text-wrap: pretty;
}
.cf-whiteboard-hero .wbh-more a {
color: var(--link, var(--accent));
text-decoration: underline;
text-decoration-color: oklch(from var(--link, var(--accent)) l c h / 0.45);
text-underline-offset: 0.18em;
}
.cf-whiteboard-hero .wbh-more a:hover {
color: oklch(from var(--link, var(--accent)) calc(l - 0.08) c h);
text-decoration-color: currentColor;
}
.cf-whiteboard-hero .wbh-more a:focus-visible {
outline: 3px solid var(--field-focus, var(--accent));
outline-offset: 3px;
border-radius: 4px;
}
@media (max-width: 860px) {
.cf-whiteboard-hero .wbh-hand { display: none; }
}
@media (max-width: 760px) {
.cf-whiteboard-hero .wbh-board { grid-template-columns: minmax(0, 1fr); gap: 2.75rem; margin-top: 2.5rem; }
.cf-whiteboard-hero .wbh-sketch { height: 132px; }
.cf-whiteboard-hero .wbh-action { width: calc(100% - 3.5rem); }
.cf-whiteboard-hero .wbh-btn { min-height: 4rem; padding-inline: 1.1rem; }
}
@media (prefers-reduced-motion: no-preference) {
.cf-whiteboard-hero .wbh-ink { animation: wbh-wipe 0.8s cubic-bezier(0.45, 0.05, 0.4, 1) both; animation-delay: var(--wbh-at); }
.cf-whiteboard-hero .wbh-pen { animation: wbh-pen 0.9s ease-in-out both; animation-delay: var(--wbh-at); }
.cf-whiteboard-hero .wbh-icon { animation: wbh-pop 0.32s cubic-bezier(0.3, 1.5, 0.5, 1) both; animation-delay: calc(var(--wbh-at) + 0.35s + var(--i, 0) * 0.12s); }
.cf-whiteboard-hero .wbh-punch { animation: wbh-stamp 0.4s cubic-bezier(0.3, 1.4, 0.5, 1) both; animation-delay: calc(var(--wbh-at) + 0.8s); }
.cf-whiteboard-hero .wbh-hl { animation: wbh-marker 0.55s cubic-bezier(0.6, 0, 0.3, 1) 2.2s both; }
.cf-whiteboard-hero .wbh-hand { animation: wbh-hand 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) 2.55s both; }
}
@media (prefers-reduced-motion: reduce) {
.cf-whiteboard-hero .wbh-pen { display: none; }
.cf-whiteboard-hero .wbh-btn { transition: none; }
.cf-whiteboard-hero .wbh-btn:is(:hover, :active, .is-hover, .is-active) { transform: none; }
}
@keyframes wbh-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes wbh-pen {
0% { opacity: 0; transform: translateX(12%); }
12% { opacity: 1; }
85% { opacity: 1; transform: translateX(78%); }
100% { opacity: 0; transform: translateX(84%); }
}
@keyframes wbh-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes wbh-stamp { from { opacity: 0; transform: scale(1.25) rotate(-3deg); } to { opacity: 1; transform: none; } }
@keyframes wbh-marker { from { background-size: 0% 0.5em; } to { background-size: 100% 0.5em; } }
@keyframes wbh-hand {
from { opacity: 0; transform: translate(80px, 60px) rotate(-18deg); }
to { opacity: 1; transform: rotate(-4deg); }
}
`;
pieces/attention/whiteboard-hero/specimen.tsx 40 lines
import __studioImage9cb8bbf2 from "../assets/b426dfa8d78faafb.webp";
import __studioImagece6997a0 from "../assets/b62b4f2009b58182.webp";
import __studioImage4074b989 from "../assets/429c9fb426daedb2.webp";
import { WhiteboardHero, type WhiteboardHeroProps } from "../whiteboard-hero";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled"];
const ROW_TITLES = ["Map your pages.", "Write your copy.", "Check every step."];
// The two sketches and the marker hand are the piece's own line-art masks (painted in theme tokens),
// not brand imagery; the shared slot vocabulary has no matching kind, so they stay designed art.
// Item thumbnails go through the item-n slots.
export default function WhiteboardHeroSpecimen({ state = "default" }: { state?: WhiteboardHeroProps["state"] }) {
const sample = defaults.sample;
return (
<WhiteboardHero
state={state}
headline={sample.headline}
highlight="a clear plan"
lead={sample.lead}
solutionTitle={sample.name}
solutionRows={sample.items.map((item, index) => ({
title: ROW_TITLES[index] ?? item.name,
name: item.name,
value: item.value,
image: slot(`item-${index + 1}`, item.image),
imageAlt: item.imageAlt,
}))}
problemImage={__studioImage9cb8bbf2}
solutionImage={__studioImagece6997a0}
handImage={__studioImage4074b989}
price={sample.price}
priceNote={sample.note}
priceBreakdown="About $1.57 a day for a month"
reassurance={sample.reassurance}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalWhiteboardHero |
string |
|
highlight OptionalWhiteboardHero |
string |
|
lead OptionalWhiteboardHero |
React.ReactNode |
|
boardLabel OptionalWhiteboardHero |
string |
|
problemTitle OptionalWhiteboardHero |
string |
|
problemRows OptionalWhiteboardHero |
string[] |
|
problemPunch OptionalWhiteboardHero |
string |
|
problemImage OptionalWhiteboardHero |
string |
|
problemImageAlt OptionalWhiteboardHero |
string |
|
solutionTitle OptionalWhiteboardHero |
string |
|
solutionRows OptionalWhiteboardHero |
WhiteboardHeroRow[] |
|
solutionPunch OptionalWhiteboardHero |
string |
|
solutionImage OptionalWhiteboardHero |
string |
|
solutionImageAlt OptionalWhiteboardHero |
string |
|
handImage OptionalWhiteboardHero |
string |
|
price OptionalWhiteboardHero |
string |
|
priceNote OptionalWhiteboardHero |
string |
|
priceBreakdown OptionalWhiteboardHero |
string |
|
label OptionalWhiteboardHero |
string |
|
reassurance OptionalWhiteboardHero |
string[] |
|
secondaryLine OptionalWhiteboardHero |
string |
|
secondaryHref OptionalWhiteboardHero |
string |
|
valueTemplate OptionalWhiteboardHero |
string |
|
href OptionalWhiteboardHero |
string |
|
onAction OptionalWhiteboardHero |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalWhiteboardHero |
boolean |
|
state OptionalWhiteboardHero |
"default" | "hover" | "active" | "disabled" |
|
className OptionalWhiteboardHero |
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- 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.
item-*- One image per offer item (item-1, item-2…), shown in stacks and lists.
-
429c9fb426daedb2.webp
image/webp · 99.3 KB
-
b426dfa8d78faafb.webp
image/webp · 124 KB
-
b62b4f2009b58182.webp
image/webp · 70.1 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB