Funnel Diagram 1
Teaches the funnel as a path of pages that ends at the offer's cart button.
Use it in a prompt
Use content/funnel-diagram 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/content/funnel-diagram.tsx. - Import it and pass your copy and images (Props tab):
import { FunnelDiagram } from "@/components/funneldna/content/funnel-diagram"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/funnel-diagram/component.tsx 398 lines
// Teaches the funnel as a path of pages that ends at the offer's cart button.
// layout: path-to-action
// Funnel map for teaching pages: five page thumbnails on one lit path that turns down into the offer, so the lesson ends on the cart button.
import * as React from "react";
import { ArrowDown, ArrowRight, Check, Lock, ShoppingCart } from "lucide-react";
export type FunnelPageKind = "optin" | "sales" | "bump" | "upsell" | "thankyou";
export type FunnelDiagramStep = {
/** Stop name above the thumbnail, e.g. "Opt-in" */
label: string;
/** The one line under the thumbnail */
line: string;
/** Which page this stop stands for */
kind: FunnelPageKind;
/** Header bar of the page thumbnail */
title?: string;
headline?: string;
fieldLabel?: string;
/** Example text shown inside the thumbnail's email field */
placeholder?: string;
/** Grey offer chip (sales page) */
chip?: string;
/** Summary rows (order page) */
rows?: string[];
/** Order bump box text */
extra?: string;
button?: string;
/** Quiet link under the button (decline or download) */
link?: string;
};
export type FunnelDiagramItem = { name: string; image?: string; imageAlt?: string };
export type FunnelDiagramProps = {
headline?: string;
/** Phrase inside the headline that gets the marker stroke */
highlight?: string;
subheadline?: string;
steps?: FunnelDiagramStep[];
/** Accessible name of the map list */
mapLabel?: string;
greeting?: string;
/** Short letter paragraphs before the action */
letter?: string[];
signOff?: string;
signName?: string;
offerHeadline?: string;
productName?: string;
note?: string;
/** Up to three item photos (slots item-1 … item-3) fanned beside the product name */
items?: FunnelDiagramItem[];
price?: string;
priceLabel?: string;
vsLabel?: string;
/** The supplied alternative the price is compared with */
alternativePrice?: string;
alternativeLabel?: string;
actionLabel?: string;
reassurance?: string;
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
disabled?: boolean;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
const DEFAULT_STEPS: FunnelDiagramStep[] = [
{ kind: "optin", label: "Opt-in", line: "Capture the lead.", title: "Free workshop", headline: "Map out your first funnel", fieldLabel: "Email address", placeholder: "you@example.com", button: "Save my seat" },
{ kind: "sales", label: "Sales", line: "Present the core offer.", title: "The Funnel Starter Kit", headline: "Build with a clear plan", chip: "Complete kit · $47", button: "Get the kit" },
{ kind: "bump", label: "Order bump", line: "Offer a checkout extra.", title: "Your order", rows: ["Your items", "Subtotal", "Total"], extra: "Add an optional extra", button: "Continue" },
{ kind: "upsell", label: "Upsell", line: "Offer the next upgrade.", title: "Your next step", headline: "Explore an optional upgrade", button: "View upgrade", link: "No thanks" },
{ kind: "thankyou", label: "Thank-you", line: "Deliver the purchase.", title: "Thank you", headline: "Your kit is ready to download.", link: "Download your kit" },
];
const DEFAULT_LETTER = [
"Look at the map above. Five pages, and each one has a single job: move your visitor one step closer to yes.",
"The Funnel Starter Kit walks you through every stop. Plan your funnel, write your page copy, and check every step before you launch.",
];
export function FunnelDiagram(props: FunnelDiagramProps) {
const {
headline = "Map your funnel from start to finish",
highlight = "start to finish",
subheadline = "One clear next step on every page.",
steps = DEFAULT_STEPS,
mapLabel = "Your funnel, page by page",
greeting = "Dear friend,",
letter = DEFAULT_LETTER,
signOff = "To your first launch,",
signName = "The Funnel Starter Kit team",
offerHeadline = "Plan every stop with one kit",
productName = "The Funnel Starter Kit",
note = "One payment · Lifetime access",
items = [],
price = "$47",
priceLabel = "today, for the whole kit",
vsLabel = "vs.",
alternativePrice = "$97",
alternativeLabel = "the guide, workbook and checklist valued one by one",
actionLabel = "Add To Cart",
reassurance = "",
href,
onAction,
disabled = false,
state = "default",
className,
} = props;
const [hot, setHot] = React.useState<number | null>(null);
const n = steps.length;
const reach = hot ?? n - 1;
const off = disabled || state === "disabled";
const force = state === "hover" || state === "active" ? state : undefined;
const shown = items.filter((item) => item.image).slice(0, 3);
const inner = (
<>
<ShoppingCart className="fd-btn-icon" aria-hidden="true" strokeWidth={2.4} />
<span>{actionLabel}</span>
<span className="fd-btn-rule" aria-hidden="true" />
<span className="fd-btn-price">{price}</span>
</>
);
const action =
href && !off ? (
<a className="fd-btn" href={href} onClick={onAction} data-force={force}>
{inner}
</a>
) : (
<button type="button" className="fd-btn" disabled={off} onClick={onAction} data-force={force}>
{inner}
</button>
);
return (
<div className={["cf-funnel-diagram", className].filter(Boolean).join(" ")} style={{ "--n": n } as React.CSSProperties}>
<style>{CSS}</style>
<div className="fd-head">
<h2 className="fd-title">
<Marked text={headline} phrase={highlight} />
</h2>
{subheadline ? <p className="fd-sub">{subheadline}</p> : null}
</div>
<ol className="fd-map" aria-label={mapLabel}>
{steps.map((step, i) => {
const last = i === n - 1;
const on = last ? reach === n - 1 : i < reach;
return (
<li
key={`${step.kind}-${i}`}
className={`fd-stop${i <= reach ? " is-lit" : ""}${hot === i ? " is-hot" : ""}`}
style={{ "--i": i } as React.CSSProperties}
onMouseEnter={() => setHot(i)}
onMouseLeave={() => setHot(null)}
>
<span className="fd-dot" aria-hidden="true">
{String(i + 1).padStart(2, "0")}
</span>
<span className={`fd-seg${last ? " is-tail" : ""}`} aria-hidden="true">
<span className={`fd-seg-fill${on ? " is-on" : ""}`} />
{last ? null : <ArrowRight className="fd-seg-arrow" strokeWidth={2.75} />}
</span>
<h3 className="fd-stop-label">{step.label}</h3>
<PageThumb step={step} />
<p className="fd-stop-line">{step.line}</p>
</li>
);
})}
</ol>
<div className={`fd-drop${reach === n - 1 ? " is-on" : ""}`} aria-hidden="true">
<span className="fd-drop-cell">
<span className="fd-drop-line" />
<ArrowDown className="fd-drop-arrow" strokeWidth={2.75} />
</span>
</div>
<div className="fd-offer">
<div className="fd-letter">
<p className="fd-greet">{greeting}</p>
{letter.map((para, i) => (
<p key={i} className="fd-letter-p">
{para}
</p>
))}
<p className="fd-sign">
<span>{signOff}</span>
<strong>{signName}</strong>
</p>
</div>
<div className="fd-buy">
<h3 className="fd-buy-h">{offerHeadline}</h3>
<div className="fd-product">
{shown.length ? (
<span className="fd-fan">
{shown.map((item, i) => (
<img key={i} src={item.image} alt={item.imageAlt ?? item.name} width={112} height={112} loading="lazy" decoding="async" />
))}
</span>
) : null}
<span className="fd-product-text">
<span className="fd-product-name">{productName}</span>
{note ? <span className="fd-product-note">{note}</span> : null}
</span>
</div>
<div className="fd-compare">
<p className="fd-cell fd-today">
<span className="fd-price">{price}</span>
<span className="fd-cell-label">{priceLabel}</span>
</p>
<span className="fd-vs">{vsLabel}</span>
<p className="fd-cell fd-alt">
<span className="fd-alt-price">{alternativePrice}</span>
<span className="fd-cell-label">{alternativeLabel}</span>
</p>
</div>
{action}
{reassurance ? (
<p className="fd-assure">
<Lock aria-hidden="true" strokeWidth={2.4} />
{reassurance}
</p>
) : null}
</div>
</div>
</div>
);
}
export default FunnelDiagram;
function Marked({ text, phrase }: { text: string; phrase?: string }) {
const at = phrase ? text.indexOf(phrase) : -1;
if (!phrase || at < 0) return <>{text}</>;
return (
<>
{text.slice(0, at)}
<span className="fd-mark">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
function PageThumb({ step }: { step: FunnelDiagramStep }) {
const hasFoot = Boolean(step.button || step.link);
return (
<div className="fd-page" aria-hidden="true">
{step.title ? <div className="fd-page-bar">{step.title}</div> : null}
<div className="fd-page-body">
{step.kind === "thankyou" ? <Check className="fd-page-check" strokeWidth={3} /> : null}
{step.headline ? <p className="fd-page-h">{step.headline}</p> : null}
{step.fieldLabel || step.placeholder ? (
<div>
{step.fieldLabel ? <span className="fd-page-label">{step.fieldLabel}</span> : null}
{step.placeholder ? <span className="fd-page-field">{step.placeholder}</span> : null}
</div>
) : null}
{step.chip ? <p className="fd-page-chip">{step.chip}</p> : null}
{step.rows && step.rows.length ? (
<div className="fd-page-rows">
{step.rows.map((row, i) => (
<div className="fd-page-row" key={`${row}-${i}`}>
<span>{row}</span>
<span className="fd-skel" />
</div>
))}
</div>
) : null}
{step.extra ? (
<div className="fd-page-bump">
<span className="fd-page-box" />
<span>{step.extra}</span>
</div>
) : null}
{hasFoot ? (
<div className="fd-page-foot">
{step.button ? <span className="fd-page-btn">{step.button}</span> : null}
{step.link ? <span className="fd-page-link">{step.link}</span> : null}
</div>
) : null}
</div>
</div>
);
}
const CSS = `
.cf-funnel-diagram{--fd-gap:2.5rem;--fd-dot:3rem;--fd-pad:clamp(1.25rem,3.4cqi,2.5rem);--fd-cols:clamp(1.5rem,4cqi,3.5rem);--fd-ac:var(--accent,oklch(0.5 0.17 257));--fd-ac-fill:var(--accent-fill,var(--fd-ac));--fd-ink:var(--ink,oklch(0.21 0.034 263));--fd-muted:var(--muted,oklch(0.45 0.03 258));--fd-card:var(--card,oklch(1 0 0));--fd-surface:var(--surface,oklch(1 0 0));--fd-line:color-mix(in oklch,var(--ink,oklch(0.21 0.034 263)) 14%,transparent);--fd-well:color-mix(in oklch,var(--ink,oklch(0.21 0.034 263)) 5%,var(--card,oklch(1 0 0)));--fd-sh:var(--shadow,oklch(0.22 0.03 256));--fd-rad:var(--card-radius,var(--radius,14px));container:fd/inline-size;width:100%;color:var(--fd-ink);font-family:var(--font-body,system-ui,sans-serif)}
.cf-funnel-diagram,.cf-funnel-diagram *{box-sizing:border-box}
.cf-funnel-diagram :is(h2,h3,p,ol){margin:0}
.cf-funnel-diagram .fd-head{margin-bottom:clamp(2.25rem,4.5cqi,3.5rem);text-align:center}
.cf-funnel-diagram .fd-title{font-family:var(--font-display,inherit);font-size:clamp(2.1rem,5.2cqi,3.9rem);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.03em);line-height:1.04;text-transform:var(--display-case,none);text-wrap:balance;color:var(--fd-ink)}
.cf-funnel-diagram .fd-mark{padding:0 .1em;border-radius:.14em .32em .2em .28em;background:linear-gradient(180deg,transparent 50%,color-mix(in oklch,var(--marker,#fae37c) 80%,var(--fd-surface)) 50%,color-mix(in oklch,var(--marker,#fae37c) 80%,var(--fd-surface)) 93%,transparent 93%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-funnel-diagram .fd-sub{margin-top:clamp(.9rem,1.4cqi,1.25rem);font-size:clamp(1.125rem,2.1cqi,1.4rem);font-weight:500;line-height:1.4;text-wrap:pretty;color:var(--fd-muted)}
.cf-funnel-diagram .fd-map{display:grid;grid-template-columns:repeat(var(--n,5),minmax(0,1fr));grid-template-rows:auto auto 1fr auto;column-gap:var(--fd-gap);padding:0;list-style:none}
.cf-funnel-diagram .fd-stop{position:relative;display:grid;grid-row:span 4;grid-template-rows:auto auto 1fr auto;grid-template-rows:subgrid;grid-template-areas:'dot' 'label' 'page' 'line';justify-items:center;min-width:0}
.cf-funnel-diagram .fd-dot{grid-area:dot;position:relative;z-index:2;display:grid;place-items:center;width:var(--fd-dot);height:var(--fd-dot);border:2px solid var(--fd-line);border-radius:50%;outline:3px solid transparent;outline-offset:3px;background:var(--fd-card);color:var(--fd-muted);font-family:var(--font-display,inherit);font-size:1rem;font-weight:800;font-variant-numeric:tabular-nums;transition:background-color .25s ease,color .25s ease,border-color .25s ease,outline-color .25s ease;animation:cf-fd-pop .4s cubic-bezier(.2,.8,.2,1.2) backwards;animation-delay:calc(var(--i,0) * .3s)}
.cf-funnel-diagram .is-lit .fd-dot{border-color:var(--fd-ac-fill);background:var(--fd-ac-fill);color:var(--accent-fill-ink,var(--fd-card));box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 256 / .25))}
.cf-funnel-diagram .is-hot .fd-dot{outline-color:oklch(from var(--fd-ac) l c h / .3)}
.cf-funnel-diagram .fd-seg{position:absolute;z-index:1;top:calc(var(--fd-dot) / 2 - 1.5px);left:50%;width:calc(100% + var(--fd-gap));height:3px;border-radius:3px;background:var(--fd-line)}
.cf-funnel-diagram .fd-seg.is-tail{display:none}
.cf-funnel-diagram .fd-seg-fill{position:absolute;inset:0;border-radius:inherit;background:var(--fd-ac-fill);transform-origin:left center;scale:0 1;transition:scale .35s ease;animation:cf-fd-draw .45s cubic-bezier(.2,.7,.2,1) backwards;animation-delay:calc(.2s + var(--i,0) * .3s)}
.cf-funnel-diagram .fd-seg-fill.is-on{scale:1 1}
.cf-funnel-diagram .fd-seg-arrow{position:absolute;top:50%;left:50%;box-sizing:content-box;width:1.3rem;height:1.3rem;padding:.2rem;border-radius:50%;background:var(--fd-surface);color:color-mix(in oklch,var(--fd-ink) 40%,var(--fd-surface));translate:-50% -50%;transition:color .3s ease}
.cf-funnel-diagram .fd-seg-fill.is-on + .fd-seg-arrow{color:var(--fd-ac)}
.cf-funnel-diagram .fd-stop-label{grid-area:label;margin:1rem 0 .9rem;font-family:var(--font-display,inherit);font-size:clamp(1.1rem,1.9cqi,1.35rem);font-weight:var(--display-weight,800);line-height:1.15;text-align:center;text-wrap:balance;color:var(--fd-ink)}
.cf-funnel-diagram .fd-stop-line{grid-area:line;margin-top:1rem;font-size:1rem;font-weight:500;line-height:1.4;text-align:center;text-wrap:pretty;color:var(--fd-muted)}
.cf-funnel-diagram .fd-page{grid-area:page;display:flex;flex-direction:column;width:100%;min-height:15.5rem;overflow:hidden;border:1px solid var(--card-border,var(--fd-line));border-radius:var(--fd-rad);background:var(--fd-card);box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(0.22 0.03 256 / .22),0 4px 10px -2px oklch(0.22 0.03 256 / .2)));transition:transform .25s ease,box-shadow .25s ease;animation:cf-fd-rise .45s ease-out backwards;animation-delay:min(calc(var(--i,0) * .07s),.28s)}
.cf-funnel-diagram .is-hot .fd-page{transform:translateY(-4px);box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 256 / .22),0 12px 24px -8px oklch(0.22 0.03 256 / .32))}
.cf-funnel-diagram .fd-page-bar{display:grid;place-items:center;min-height:3.1rem;padding:.65rem .75rem;background:linear-gradient(180deg,oklch(from var(--band,oklch(0.27 0.067 256)) calc(l + 0.04) c h),var(--band,oklch(0.27 0.067 256)));color:var(--band-ink,oklch(1 0 0));font-family:var(--font-display,inherit);font-size:.9375rem;font-weight:800;line-height:1.2;text-align:center;text-wrap:balance}
.cf-funnel-diagram .fd-page-body{display:flex;flex:1;flex-direction:column;gap:.7rem;padding:1rem .85rem;text-align:center}
.cf-funnel-diagram .fd-page-h{font-family:var(--font-display,inherit);font-size:1.125rem;font-weight:var(--display-weight,800);letter-spacing:-.01em;line-height:1.12;text-wrap:balance;color:var(--fd-ink)}
.cf-funnel-diagram .fd-page-check{flex:none;align-self:center;width:2.25rem;height:2.25rem;color:var(--success,oklch(0.5 0.138 150))}
.cf-funnel-diagram .fd-page-label{display:block;margin-bottom:.3rem;font-size:.875rem;font-weight:700;text-align:left;color:var(--fd-ink)}
.cf-funnel-diagram .fd-page-field{display:block;overflow:hidden;padding:.5rem .75rem;border:1px solid var(--field-border,color-mix(in oklch,var(--fd-ink) 22%,transparent));border-radius:var(--field-radius,var(--radius,10px));background:var(--field,oklch(1 0 0));color:color-mix(in oklch,var(--field-ink,oklch(0.21 0.034 263)) 65%,var(--field,oklch(1 0 0)));font-size:.875rem;text-align:left;text-overflow:ellipsis;white-space:nowrap}
.cf-funnel-diagram .fd-page-chip{padding:.55rem .75rem;border-radius:calc(var(--fd-rad) * .7);background:var(--fd-well);font-size:.875rem;font-weight:700;line-height:1.25;color:var(--fd-ink)}
.cf-funnel-diagram .fd-page-rows{display:grid;overflow:hidden;border-radius:calc(var(--fd-rad) * .7);background:var(--fd-well)}
.cf-funnel-diagram .fd-page-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.45rem .75rem;font-size:.875rem;font-weight:500;color:var(--fd-ink)}
.cf-funnel-diagram .fd-page-row + .fd-page-row{border-top:1px solid var(--fd-line)}
.cf-funnel-diagram .fd-skel{flex:none;width:1.75rem;height:.4rem;border-radius:1rem;background:color-mix(in oklch,var(--fd-ink) 16%,var(--fd-card))}
.cf-funnel-diagram .fd-page-bump{display:flex;align-items:center;gap:.55rem;padding:.55rem .75rem;border:1px solid var(--bump-strip,oklch(0.93 0.111 95));border-radius:calc(var(--fd-rad) * .7);background:var(--bump,oklch(0.975 0.04 95));color:var(--bump-ink,var(--fd-ink));font-size:.875rem;font-weight:700;line-height:1.2;text-align:left}
.cf-funnel-diagram .fd-page-box{flex:none;width:1rem;height:1rem;border:2px solid currentColor;border-radius:3px;background:var(--field,oklch(1 0 0))}
.cf-funnel-diagram .fd-page-foot{display:grid;gap:.55rem;margin-top:auto}
.cf-funnel-diagram .fd-page-btn{display:block;padding:.6rem .75rem;border-radius:var(--button-radius,var(--radius,10px));background:linear-gradient(180deg,oklch(from var(--button-bg,var(--cta,oklch(0.576 0.209 29.5))) calc(l + 0.04) c h),var(--button-bg-2,var(--cta-2,oklch(0.506 0.206 29.5))));box-shadow:inset 0 -2px 0 oklch(from var(--button-bg,var(--cta,oklch(0.576 0.209 29.5))) calc(l - 0.16) c h);color:var(--button-ink,var(--cta-ink,oklch(1 0 0)));font-family:var(--button-font,var(--font-display,inherit));font-size:.9375rem;font-weight:var(--button-weight,800);line-height:1.15;text-shadow:var(--button-text-shadow,none);text-transform:var(--button-case,none)}
.cf-funnel-diagram .fd-page-link{font-size:.875rem;font-weight:700;color:var(--link,var(--fd-ac));text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--fd-ac)) l c h / .45);text-underline-offset:.18em}
.cf-funnel-diagram .fd-drop{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);column-gap:var(--fd-cols);margin-top:1.75rem;padding-inline:var(--fd-pad)}
.cf-funnel-diagram .fd-drop-cell{display:flex;grid-column:2;flex-direction:column;align-items:center}
.cf-funnel-diagram .fd-drop-line{width:3px;height:2.25rem;border-radius:3px;background:var(--fd-line);transform-origin:center top;transition:background-color .3s ease;animation:cf-fd-draw-y .4s ease-out backwards;animation-delay:calc(.2s + (var(--n,5) - 1) * .3s)}
.cf-funnel-diagram .fd-drop-arrow{width:2rem;height:2rem;margin:-.2rem 0 .35rem;color:color-mix(in oklch,var(--fd-ink) 40%,var(--fd-surface));transition:color .3s ease}
.cf-funnel-diagram .fd-drop.is-on .fd-drop-line{background:var(--fd-ac-fill)}
.cf-funnel-diagram .fd-drop.is-on .fd-drop-arrow{color:var(--fd-ac)}
.cf-funnel-diagram .fd-offer{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:start;gap:2rem var(--fd-cols);padding:var(--fd-pad);border:1px solid var(--card-border,var(--fd-line));border-radius:calc(var(--fd-rad) * 1.4);background:var(--fd-card);box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 256 / .22),0 12px 24px -8px oklch(0.22 0.03 256 / .32)))}
.cf-funnel-diagram .fd-greet{margin-bottom:1rem;font-family:var(--font-display,inherit);font-size:clamp(1.375rem,2.6cqi,1.75rem);font-weight:var(--display-weight,800);line-height:1.15;color:var(--fd-ink)}
.cf-funnel-diagram .fd-letter-p{margin-bottom:1rem;font-size:clamp(1.0625rem,1.6cqi,1.1875rem);line-height:1.6;text-wrap:pretty;color:var(--fd-ink)}
.cf-funnel-diagram .fd-sign{display:grid;gap:.25rem;margin-top:1.5rem;font-size:1.0625rem;line-height:1.35;color:var(--fd-muted)}
.cf-funnel-diagram .fd-sign strong{font-family:var(--font-display,inherit);font-size:1.125rem;font-weight:800;color:var(--fd-ink)}
.cf-funnel-diagram .fd-buy{display:flex;flex-direction:column;gap:1.15rem;min-width:0}
.cf-funnel-diagram .fd-buy-h{font-family:var(--font-display,inherit);font-size:clamp(1.375rem,2.6cqi,1.75rem);font-weight:var(--display-weight,800);letter-spacing:-.015em;line-height:1.12;text-wrap:balance;color:var(--fd-ink)}
.cf-funnel-diagram .fd-product{display:flex;align-items:center;gap:1rem}
.cf-funnel-diagram .fd-fan{display:flex;flex:none;padding-left:1rem}
.cf-funnel-diagram .fd-fan img{display:block;width:3.5rem;height:3.5rem;margin-left:-1rem;border-radius:.5rem;object-fit:cover;object-position:center;filter:drop-shadow(0 1px 1px oklch(from var(--fd-sh) l c h / .28)) drop-shadow(0 4px 5px oklch(from var(--fd-sh) l c h / .18));rotate:-7deg}
.cf-funnel-diagram .fd-fan img:nth-child(2){position:relative;z-index:1;rotate:0deg;translate:0 -3px}
.cf-funnel-diagram .fd-fan img:nth-child(3){rotate:7deg}
.cf-funnel-diagram .fd-product-text{display:grid;gap:.2rem;min-width:0}
.cf-funnel-diagram .fd-product-name{font-family:var(--font-display,inherit);font-size:1.0625rem;font-weight:800;line-height:1.2;color:var(--fd-ink)}
.cf-funnel-diagram .fd-product-note{font-size:.9375rem;font-weight:500;line-height:1.3;color:var(--fd-muted)}
.cf-funnel-diagram .fd-compare{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:.5rem}
.cf-funnel-diagram .fd-cell{display:flex;flex-direction:column;align-items:center;justify-content:center;align-self:stretch;padding:.95rem .75rem;border-radius:var(--fd-rad);text-align:center}
.cf-funnel-diagram .fd-today{border:1.5px solid oklch(from var(--fd-ac-fill) l c h / .4);background:color-mix(in oklch,var(--fd-ac-fill) 10%,var(--fd-card))}
.cf-funnel-diagram .fd-alt{border:1.5px solid transparent;background:var(--fd-well)}
.cf-funnel-diagram .fd-price,.cf-funnel-diagram .fd-alt-price{margin-bottom:.75rem;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);font-variant-numeric:tabular-nums;letter-spacing:-.02em;line-height:1}
.cf-funnel-diagram .fd-price{font-size:clamp(2.25rem,4.4cqi,2.75rem);color:var(--fd-ac)}
.cf-funnel-diagram .fd-alt-price{font-size:clamp(1.75rem,3.4cqi,2.125rem);color:var(--fd-muted)}
.cf-funnel-diagram .fd-cell-label{font-size:.875rem;font-weight:600;line-height:1.35;text-wrap:pretty;color:var(--fd-ink)}
.cf-funnel-diagram .fd-vs{padding:.35rem .75rem;border-radius:999px;background:var(--secondary,var(--fd-well));color:var(--secondary-ink,var(--fd-ink));font-family:var(--font-display,inherit);font-size:.875rem;font-weight:800}
.cf-funnel-diagram .fd-btn{--fd-b:var(--button-bg,var(--cta,oklch(0.576 0.209 29.5)));display:inline-flex;align-items:center;justify-content:center;gap:.75rem;width:100%;min-height:4rem;margin:.15rem 0 0;padding:.9rem 1.25rem;border:1px solid oklch(from var(--fd-b) calc(l - 0.12) c h);border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(180deg,oklch(from var(--fd-b) calc(l + 0.04) c h),var(--button-bg-2,var(--cta-2,oklch(0.506 0.206 29.5))));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--fd-b) calc(l + 0.14) c h / .7),inset 0 -3px 0 oklch(from var(--fd-b) calc(l - 0.16) c h),0 1px 2px oklch(from var(--fd-sh) l c h / .3),0 6px 14px -4px oklch(from var(--fd-sh) l c h / .38));color:var(--button-ink,var(--cta-ink,oklch(1 0 0)));cursor:pointer;font-family:var(--button-font,var(--font-display,inherit));font-size:clamp(1.125rem,2.2cqi,1.3rem);font-weight:var(--button-weight,800);letter-spacing:-.005em;line-height:1.1;text-decoration:none;text-shadow:var(--button-text-shadow,none);text-transform:var(--button-case,none);white-space:nowrap;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-funnel-diagram .fd-btn:not(:disabled):hover,.cf-funnel-diagram .fd-btn[data-force=hover]{background:linear-gradient(180deg,oklch(from var(--fd-b) calc(l - 0.02) c h),oklch(from var(--button-bg-2,var(--cta-2,oklch(0.506 0.206 29.5))) calc(l - 0.05) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--fd-b) calc(l + 0.12) c h / .6),inset 0 -3px 0 oklch(from var(--fd-b) calc(l - 0.2) c h),0 2px 3px oklch(from var(--fd-sh) l c h / .32),0 10px 18px -6px oklch(from var(--fd-sh) l c h / .45));transform:translateY(-2px)}
.cf-funnel-diagram .fd-btn:not(:disabled):active,.cf-funnel-diagram .fd-btn[data-force=active]{background:oklch(from var(--fd-b) calc(l - 0.1) c h);box-shadow:inset 0 2px 4px oklch(from var(--fd-b) calc(l - 0.25) c h / .55),0 1px 1px oklch(from var(--fd-sh) l c h / .25);transform:translateY(1px)}
.cf-funnel-diagram .fd-btn:focus-visible{outline:3px solid var(--field-focus,var(--fd-ac));outline-offset:3px}
.cf-funnel-diagram .fd-btn:disabled{border-color:transparent;background:var(--secondary,var(--fd-well));box-shadow:var(--button-2-shadow, var(--shadow-sm));color:var(--secondary-ink,var(--fd-ink));cursor:not-allowed;text-shadow:none}
.cf-funnel-diagram .fd-btn-icon{flex:none;width:1.35em;height:1.35em}
.cf-funnel-diagram .fd-btn-rule{flex:none;align-self:stretch;width:1px;margin:.15rem 0;background:currentColor;opacity:.45}
.cf-funnel-diagram .fd-btn-price{font-variant-numeric:tabular-nums}
.cf-funnel-diagram .fd-assure{display:flex;align-items:center;justify-content:center;gap:.45rem;font-size:.875rem;font-weight:600;line-height:1.3;text-align:center;text-wrap:pretty;color:var(--fd-muted)}
.cf-funnel-diagram .fd-assure svg{flex:none;width:1rem;height:1rem}
@keyframes cf-fd-draw{from{transform:scaleX(0)}to{transform:none}}
@keyframes cf-fd-draw-y{from{transform:scaleY(0)}to{transform:none}}
@keyframes cf-fd-pop{from{transform:scale(.82)}to{transform:none}}
@keyframes cf-fd-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@container fd (max-width: 860px){
.cf-funnel-diagram .fd-head{text-align:left}
.cf-funnel-diagram .fd-map{grid-template-columns:minmax(0,1fr);grid-template-rows:none;column-gap:0}
.cf-funnel-diagram .fd-stop{grid-row:auto;grid-template-columns:var(--fd-dot) minmax(0,1fr);grid-template-rows:auto;grid-template-areas:'dot label' 'dot line' 'dot page';column-gap:1rem;justify-items:start;padding-bottom:2.25rem}
.cf-funnel-diagram .fd-stop:last-child{padding-bottom:0}
.cf-funnel-diagram .fd-dot{align-self:start}
.cf-funnel-diagram .fd-seg,.cf-funnel-diagram .fd-seg.is-tail{display:block;top:calc(var(--fd-dot) / 2);left:calc(var(--fd-dot) / 2 - 1.5px);width:3px;height:100%}
.cf-funnel-diagram .fd-seg-fill{transform-origin:center top;scale:1 0;animation-name:cf-fd-draw-y}
.cf-funnel-diagram .fd-seg-fill.is-on{scale:1 1}
.cf-funnel-diagram .fd-seg-arrow{rotate:90deg}
.cf-funnel-diagram .fd-stop-label{margin:.6rem 0 .35rem;text-align:left}
.cf-funnel-diagram .fd-stop-line{margin:0 0 1rem;text-align:left}
.cf-funnel-diagram .fd-page{width:100%;max-width:21rem;min-height:0}
.cf-funnel-diagram .fd-drop{grid-template-columns:var(--fd-dot) minmax(0,1fr);column-gap:1rem;margin-top:0;padding-inline:0}
.cf-funnel-diagram .fd-drop-cell{grid-column:1}
}
@container fd (max-width: 720px){
.cf-funnel-diagram .fd-offer{grid-template-columns:minmax(0,1fr)}
}
@media (prefers-reduced-motion: reduce){
.cf-funnel-diagram :is(.fd-dot,.fd-seg-fill,.fd-page,.fd-drop-line){animation:none}
.cf-funnel-diagram :is(.fd-dot,.fd-seg-fill,.fd-seg-arrow,.fd-page,.fd-drop-line,.fd-drop-arrow,.fd-btn){transition:none}
.cf-funnel-diagram .is-hot .fd-page,.cf-funnel-diagram .fd-btn:not(:disabled):hover,.cf-funnel-diagram .fd-btn:not(:disabled):active,.cf-funnel-diagram .fd-btn[data-force]{transform:none}
}
`;
pieces/content/funnel-diagram/specimen.tsx 26 lines
import * as React from "react";
import { FunnelDiagram } from "../funnel-diagram";
import defaults from "../../studio-defaults.json";
import { slot } from "../../slots";
export const states = ["default", "hover", "active", "disabled"];
export default function FunnelDiagramSpecimen({ state = "default" }: { state?: "default" | "hover" | "active" | "disabled" }) {
const sample = defaults.sample;
const items = sample.items.map((item, i) => ({
name: item.name,
image: slot(`item-${i + 1}`, item.image),
imageAlt: item.imageAlt,
}));
return (
<FunnelDiagram
state={state}
productName={sample.name}
note={sample.note}
price={sample.price}
alternativePrice={sample.regularPrice}
reassurance={sample.sublabel}
items={items}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalFunnelDiagram |
string |
|
highlight OptionalFunnelDiagram |
string |
|
subheadline OptionalFunnelDiagram |
string |
|
steps OptionalFunnelDiagram |
FunnelDiagramStep[] |
|
mapLabel OptionalFunnelDiagram |
string |
|
greeting OptionalFunnelDiagram |
string |
|
letter OptionalFunnelDiagram |
string[] |
|
signOff OptionalFunnelDiagram |
string |
|
signName OptionalFunnelDiagram |
string |
|
offerHeadline OptionalFunnelDiagram |
string |
|
productName OptionalFunnelDiagram |
string |
|
note OptionalFunnelDiagram |
string |
|
items OptionalFunnelDiagram |
FunnelDiagramItem[] |
|
price OptionalFunnelDiagram |
string |
|
priceLabel OptionalFunnelDiagram |
string |
|
vsLabel OptionalFunnelDiagram |
string |
|
alternativePrice OptionalFunnelDiagram |
string |
|
alternativeLabel OptionalFunnelDiagram |
string |
|
actionLabel OptionalFunnelDiagram |
string |
|
reassurance OptionalFunnelDiagram |
string |
|
href OptionalFunnelDiagram |
string |
|
onAction OptionalFunnelDiagram |
(event: React.MouseEvent<HTMLElement>) => void |
|
disabled OptionalFunnelDiagram |
boolean |
|
state OptionalFunnelDiagram |
"default" | "hover" | "active" | "disabled" |
|
className OptionalFunnelDiagram |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field--field-border--field-focus--field-ink--field-radius- 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.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB