Fanned Samples Hero 1
Fanned-samples hero: a big promise with one marker-swiped phrase, a risk-first button that carries the price,
Use it in a prompt
Use hero/fanned-samples-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/fanned-samples-hero.tsx. - Import it and pass your copy and images (Props tab):
import { FannedSamplesHero } from "@/components/funneldna/hero/fanned-samples-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/fanned-samples-hero/component.tsx 531 lines
// layout: scroll-panels
// Fanned-samples hero: a big promise with one marker-swiped phrase, a risk-first button that carries the price,
// then a fan of finished sample deliverables, so the visitor sees what they will make before reading how.
import React from "react";
import { useMotionValueEvent, useReducedMotion, useScroll, useTransform } from "motion/react";
import { FX_HOST, Glow, Pattern } from "../fx/fx";
export type FanSample = {
/** Image of a finished deliverable (slide, page, worksheet); fills an item slot. Omit it for a typographic slide drawn from the theme. */
image?: string;
alt?: string;
/** Typographic slide: the small line at the top. */
kicker?: string;
/** Typographic slide: a big figure above the title. */
figure?: string;
/** Typographic slide: the slide's headline. */
title?: string;
/** Typographic slide surface: the card colour or the accent fill. */
tone?: "card" | "accent";
};
export type FannedSamplesHeroProps = {
headline?: string; // words before the highlighted phrase
highlight?: string; // one key phrase swiped with the marker
headlineEnd?: string; // optional words after the phrase
lead?: string;
actionLabel?: string; // first line of the button (lead with the risk reversal)
actionSubline?: string; // second line of the button (the price); hidden when empty
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
disabled?: boolean;
samples?: FanSample[]; // 3-6 deliverables, fanned left to right; the middle one sits on top
samplesLabel?: string; // accessible name for the fan
samplesNote?: string; // truthful caption under the fan
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_SAMPLES: FanSample[] = [
{ tone: "card", kicker: "Step 1", title: "Map the offer" },
{ tone: "accent", kicker: "Step 2", title: "Write the page" },
{ tone: "card", kicker: "Step 3", title: "Design the deck" },
{ tone: "accent", kicker: "Step 4", title: "Check every link" },
{ tone: "card", kicker: "Step 5", title: "Send it today" },
];
export function FannedSamplesHero(props: FannedSamplesHeroProps) {
const {
headline = "See exactly what",
highlight = "you'll walk away with",
headlineEnd = "",
lead = "Follow the course step by step and build every page, slide and template you need, ready to send.",
actionLabel = "Show me how to build it",
actionSubline = "",
href,
onAction,
disabled = false,
samples = DEFAULT_SAMPLES,
samplesLabel = "Sample deliverables",
samplesNote = "Illustrative samples of what you'll build.",
state = "default",
className,
} = props;
const titleId = React.useId();
const fanRef = React.useRef<HTMLDivElement>(null);
const reduce = useReducedMotion();
const { scrollYProgress } = useScroll({ target: fanRef, offset: ["start end", "end start"] });
const spread = useTransform(scrollYProgress, [0.3, 0.75], [1, 1.14]);
useMotionValueEvent(spread, "change", (value) => {
if (reduce) return;
fanRef.current?.style.setProperty("--spread", value.toFixed(4));
});
React.useEffect(() => {
if (reduce) fanRef.current?.style.setProperty("--spread", "1");
}, [reduce]);
const isDisabled = disabled || state === "disabled";
const buttonClass = [
"cf-fsh__btn",
state === "hover" ? "is-hover" : "",
state === "active" ? "is-active" : "",
isDisabled ? "is-disabled" : "",
]
.filter(Boolean)
.join(" ");
const buttonInner = (
<>
<span className="cf-fsh__btn-label">{actionLabel}</span>
{actionSubline ? (
<span className="cf-fsh__btn-sub">
{actionSubline.split(" \u00b7 ").map((part, i) => (
<React.Fragment key={i}>
{i > 0 ? " " : null}
<span className="cf-fsh__nowrap">{i > 0 ? `\u00b7 ${part}` : part}</span>
</React.Fragment>
))}
</span>
) : null}
</>
);
const shown = samples.slice(0, 6);
const count = shown.length;
const visible = shown.filter((_, i) => Math.abs(i - (count - 1) / 2) < 2).length;
return (
<section
className={["cf-fsh", className].filter(Boolean).join(" ")}
style={FX_HOST}
aria-labelledby={titleId}
>
<style>{CSS}</style>
<Pattern name="grid" fade="edges" />
<div className="cf-fsh__glow" aria-hidden="true">
<Glow />
</div>
<div className="cf-fsh__copy">
<div className="cf-fsh__col">
<h1 id={titleId} className="cf-fsh__h1 cf-fsh__rise">
{headline}
{highlight ? (
<>
{" "}
<span className="cf-fsh__mark">{highlight}</span>
</>
) : null}
{headlineEnd ? <>{" "}{headlineEnd}</> : null}
</h1>
{lead ? (
<p className="cf-fsh__lead cf-fsh__rise" style={{ "--d": "0.07s" } as React.CSSProperties}>
{lead}
</p>
) : null}
</div>
<div className="cf-fsh__action cf-fsh__rise" style={{ "--d": "0.14s" } as React.CSSProperties}>
{href && !isDisabled ? (
<a className={buttonClass} href={href} onClick={onAction}>
{buttonInner}
</a>
) : (
<button type="button" className={buttonClass} disabled={isDisabled} onClick={onAction}>
{buttonInner}
</button>
)}
</div>
</div>
{count > 0 ? (
<div
className="cf-fsh__fan"
ref={fanRef}
style={{ "--n": count, "--nv": visible } as React.CSSProperties}
>
<ul className="cf-fsh__list" aria-label={samplesLabel}>
{shown.map((sample, i) => {
const o = i - (count - 1) / 2;
const far = Math.abs(o) >= 2;
const style = {
"--o": o,
"--o2": o * o,
"--z": 20 - Math.round(Math.abs(o) * 2),
"--s": Math.max(0.94, 1.08 - Math.abs(o) * 0.06).toFixed(3),
"--d": `${Math.min(Math.abs(o) * 0.07, 0.28).toFixed(2)}s`,
} as React.CSSProperties;
return (
<li key={i} className={far ? "cf-fsh__card is-far" : "cf-fsh__card"} style={style}>
<div className="cf-fsh__pop">
<div className="cf-fsh__lift">
<div className="cf-fsh__frame">
{sample.image ? (
<img
className="cf-fsh__img"
src={sample.image}
alt={sample.alt ?? ""}
loading="eager"
decoding="async"
draggable={false}
/>
) : (
<SampleSlide sample={sample} right={o > 0} />
)}
</div>
</div>
</div>
</li>
);
})}
</ul>
</div>
) : null}
{samplesNote ? (
<p className="cf-fsh__note cf-fsh__rise" style={{ "--d": "0.21s" } as React.CSSProperties}>
{samplesNote}
</p>
) : null}
</section>
);
}
export default FannedSamplesHero;
function SampleSlide({ sample, right }: { sample: FanSample; right?: boolean }) {
const cls = ["cf-fsh__slide", sample.tone === "accent" ? "is-accent" : "", right ? "is-right" : ""]
.filter(Boolean)
.join(" ");
return (
<div className={cls}>
{sample.kicker ? <span className="cf-fsh__slide-kicker">{sample.kicker}</span> : null}
{sample.figure ? <span className="cf-fsh__slide-figure">{sample.figure}</span> : null}
{sample.title ? <span className="cf-fsh__slide-title">{sample.title}</span> : null}
</div>
);
}
const CSS = `
.cf-fsh, .cf-fsh * { box-sizing: border-box; }
.cf-fsh {
position: relative;
isolation: isolate;
overflow: hidden;
container-type: inline-size;
background: var(--band, oklch(0.27 0.067 256));
color: var(--band-ink, oklch(1 0 0));
font-family: var(--font-body, system-ui, sans-serif);
padding: clamp(56px, 8vw, 112px) 0 clamp(64px, 8.5vw, 120px);
}
/* The light pool sits behind the fan. Its layer is masked so it fades in from nothing at its top edge:
no visible line where the glow box begins, under any theme. The mask uses alpha only (black = opaque). */
.cf-fsh__glow {
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 78%;
pointer-events: none;
z-index: 0;
-webkit-mask-image: linear-gradient(to bottom, transparent 0%, color-mix(in oklch, black 35%, transparent) 22%, color-mix(in oklch, black 80%, transparent) 42%, black 60%);
mask-image: linear-gradient(to bottom, transparent 0%, color-mix(in oklch, black 35%, transparent) 22%, color-mix(in oklch, black 80%, transparent) 42%, black 60%);
}
.cf-fsh__copy {
position: relative;
z-index: 1;
width: 100%;
max-width: 1120px;
margin: 0 auto;
padding: 0 clamp(16px, 5vw, 48px);
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.cf-fsh__col {
width: 100%;
max-width: 62rem;
display: flex;
flex-direction: column;
align-items: center;
}
.cf-fsh__h1 {
margin: 0;
font-family: var(--font-display, inherit);
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: var(--band-ink, oklch(1 0 0));
}
.cf-fsh__mark {
/* Always a light highlighter stroke, whatever lightness the theme's marker has, so dark ink stays readable. */
--cf-fsh-m: oklch(from var(--marker, #fae37c) 0.9 c h);
color: oklch(from var(--shadow, oklch(0.22 0.03 260)) 0.2 c h);
background-image: linear-gradient(to bottom, transparent 14%, var(--cf-fsh-m) 14%, var(--cf-fsh-m) 93%, transparent 93%);
padding: 0 0.12em 0 0.08em;
border-radius: 0.14em 0.36em 0.28em 0.1em;
-webkit-box-decoration-break: clone;
box-decoration-break: clone;
}
.cf-fsh__lead {
margin: clamp(16px, 1.8vw, 24px) 0 0;
max-width: 44rem;
font-size: clamp(1.125rem, 1.5vw, 1.375rem);
line-height: 1.4;
font-weight: 500;
text-wrap: pretty;
color: var(--band-ink, oklch(1 0 0));
}
.cf-fsh__action {
margin-top: 32px;
width: 100%;
display: flex;
justify-content: center;
}
.cf-fsh__btn {
--cf-fsh-bg: var(--button-bg, var(--cta, oklch(0.58 0.21 29)));
--cf-fsh-bg2: var(--button-bg-2, var(--cta-2, oklch(0.51 0.2 29)));
--cf-fsh-sh: var(--shadow, oklch(0.22 0.03 260));
appearance: none;
border: 0;
cursor: pointer;
text-decoration: none;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
min-height: 72px;
min-width: min(100%, 24rem);
max-width: 100%;
padding: 12px 28px;
border-radius: var(--button-radius, var(--radius, 12px));
background-color: var(--cf-fsh-bg);
background-image: linear-gradient(oklch(from var(--cf-fsh-bg) calc(l + 0.04) c h), oklch(from var(--cf-fsh-bg2) calc(l - 0.02) c h));
color: var(--button-ink, var(--cta-ink, oklch(1 0 0)));
font-family: var(--button-font, var(--font-display, inherit));
text-transform: var(--button-case, none);
text-align: center;
text-shadow: var(--button-text-shadow, none);
box-shadow: var(--button-shadow,
inset 0 1px 0 oklch(from var(--cf-fsh-bg) calc(l + 0.14) c h / 0.7),
inset 0 -3px 0 oklch(from var(--cf-fsh-bg) calc(l - 0.16) c h),
0 1px 2px oklch(from var(--cf-fsh-sh) l c h / 0.45),
0 8px 16px -6px oklch(from var(--cf-fsh-sh) l c h / 0.6));
transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.cf-fsh__btn-label {
font-size: clamp(1.125rem, 1.55vw, 1.375rem);
line-height: 1.15;
font-weight: var(--button-weight, 800);
text-wrap: balance;
}
.cf-fsh__btn-sub {
font-family: var(--font-body, inherit);
font-size: 0.9375rem;
line-height: 1.3;
font-weight: 600;
text-transform: none;
text-wrap: balance;
}
.cf-fsh__nowrap { white-space: nowrap; }
.cf-fsh__btn:hover,
.cf-fsh__btn.is-hover {
background-image: linear-gradient(oklch(from var(--cf-fsh-bg) calc(l - 0.01) c h), oklch(from var(--cf-fsh-bg2) calc(l - 0.07) c h));
box-shadow:
inset 0 1px 0 oklch(from var(--cf-fsh-bg) calc(l + 0.1) c h / 0.7),
inset 0 -3px 0 oklch(from var(--cf-fsh-bg) calc(l - 0.2) c h),
0 1px 2px oklch(from var(--cf-fsh-sh) l c h / 0.5),
0 10px 18px -6px oklch(from var(--cf-fsh-sh) l c h / 0.7);
}
.cf-fsh__btn:active,
.cf-fsh__btn.is-active {
transform: translateY(1px);
background-image: linear-gradient(oklch(from var(--cf-fsh-bg) calc(l - 0.06) c h), oklch(from var(--cf-fsh-bg2) calc(l - 0.08) c h));
box-shadow:
inset 0 2px 4px oklch(from var(--cf-fsh-bg) calc(l - 0.24) c h / 0.55),
inset 0 -2px 0 oklch(from var(--cf-fsh-bg) calc(l - 0.18) c h),
0 1px 1px oklch(from var(--cf-fsh-sh) l c h / 0.45);
}
.cf-fsh__btn:focus-visible {
outline: 3px solid var(--band-ink, oklch(1 0 0));
outline-offset: 4px;
}
.cf-fsh .cf-fsh__btn:disabled,
.cf-fsh .cf-fsh__btn.is-disabled {
cursor: not-allowed;
transform: none;
background-image: none;
background-color: var(--button-2-bg, var(--secondary, oklch(0.93 0.015 263)));
color: var(--button-2-ink, var(--secondary-ink, oklch(0.21 0.034 263)));
text-shadow: none;
box-shadow: var(--button-2-shadow, var(--shadow-sm));
}
/* The fan sizes its cards so every card (at full scroll spread, tilted, scaled) stays inside the band. */
.cf-fsh__fan {
--gut: clamp(16px, 5cqi, 48px);
--k: 0.6;
--wmax: clamp(220px, 28cqi, 400px);
--nn: var(--n, 5);
--w: min(var(--wmax), calc((100cqi - 2 * var(--gut)) / (1.14 + (var(--nn) - 1) * var(--k) * 1.14)));
--step: calc(var(--w) * var(--k));
--tilt: 3.5deg;
--arc: 10px;
--spread: 1;
position: relative;
z-index: 1;
height: calc(var(--w) * 0.74 + var(--arc) * 4.6 + 32px);
margin-top: clamp(40px, 5vw, 64px);
}
.cf-fsh__list {
list-style: none;
margin: 0;
padding: 0;
position: absolute;
inset: 0;
}
.cf-fsh__card {
position: absolute;
top: 24px;
left: 50%;
width: var(--w);
margin-left: calc(var(--w) * -0.5);
z-index: var(--z);
transform:
translateX(calc(var(--o) * var(--step) * var(--spread)))
translateY(calc(var(--o2) * var(--arc) * var(--spread)))
rotate(calc(var(--o) * var(--tilt) * var(--spread)))
scale(var(--s, 1));
}
.cf-fsh__lift {
transition: transform .16s ease;
filter:
drop-shadow(0 2px 3px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.4))
drop-shadow(0 14px 16px oklch(from var(--shadow, oklch(0.22 0.03 260)) l c h / 0.45));
}
.cf-fsh__frame {
position: relative;
aspect-ratio: 16 / 10;
border-radius: 12px;
overflow: hidden;
background: var(--card, oklch(1 0 0));
container-type: inline-size;
}
.cf-fsh__img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
.cf-fsh__slide {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
padding: 8cqi 8cqi 7cqi;
text-align: left;
background: var(--card, oklch(1 0 0));
color: var(--ink, oklch(0.21 0.034 263));
font-family: var(--font-display, inherit);
}
.cf-fsh__slide.is-right {
text-align: right;
align-items: flex-end;
}
.cf-fsh__slide.is-accent {
background: var(--accent-fill, var(--accent, oklch(0.5 0.17 257)));
color: var(--accent-fill-ink, var(--card, oklch(1 0 0)));
}
.cf-fsh__slide-kicker {
font-family: var(--font-body, inherit);
font-size: clamp(14px, 4.4cqi, 17px);
line-height: 1.2;
font-weight: 700;
}
.cf-fsh__slide-figure {
margin-top: auto;
font-size: clamp(40px, 20cqi, 110px);
line-height: 0.95;
font-weight: var(--display-weight, 800);
letter-spacing: -0.03em;
font-variant-numeric: tabular-nums;
color: var(--accent, oklch(0.5 0.17 257));
}
.cf-fsh__slide.is-accent .cf-fsh__slide-figure { color: inherit; }
.cf-fsh__slide-title {
margin-top: auto;
max-width: 64%;
font-size: clamp(18px, 8cqi, 38px);
line-height: 1.06;
font-weight: var(--display-weight, 800);
letter-spacing: var(--display-tracking, -0.025em);
text-wrap: balance;
}
.cf-fsh__slide-figure + .cf-fsh__slide-title { margin-top: 2cqi; }
.cf-fsh__note {
position: relative;
z-index: 1;
max-width: 46rem;
margin: 16px auto 0;
padding: 0 clamp(16px, 5vw, 48px);
text-align: center;
font-size: 0.9375rem;
line-height: 1.4;
font-weight: 500;
text-wrap: pretty;
color: var(--band-ink, oklch(1 0 0));
}
@keyframes cf-fsh-rise {
from { opacity: .82; transform: translateY(8px); }
}
.cf-fsh__rise,
.cf-fsh__pop {
animation: cf-fsh-rise .45s cubic-bezier(.2, .7, .2, 1) both;
animation-delay: var(--d, 0s);
}
@media (hover: hover) and (pointer: fine) {
.cf-fsh__card:hover { z-index: 40; }
.cf-fsh__card:hover .cf-fsh__lift { transform: translateY(-8px); }
}
@media (max-width: 640px) {
.cf-fsh__glow { height: 64%; }
.cf-fsh__fan {
--k: 0.2;
--wmax: min(78cqi, 300px);
--nn: var(--nv, 3);
--tilt: 2.5deg;
--arc: 6px;
}
.cf-fsh__card.is-far { display: none; }
.cf-fsh__slide-title { max-width: 80%; }
.cf-fsh__btn { width: 100%; min-width: 0; max-width: 26rem; padding: 14px 20px; }
}
@media (prefers-reduced-motion: reduce) {
.cf-fsh__rise,
.cf-fsh__pop { animation: none; }
.cf-fsh__lift,
.cf-fsh__btn { transition: none; }
.cf-fsh__card:hover .cf-fsh__lift { transform: none; }
.cf-fsh__fan { --spread: 1 !important; }
}
`;
pieces/hero/fanned-samples-hero/specimen.tsx 51 lines
import __studioImage1c606cb4 from "../assets/00d7482e06c784af.webp";
import __studioImage8943e4da from "../assets/f0e90348b1342bf9.webp";
import __studioImage77db8c9e from "../assets/1fa5b80347216b46.webp";
import React from "react";
import { FannedSamplesHero, type FannedSamplesHeroProps } from "../fanned-samples-hero";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled"];
export default function FannedSamplesHeroSpecimen({ state }: { state?: FannedSamplesHeroProps["state"] }) {
const { price, guarantee } = defaults.sample;
return (
<FannedSamplesHero
state={state}
headline="Win the job"
highlight="before the call ends"
lead="Build the cover, scope and pricing deck your client wants to see, in one sitting. Deckhand Academy shows you every page, step by step."
actionLabel="Try it for 30 days, risk free"
actionSubline={`One payment of ${price} \u00b7 ${guarantee}`}
href="#enroll"
samplesLabel="Sample proposal pages from Deckhand Academy"
samplesNote="Illustrative samples of the proposal pages you'll build in Deckhand Academy."
samples={[
{ tone: "accent", kicker: "Harbor & Pine Dental", figure: "3", title: "ways to start this month" },
{
image: slot(
"item-1",
__studioImage1c606cb4
),
alt: "Sample proposal slide with a four-phase project timeline",
},
{
image: slot(
"item-2",
__studioImage8943e4da
),
alt: "Sample proposal cover slide with a bright clinic photo",
},
{
image: slot(
"item-3",
__studioImage77db8c9e
),
alt: "Sample before-and-after website comparison slide",
},
{ tone: "card", kicker: "Your next step", title: "Sign today, launch in six weeks" },
]}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalFannedSamplesHero |
string |
|
highlight OptionalFannedSamplesHero |
string |
|
headlineEnd OptionalFannedSamplesHero |
string |
|
lead OptionalFannedSamplesHero |
string |
|
actionLabel OptionalFannedSamplesHero |
string |
|
actionSubline OptionalFannedSamplesHero |
string |
|
href OptionalFannedSamplesHero |
string |
|
onAction OptionalFannedSamplesHero |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalFannedSamplesHero |
boolean |
|
samples OptionalFannedSamplesHero |
FanSample[] |
|
samplesLabel OptionalFannedSamplesHero |
string |
|
samplesNote OptionalFannedSamplesHero |
string |
|
state OptionalFannedSamplesHero |
"default" | "hover" | "active" | "disabled" |
|
className OptionalFannedSamplesHero |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--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.
-
00d7482e06c784af.webp
image/webp · 22.9 KB
-
1fa5b80347216b46.webp
image/webp · 33.7 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB
-
f0e90348b1342bf9.webp
image/webp · 71.3 KB