Quote Hero 1
Quote hero: a customer's own words are the headline. One drawn path runs from their photo, through the promise, into the single two-line button.
Use it in a prompt
Use hero/quote-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/quote-hero.tsx. - Import it and pass your copy and images (Props tab):
import { QuoteHero } from "@/components/funneldna/hero/quote-hero"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/hero/quote-hero/component.tsx 520 lines
// layout: path-to-action
// Quote hero: a customer's own words are the headline. One drawn path runs from their photo, through the promise, into the single two-line button.
// Image slot: "customer" (the quoted person's photo). It is a new slot, not "presenter", so a theme can never put the founder's face beside a customer's words.
import * as React from "react";
import { Pause, Play, TrendingUp } from "lucide-react";
import { Pattern, Divider, FX_HOST } from "../fx/fx";
export type QuoteHeroQuote = {
quote: string;
// who said it, e.g. "Sam T., Leeds"
name?: string;
};
export type QuoteHeroCopy = {
// accessible name of the extra-quotes rotator
moreLabel: string;
pause: string;
play: string;
// "{n}" and "{total}" are replaced
show: string;
slide: string;
};
export type QuoteHeroProps = {
// the supplied customer quote, set huge as the headline. Empty: the promise becomes the headline (never a placeholder quote)
quote?: string;
// a phrase inside the quote, set in the accent colour
quoteHighlight?: string;
name?: string;
// e.g. "Student, Austin"
role?: string;
// the person's result, exactly as supplied
result?: string;
// "customer" slot image of the quoted person
photoImage?: string;
photoAlt?: string;
// up to 3 more short supplied quotes; they cycle under the main one (a static list under reduced motion)
moreQuotes?: QuoteHeroQuote[];
// the product promise: the subhead under a quote, the headline without one
promise?: string;
// a phrase inside the promise headline, set in the accent colour (no-quote mode)
promiseHighlight?: string;
// supporting line under the promise headline when there is no quote
lead?: string;
label?: string;
// short benefit line inside the button
sublabel?: string;
// e.g. "$47 today. That's it."
priceLine?: string;
priceNote?: string;
href?: string;
onAction?: (event: React.MouseEvent<HTMLElement>) => void;
state?: "default" | "hover" | "active" | "disabled";
// curved hand-off into the next section
edge?: boolean;
// fx token of the next section's background
edgeTone?: React.ComponentProps<typeof Divider>["tone"];
// milliseconds each extra quote stays up
interval?: number;
copy?: Partial<QuoteHeroCopy>;
className?: string;
};
export function QuoteHero(props: QuoteHeroProps) {
const {
quote,
quoteHighlight,
name,
role,
result,
photoImage,
photoAlt,
moreQuotes = [],
promise = "Build your first funnel with a clear plan",
promiseHighlight,
lead = "Plan your funnel, write your page copy, and check every step before you launch.",
label = "Get the kit",
sublabel = "Instant download",
priceLine,
priceNote,
href,
onAction,
state = "default",
edge = true,
edgeTone = "band",
interval = 5000,
copy,
className,
} = props;
const c: QuoteHeroCopy = { ...COPY, ...copy };
const reduced = useReducedMotionPref();
const q = clean(quote);
const hasQuote = q.length > 0;
const more = moreQuotes
.map((m) => ({ ...m, quote: clean(m.quote) }))
.filter((m) => m.quote.length > 0)
.slice(0, 3);
const hasPhoto = hasQuote && !!photoImage;
const alt = photoAlt ?? name ?? "";
const disabled = state === "disabled";
const long = (hasQuote ? q : promise).length > 110;
const btnClass = ["qh-btn", state === "hover" ? "is-hover" : "", state === "active" ? "is-active" : "", disabled ? "is-disabled" : ""]
.filter(Boolean)
.join(" ");
const btnInner = (
<>
<span className="qh-btn-label">{label}</span>
{sublabel ? <span className="qh-btn-sub">{keepParts(sublabel)}</span> : null}
</>
);
const button =
href && !disabled ? (
<a className={btnClass} href={href} onClick={(e) => onAction?.(e)}>
{btnInner}
</a>
) : (
<button
type="button"
className={btnClass}
disabled={disabled}
onClick={(e) => {
if (disabled) return;
onAction?.(e);
}}
>
{btnInner}
</button>
);
const stops: React.ReactNode[] = [];
let n = 0;
if (hasQuote) {
stops.push(
<Stop
key="quote"
i={n++}
k="h"
photo={hasPhoto ? <img src={photoImage} alt={alt} width={224} height={224} decoding="async" /> : null}
>
<figure className="qh-fig">
<h1 className="qh-h1">
{"\u201c"}
{emphasise(q, quoteHighlight)}
{"\u201d"}
</h1>
{name || role || result ? (
<figcaption className="qh-by">
{hasPhoto ? (
<span className="qh-pin qh-ring">
<span>
<img src={photoImage} alt={alt} width={104} height={104} decoding="async" />
</span>
</span>
) : null}
<span className="qh-who">
{name || role ? (
<span className="qh-idline">
{name ? <strong className="qh-name">{name}</strong> : null}
{name && role ? <span aria-hidden="true"> · </span> : null}
{role ? <span>{role}</span> : null}
</span>
) : null}
{result ? (
<span className="qh-result">
<TrendingUp className="qh-ic" size={18} strokeWidth={2.5} aria-hidden="true" />
{result}
</span>
) : null}
</span>
</figcaption>
) : null}
</figure>
</Stop>
);
} else {
stops.push(
<Stop key="promise-head" i={n++} k="h">
<h1 className="qh-h1">{emphasise(promise, promiseHighlight)}</h1>
{lead ? <p className="qh-lead">{lead}</p> : null}
</Stop>
);
}
if (more.length > 0) {
stops.push(
<Stop key="more" i={n++} k="b">
<MoreQuotes items={more} reduced={reduced} interval={interval} copy={c} />
</Stop>
);
}
if (hasQuote && promise) {
stops.push(
<Stop key="promise" i={n++} k="p">
<p className="qh-promise">{promise}</p>
</Stop>
);
}
stops.push(
<Stop key="act" i={n++} last>
<div className="qh-act">
{button}
{priceLine || priceNote ? (
<p className="qh-price">
{priceLine ? <span className="qh-price-line">{priceLine}</span> : null}
{priceNote ? <span className="qh-price-note">{keepParts(priceNote)}</span> : null}
</p>
) : null}
</div>
</Stop>
);
return (
<section className={["cf-quote-hero", edge ? "has-edge" : "", className].filter(Boolean).join(" ")} style={FX_HOST}>
<style>{CSS}</style>
<div className="qh-wrap">
<div className={["qh-inner", hasPhoto ? "has-photo" : "", long ? "is-long" : ""].filter(Boolean).join(" ")}>
<div className="qh-rings" aria-hidden="true">
<Pattern name="rings" fade="edges" />
</div>
<div className="qh-path">{stops}</div>
</div>
</div>
{edge ? (
<div className="qh-edge" aria-hidden="true">
<Divider shape="curve" tone={edgeTone} height={56} />
</div>
) : null}
</section>
);
}
export default QuoteHero;
const COPY: QuoteHeroCopy = {
moreLabel: "More words from customers",
pause: "Pause quotes",
play: "Play quotes",
show: "Show quote {n} of {total}",
slide: "{n} of {total}",
};
function Stop({
i,
k,
photo,
last,
children,
}: {
i: number;
k?: "h" | "p" | "b";
photo?: React.ReactNode;
last?: boolean;
children: React.ReactNode;
}) {
return (
<div className={"qh-stop" + (last ? " is-last" : "")} style={{ ["--i" as string]: Math.min(i, 4) } as React.CSSProperties}>
<div className="qh-rail" data-k={k}>
{photo ? (
<span className="qh-rail-photo qh-ring">
<span>{photo}</span>
</span>
) : null}
{!last ? <span className="qh-dot" aria-hidden="true" /> : null}
</div>
<div className="qh-body">{children}</div>
</div>
);
}
function MoreQuotes({
items,
reduced,
interval,
copy,
}: {
items: QuoteHeroQuote[];
reduced: boolean;
interval: number;
copy: QuoteHeroCopy;
}) {
const [active, setActive] = React.useState(0);
const [playing, setPlaying] = React.useState(true);
const [hold, setHold] = React.useState(false);
const [run, setRun] = React.useState(0);
const count = items.length;
const idx = active % count;
const cycling = count > 1 && !reduced;
const running = cycling && playing && !hold;
React.useEffect(() => {
if (!running) return;
const t = window.setTimeout(() => {
setActive((a) => (a + 1) % count);
setRun((r) => r + 1);
}, interval);
return () => window.clearTimeout(t);
}, [running, run, interval, count]);
if (!cycling) {
return (
<ul className="qh-list" aria-label={copy.moreLabel}>
{items.map((m, i) => (
<li key={i}>
<figure>
<blockquote>
<p className="qh-mq">{"\u201c" + m.quote + "\u201d"}</p>
</blockquote>
{m.name ? <figcaption className="qh-mby">{m.name}</figcaption> : null}
</figure>
</li>
))}
</ul>
);
}
const release = () => {
setHold(false);
setRun((r) => r + 1);
};
return (
<div
className={"qh-more" + (running ? "" : " is-stopped")}
role="region"
aria-roledescription="carousel"
aria-label={copy.moreLabel}
style={{ ["--qh-int" as string]: interval + "ms" } as React.CSSProperties}
onPointerEnter={(e) => {
if (e.pointerType === "mouse") setHold(true);
}}
onPointerLeave={(e) => {
if (e.pointerType === "mouse") release();
}}
onFocus={() => setHold(true)}
onBlur={(e) => {
if (!e.currentTarget.contains(e.relatedTarget as Node | null)) release();
}}
>
<div className="qh-slot" aria-live={running ? "off" : "polite"}>
{items.map((m, i) => {
const on = i === idx;
return (
<figure
key={i}
className={"qh-item" + (on ? " is-on" : "")}
role="group"
aria-roledescription="slide"
aria-label={fill(copy.slide, i + 1, count)}
aria-hidden={!on}
>
<blockquote>
<p className="qh-mq">{"\u201c" + m.quote + "\u201d"}</p>
</blockquote>
{m.name ? <figcaption className="qh-mby">{m.name}</figcaption> : null}
</figure>
);
})}
</div>
<div className="qh-ctrl">
{items.map((_, i) => (
<button
key={i}
type="button"
className="qh-pipbtn"
aria-label={fill(copy.show, i + 1, count)}
aria-current={i === idx ? "true" : undefined}
onClick={() => {
setActive(i);
setRun((r) => r + 1);
}}
>
<span className="qh-pip">{i === idx ? <i key={idx + "-" + run} className="is-run" /> : null}</span>
</button>
))}
<button
type="button"
className="qh-toggle"
aria-label={playing ? copy.pause : copy.play}
onClick={() => {
setPlaying((p) => !p);
setRun((r) => r + 1);
}}
>
{playing ? <Pause size={18} strokeWidth={2.5} aria-hidden="true" /> : <Play size={18} strokeWidth={2.5} aria-hidden="true" />}
</button>
</div>
</div>
);
}
function useReducedMotionPref() {
const [reduced, setReduced] = React.useState(false);
React.useEffect(() => {
if (typeof window === "undefined" || !window.matchMedia) return;
const m = window.matchMedia("(prefers-reduced-motion: reduce)");
const update = () => setReduced(m.matches);
update();
m.addEventListener("change", update);
return () => m.removeEventListener("change", update);
}, []);
return reduced;
}
function clean(text?: string) {
return (text ?? "").trim().replace(/^["\u201c\u201d]+|["\u201c\u201d]+$/g, "").trim();
}
function fill(template: string, n: number, total: number) {
return template.replace("{n}", String(n)).replace("{total}", String(total));
}
// Keeps each " · " segment of a short reassurance line whole, so phones break at the dot, never inside "30-day".
function keepParts(text: string): React.ReactNode {
const parts = text.split(" \u00b7 ");
if (parts.length < 2) return text;
const last = parts.length - 1;
return parts.map((p, i) => (
<React.Fragment key={i}>
<span className="qh-nb">
{p}
{i < last ? "\u00a0\u00b7" : ""}
</span>
{i < last ? " " : null}
</React.Fragment>
));
}
function emphasise(text: string, phrase?: string): React.ReactNode {
if (!phrase) return text;
const at = text.indexOf(phrase);
if (at < 0) return text;
return (
<>
{text.slice(0, at)}
<span className="qh-em">{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
const CSS = `
.cf-quote-hero{position:relative;overflow:clip;background:var(--surface);color:var(--ink);font-family:var(--font-body);padding-block:clamp(56px,8vw,112px) calc(clamp(64px,8.5vw,120px) + var(--qh-edge-h,0px));padding-inline:clamp(16px,5vw,48px);--qh-line:var(--accent-fill,var(--accent));--qh-sh:var(--shadow,oklch(0.22 0.03 260))}
.cf-quote-hero.has-edge{--qh-edge-h:56px}
.cf-quote-hero *,.cf-quote-hero *::before,.cf-quote-hero *::after{box-sizing:border-box}
.cf-quote-hero :where(h1,p,figure,blockquote,ul,li){margin:0;padding:0}
.cf-quote-hero :where(ul){list-style:none}
.cf-quote-hero .qh-wrap{position:relative;z-index:1;max-inline-size:1120px;margin-inline:auto;container:qh/inline-size}
.cf-quote-hero .qh-inner{position:relative;--rail:24px;--gap:clamp(12px,3cqi,32px);--btn-h:72px;--fs-h:clamp(2rem,6.4cqi + .25rem,4.875rem);--fs-p:clamp(1.3125rem,1.6cqi + .9rem,1.625rem);--fs-l:clamp(1.125rem,1.5vw,1.375rem);--fs-b:clamp(1.0625rem,1.25vw,1.125rem)}
.cf-quote-hero .qh-inner.is-long{--fs-h:clamp(1.75rem,4.6cqi + .25rem,3.5rem)}
@container qh (min-width:640px){.cf-quote-hero .qh-inner{--rail:32px}.cf-quote-hero .qh-inner.has-photo{--rail:88px}}
@container qh (min-width:960px){.cf-quote-hero .qh-inner.has-photo{--rail:112px}}
.cf-quote-hero .qh-rings{position:absolute;z-index:0;pointer-events:none;inline-size:min(560px,86cqi);aspect-ratio:1;top:-18%;right:-28%}
@container qh (min-width:640px){.cf-quote-hero .qh-inner.has-photo .qh-rings{right:auto;left:calc(var(--rail) / 2);top:calc(var(--rail) / 2);translate:-50% -50%}}
.cf-quote-hero .qh-path{position:relative;z-index:1}
.cf-quote-hero .qh-stop{display:grid;grid-template-columns:var(--rail) minmax(0,1fr);column-gap:var(--gap)}
.cf-quote-hero .qh-rail{position:relative;display:flex;flex-direction:column;align-items:center;min-inline-size:0}
.cf-quote-hero .qh-stop:not(.is-last) .qh-rail::after{content:"";flex:1 1 auto;inline-size:3px;margin-top:10px;border-radius:3px;background:var(--qh-line);transform-origin:top;animation:qh-draw .6s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i) * .07s + .12s)}
.cf-quote-hero .qh-stop.is-last .qh-rail::before{content:"";position:absolute;inset-block-start:0;inset-inline-start:calc(50% - 1.5px);block-size:calc(var(--btn-h) / 2 + 1.5px);inline-size:calc(50% + 1.5px + var(--gap));border-inline-start:3px solid var(--qh-line);border-block-end:3px solid var(--qh-line);border-end-start-radius:14px;animation:qh-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:.28s}
.cf-quote-hero .qh-body{min-inline-size:0;padding-bottom:clamp(24px,3.4cqi,40px);animation:qh-rise .45s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i) * .07s)}
.cf-quote-hero .qh-stop.is-last .qh-body{padding-bottom:0}
.cf-quote-hero .qh-dot{flex:none;inline-size:14px;block-size:14px;border-radius:50%;background:var(--qh-line);margin-top:var(--dt,8px)}
.cf-quote-hero .qh-rail[data-k="h"]{--dt:max(0px,calc((var(--fs-h) * 1.04 - 14px) / 2))}
.cf-quote-hero .qh-rail[data-k="p"]{--dt:max(0px,calc((var(--fs-p) * 1.3 - 14px) / 2))}
.cf-quote-hero .qh-rail[data-k="b"]{--dt:max(0px,calc((var(--fs-b) * 1.5 - 14px) / 2))}
.cf-quote-hero .qh-ring{padding:3px;border-radius:50%;background:var(--qh-line);filter:drop-shadow(0 2px 3px oklch(from var(--qh-sh) l c h / .3)) drop-shadow(0 10px 14px oklch(from var(--qh-sh) l c h / .2))}
.cf-quote-hero .qh-ring>span{display:block;inline-size:100%;block-size:100%;padding:3px;border-radius:50%;background:var(--surface)}
.cf-quote-hero .qh-ring img{display:block;inline-size:100%;block-size:100%;aspect-ratio:1;border-radius:50%;object-fit:cover;object-position:50% 30%}
.cf-quote-hero .qh-rail-photo{display:none;inline-size:100%;aspect-ratio:1}
.cf-quote-hero .qh-pin{display:block;flex:none;inline-size:52px;aspect-ratio:1}
@container qh (min-width:640px){.cf-quote-hero .has-photo .qh-rail-photo{display:block}.cf-quote-hero .has-photo .qh-rail[data-k="h"] .qh-dot{display:none}.cf-quote-hero .has-photo .qh-pin{display:none}}
.cf-quote-hero .qh-h1{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:var(--fs-h);line-height:1.04;color:var(--ink);text-wrap:balance;overflow-wrap:break-word;hyphens:manual}
.cf-quote-hero .qh-em{color:var(--accent)}
.cf-quote-hero .qh-lead{margin-top:max(16px,calc(var(--fs-h) * .34));max-inline-size:60ch;font-size:var(--fs-l);line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-quote-hero .qh-by{display:flex;align-items:flex-start;gap:12px;margin-top:max(20px,calc(var(--fs-h) * .46))}
.cf-quote-hero .qh-nb{white-space:nowrap}
.cf-quote-hero .qh-stop:nth-last-child(2) .qh-body{padding-bottom:clamp(28px,4.2cqi,48px)}
.cf-quote-hero .qh-who{display:flex;flex-direction:column;gap:4px;min-inline-size:0}
.cf-quote-hero .qh-idline{font-size:15px;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty;overflow-wrap:anywhere}
.cf-quote-hero .qh-name{font-size:var(--fs-b);font-weight:800;color:var(--ink)}
.cf-quote-hero .qh-result{font-size:var(--fs-b);line-height:1.45;font-weight:700;color:var(--ink);text-wrap:pretty;overflow-wrap:anywhere}
.cf-quote-hero .qh-ic{display:inline-block;inline-size:18px;block-size:18px;vertical-align:-0.18em;margin-inline-end:.4em;color:var(--success)}
.cf-quote-hero .qh-promise{max-inline-size:34em;font-size:var(--fs-p);line-height:1.3;font-weight:700;color:var(--ink);text-wrap:pretty;overflow-wrap:anywhere}
.cf-quote-hero .qh-more{max-inline-size:40rem}
.cf-quote-hero .qh-slot{display:grid}
.cf-quote-hero .qh-item{grid-area:1/1;min-inline-size:0;opacity:0;visibility:hidden;transform:translateY(8px);transition:opacity .45s cubic-bezier(.2,.7,.2,1),transform .45s cubic-bezier(.2,.7,.2,1),visibility 0s linear .45s}
.cf-quote-hero .qh-item.is-on{opacity:1;visibility:visible;transform:none;transition-delay:0s}
.cf-quote-hero .qh-mq{font-size:var(--fs-b);line-height:1.5;font-weight:600;color:var(--ink);text-wrap:pretty;overflow-wrap:anywhere}
.cf-quote-hero .qh-mby{margin-top:4px;font-size:15px;line-height:1.4;font-weight:500;color:var(--muted)}
.cf-quote-hero .qh-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr));gap:20px 32px}
.cf-quote-hero .qh-list li{min-inline-size:0}
.cf-quote-hero .qh-ctrl{display:flex;flex-wrap:wrap;align-items:center;gap:2px;margin-top:4px;margin-inline-start:-11px}
.cf-quote-hero .qh-pipbtn{display:inline-grid;place-items:center;inline-size:32px;block-size:44px;padding:0;border:0;border-radius:8px;background:none;cursor:pointer}
.cf-quote-hero .qh-pip{position:relative;display:block;inline-size:10px;block-size:10px;overflow:hidden;border-radius:999px;background:oklch(from var(--ink) l c h / .24);transition:inline-size .3s cubic-bezier(.2,.7,.2,1),background .16s ease}
.cf-quote-hero .qh-pipbtn:hover .qh-pip{background:oklch(from var(--ink) l c h / .4)}
.cf-quote-hero .qh-pipbtn[aria-current="true"] .qh-pip{inline-size:28px}
.cf-quote-hero .qh-pip i{position:absolute;inset:0;background:var(--qh-line);transform-origin:left;transform:scaleX(1)}
.cf-quote-hero .qh-pip i.is-run{animation:qh-progress var(--qh-int,5s) linear both}
.cf-quote-hero .qh-more.is-stopped .qh-pip i.is-run{animation-play-state:paused}
.cf-quote-hero .qh-toggle{display:inline-grid;place-items:center;inline-size:44px;block-size:44px;margin-inline-start:8px;padding:0;border:1px solid var(--button-2-border,transparent);border-radius:999px;background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:pointer;transition:background .16s ease,transform .16s ease}
.cf-quote-hero .qh-toggle:hover{background:oklch(from var(--button-2-bg,var(--secondary)) calc(l - .04) c h)}
.cf-quote-hero .qh-toggle:active{transform:translateY(1px)}
.cf-quote-hero .qh-pipbtn:focus-visible,.cf-quote-hero .qh-toggle:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:2px}
.cf-quote-hero .qh-act{display:flex;flex-wrap:wrap;align-items:center;gap:16px 28px}
.cf-quote-hero .qh-btn{--bb:var(--button-bg,var(--cta));--bb2:var(--button-bg-2,var(--cta-2));position:relative;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-block-size:var(--btn-h);max-inline-size:100%;padding:12px 32px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--bb) calc(l + .04) c h),oklch(from var(--bb2) calc(l - .02) c h));color:var(--button-ink,var(--cta-ink));font-family:var(--button-font,var(--font-display));text-transform:var(--button-case,none);text-shadow:var(--button-text-shadow,none);text-align:center;text-decoration:none;cursor:pointer;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--bb) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--bb) calc(l - .16) c h),0 1px 2px oklch(from var(--qh-sh) l c h / .35),0 8px 16px -6px oklch(from var(--qh-sh) l c h / .45));transition:transform .16s ease,box-shadow .16s ease,background .16s ease;-webkit-tap-highlight-color:transparent}
.cf-quote-hero .qh-btn:is(:hover,.is-hover):not(:disabled){background:linear-gradient(oklch(from var(--bb) calc(l - .01) c h),oklch(from var(--bb2) calc(l - .07) c h));transform:translateY(-1px);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--bb) calc(l + .1) c h / .7),inset 0 -3px 0 oklch(from var(--bb) calc(l - .2) c h),0 2px 3px oklch(from var(--qh-sh) l c h / .38),0 12px 20px -8px oklch(from var(--qh-sh) l c h / .5))}
.cf-quote-hero .qh-btn:is(:active,.is-active):not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--bb) calc(l - .04) c h),oklch(from var(--bb2) calc(l - .08) c h));box-shadow:inset 0 2px 4px oklch(from var(--bb) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--bb) calc(l - .16) c h),0 1px 1px oklch(from var(--qh-sh) l c h / .35)}
.cf-quote-hero .qh-btn:focus-visible{outline:3px solid var(--field-focus,var(--accent));outline-offset:3px}
.cf-quote-hero .qh-btn:disabled,.cf-quote-hero .qh-btn.is-disabled{background:var(--button-2-bg,var(--secondary));color:var(--button-2-ink,var(--secondary-ink));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm));cursor:not-allowed;transform:none}
.cf-quote-hero .qh-btn-label{font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;font-weight:var(--button-weight,800);text-wrap:balance;overflow-wrap:anywhere}
.cf-quote-hero .qh-btn-sub{font-family:var(--font-body);font-size:15px;line-height:1.3;font-weight:600;text-transform:none;letter-spacing:0;text-wrap:pretty}
@container qh (max-width:519px){.cf-quote-hero .qh-btn{inline-size:100%;padding-inline:20px}}
.cf-quote-hero .qh-price{display:flex;flex-direction:column;gap:2px;min-inline-size:0}
.cf-quote-hero .qh-price-line{font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;font-size:var(--fs-p);line-height:1.15;color:var(--ink);font-variant-numeric:tabular-nums;text-wrap:balance}
.cf-quote-hero .qh-price-note{font-size:15px;line-height:1.4;font-weight:500;color:var(--muted);text-wrap:pretty}
.cf-quote-hero .qh-edge{position:absolute;z-index:0;inset-inline:0;inset-block-end:0;block-size:56px;pointer-events:none}
@keyframes qh-rise{from{opacity:.82;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes qh-draw{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes qh-progress{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@media (prefers-reduced-motion:reduce){.cf-quote-hero .qh-body,.cf-quote-hero .qh-stop.is-last .qh-rail::before,.cf-quote-hero .qh-stop:not(.is-last) .qh-rail::after,.cf-quote-hero .qh-pip i.is-run{animation:none}.cf-quote-hero .qh-item,.cf-quote-hero .qh-pip,.cf-quote-hero .qh-btn,.cf-quote-hero .qh-toggle{transition:none}.cf-quote-hero .qh-btn:is(:hover,.is-hover):not(:disabled),.cf-quote-hero .qh-btn:is(:active,.is-active):not(:disabled){transform:none}}
`;
pieces/hero/quote-hero/specimen.tsx 35 lines
import __studioImage03166706 from "../assets/c97c44e9316a5775.webp";
import { QuoteHero } from "../quote-hero";
import { slot } from "../../slots";
import defaults from "../../studio-defaults.json";
export const states = ["default", "hover", "active", "disabled"];
export default function QuoteHeroSpecimen({ state = "default" }: { state?: "default" | "hover" | "active" | "disabled" }) {
const s = defaults.sample;
return (
<QuoteHero
quote="I stopped rewriting my sales page at 2am. Now my first draft gets the yes."
quoteHighlight="my first draft gets the yes"
name="Priya N."
role="Copy Cohort Studio student, Austin"
result="Booked her first $3,000 sales-page client in week five"
photoImage={slot(
"customer",
__studioImage03166706
)}
photoAlt="Priya N. smiling at her writing desk"
moreQuotes={[
{ quote: "The line-by-line feedback fixed habits I didn't know I had.", name: "Jordan K., Denver" },
{ quote: "I finally know what to write before I open a blank doc.", name: "Sam T., Leeds" },
{ quote: "My launch email beat everything I sent last year.", name: "Elena V., Porto" },
]}
promise="Write your sales page in one focused weekend with the Copy Cohort Studio starter course."
label="Start the course"
sublabel="Instant access · 30-day guarantee"
priceLine={`${s.price} today. That's it.`}
priceNote={s.note}
state={state}
/>
);
}
| Name | Type | Details |
|---|---|---|
quote OptionalQuoteHero |
string |
|
quoteHighlight OptionalQuoteHero |
string |
|
name OptionalQuoteHero |
string |
|
role OptionalQuoteHero |
string |
|
result OptionalQuoteHero |
string |
|
photoImage OptionalQuoteHero |
string |
|
photoAlt OptionalQuoteHero |
string |
|
moreQuotes OptionalQuoteHero |
QuoteHeroQuote[] |
|
promise OptionalQuoteHero |
string |
|
promiseHighlight OptionalQuoteHero |
string |
|
lead OptionalQuoteHero |
string |
|
label OptionalQuoteHero |
string |
|
sublabel OptionalQuoteHero |
string |
|
priceLine OptionalQuoteHero |
string |
|
priceNote OptionalQuoteHero |
string |
|
href OptionalQuoteHero |
string |
|
onAction OptionalQuoteHero |
(event: React.MouseEvent<HTMLElement>) => void |
|
state OptionalQuoteHero |
"default" | "hover" | "active" | "disabled" |
|
edge OptionalQuoteHero |
boolean |
|
edgeTone OptionalQuoteHero |
React.ComponentProps<typeof Divider>["tone"] |
|
interval OptionalQuoteHero |
number |
|
copy OptionalQuoteHero |
Partial<QuoteHeroCopy> |
|
className OptionalQuoteHero |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-border--button-2-ink--button-2-shadow- Secondary button.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
customer- An image this piece places.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
c97c44e9316a5775.webp
image/webp · 47.4 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB