Testimonial Switcher 1
Proof block: the visitor picks a client from a row of names and reads that story as a front-page panel
Use it in a prompt
Use proof/testimonial-switcher 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/proof/testimonial-switcher.tsx. - Import it and pass your copy and images (Props tab):
import { TestimonialSwitcher } from "@/components/funneldna/proof/testimonial-switcher"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/proof/testimonial-switcher/component.tsx 379 lines
// layout: advertorial-front
// Proof block: the visitor picks a client from a row of names and reads that story as a front-page panel
// (dateline, favourite part, result, pull quote), then meets the action directly under it.
import React from "react";
import { Clock, Dumbbell, Heart, MessageCircle, Quote, Sparkles, Target, TrendingUp, Video } from "lucide-react";
import { FX_HOST, Glow, Pattern } from "../fx/fx";
const ICONS = {
spark: Sparkles,
trend: TrendingUp,
chat: MessageCircle,
clock: Clock,
target: Target,
dumbbell: Dumbbell,
video: Video,
heart: Heart,
};
export type TestimonialSwitcherIcon = keyof typeof ICONS;
export type TestimonialSwitcherRow = {
label: string; // row label, e.g. "Favourite part"
chip: string; // short answer shown in the icon chip
icon?: TestimonialSwitcherIcon; // inline lucide icon inside the chip
line?: string; // one sentence under the chip
};
export type TestimonialSwitcherPerson = {
name: string;
role?: string;
image?: string; // avatar photo src
imageAlt?: string;
dateline?: string; // place or programme line shown in the front-page dateline
rows?: TestimonialSwitcherRow[];
quote?: string;
keyPhrase?: string; // part of the quote set in full ink; the rest stays muted
};
export type TestimonialSwitcherProps = {
headline?: React.ReactNode;
subline?: React.ReactNode;
people?: TestimonialSwitcherPerson[]; // proof: empty by default, nothing renders without it
defaultIndex?: number;
tabsLabel?: string; // accessible name of the tab row
counterLabel?: string; // "{n}" and "{total}" are replaced, e.g. "Story 2 of 3"
actionLabel?: string;
actionNote?: React.ReactNode; // the quiet line under the button
noteHref?: string; // makes the quiet line a link (e.g. "#details")
href?: string;
onAction?: () => void;
disabled?: boolean;
state?: "default" | "hover" | "active" | "disabled";
className?: string;
};
export function TestimonialSwitcher(props: TestimonialSwitcherProps) {
const {
headline = "Hear it from people like you",
subline = "Pick a name to read their story.",
people = [],
defaultIndex = 0,
tabsLabel = "Client stories",
counterLabel = "Story {n} of {total}",
actionLabel = "Start my own story",
actionNote = "or keep reading to see what's inside",
noteHref,
href,
onAction,
state = "default",
className,
} = props;
const list = people.filter((p) => p && typeof p.name === "string" && p.name.trim().length > 0);
const [active, setActive] = React.useState(() => clampIndex(defaultIndex, list.length));
const tabRefs = React.useRef<(HTMLButtonElement | null)[]>([]);
const scrollerRef = React.useRef<HTMLDivElement | null>(null);
const uid = "cf-ts-" + React.useId().replace(/:/g, "");
// On first paint, bring the chosen story's tab into the row's view when the row has to scroll.
React.useEffect(() => {
centreTab(scrollerRef.current, tabRefs.current[active], false);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
if (!list.length) return null;
const current = Math.min(active, list.length - 1);
const disabled = state === "disabled" || props.disabled === true;
const select = (i: number, focus: boolean) => {
setActive(i);
const el = tabRefs.current[i];
if (!el) return;
if (focus) el.focus({ preventScroll: true });
centreTab(scrollerRef.current, el, !prefersStill());
};
const onKey = (e: React.KeyboardEvent<HTMLButtonElement>, i: number) => {
const last = list.length - 1;
let next: number | null = null;
if (e.key === "ArrowRight" || e.key === "ArrowDown") next = i === last ? 0 : i + 1;
else if (e.key === "ArrowLeft" || e.key === "ArrowUp") next = i === 0 ? last : i - 1;
else if (e.key === "Home") next = 0;
else if (e.key === "End") next = last;
if (next === null) return;
e.preventDefault();
select(next, true);
};
const btnClass = "cf-ts-btn" + (state === "hover" ? " is-hover" : "") + (state === "active" ? " is-active" : "");
return (
<section
className={"cf-testimonial-switcher" + (className ? " " + className : "")}
style={FX_HOST}
aria-labelledby={headline ? uid + "-h" : undefined}
>
<style>{CSS}</style>
<Pattern name="grid" fade="corner" />
<Glow />
<div className="cf-ts-wrap">
{headline || subline ? (
<header className="cf-ts-head">
{headline ? (
<h2 id={uid + "-h"} className="cf-ts-title">
{headline}
</h2>
) : null}
{subline ? <p className="cf-ts-sub">{subline}</p> : null}
</header>
) : null}
<div className="cf-ts-scroller" ref={scrollerRef}>
<div className="cf-ts-track" role="tablist" aria-label={tabsLabel} aria-orientation="horizontal">
{list.map((p, i) => {
const on = i === current;
return (
<button
key={i}
ref={(el) => {
tabRefs.current[i] = el;
}}
id={uid + "-tab-" + i}
type="button"
role="tab"
aria-selected={on}
aria-controls={uid + "-panel-" + i}
tabIndex={on ? 0 : -1}
className={"cf-ts-tab" + (on ? " is-on" : "")}
onClick={() => select(i, false)}
onKeyDown={(e) => onKey(e, i)}
>
{p.image ? (
<img
className="cf-ts-avatar"
src={p.image}
alt={p.imageAlt ?? ""}
width={48}
height={48}
decoding="async"
/>
) : (
<span className="cf-ts-avatar cf-ts-initials" aria-hidden="true">
{initials(p.name)}
</span>
)}
<span className="cf-ts-who">
<span className="cf-ts-name">{p.name}</span>
{p.role ? <span className="cf-ts-role">{p.role}</span> : null}
</span>
</button>
);
})}
</div>
</div>
<div className="cf-ts-stage">
{list.map((p, i) => {
const on = i === current;
const rows = (p.rows ?? []).filter((r) => r && r.label && r.chip);
const quote = (p.quote ?? "").trim();
const both = rows.length > 0 && quote.length > 0;
const counter = counterLabel ? fill(counterLabel, i + 1, list.length) : "";
const dateline = [counter, p.dateline ?? ""].filter(Boolean).join(" \u00b7 ");
return (
<div
key={i}
id={uid + "-panel-" + i}
role="tabpanel"
aria-labelledby={uid + "-tab-" + i}
aria-hidden={on ? undefined : true}
tabIndex={on ? 0 : -1}
className={"cf-ts-panel" + (on ? " is-on" : "") + (both ? "" : " is-single")}
>
{dateline ? (
<p className="cf-ts-dateline">
<span>{dateline}</span>
</p>
) : null}
<div className="cf-ts-body">
{rows.length ? (
<dl className="cf-ts-rows">
{rows.map((r, j) => {
const Icon = ICONS[r.icon ?? (j === 0 ? "spark" : j === 1 ? "trend" : "target")] ?? Sparkles;
return (
<div className="cf-ts-row" key={j}>
<dt>{r.label}</dt>
<dd>
<span className="cf-ts-chip">
<Icon aria-hidden="true" size={16} strokeWidth={2.5} />
{r.chip}
</span>
{r.line ? <p className="cf-ts-line">{r.line}</p> : null}
</dd>
</div>
);
})}
</dl>
) : null}
{both ? <span className="cf-ts-rule" aria-hidden="true" /> : null}
{quote ? (
<figure className="cf-ts-quote">
<Quote className="cf-ts-qmark" aria-hidden="true" size={32} strokeWidth={2.5} />
<blockquote>
<p>
<QuoteText quote={quote} keyPhrase={p.keyPhrase} />
</p>
</blockquote>
<figcaption className="cf-ts-cite">
<strong>{p.name}</strong>
{p.role ? " \u00b7 " + p.role : ""}
</figcaption>
</figure>
) : null}
</div>
</div>
);
})}
</div>
{actionLabel ? (
<div className="cf-ts-cta">
{href && !disabled ? (
<a className={btnClass} href={href} onClick={onAction ? () => onAction() : undefined}>
{actionLabel}
</a>
) : (
<button type="button" className={btnClass} disabled={disabled} onClick={() => onAction?.()}>
{actionLabel}
</button>
)}
{actionNote ? (
<p className="cf-ts-note">{noteHref ? <a href={noteHref}>{actionNote}</a> : actionNote}</p>
) : null}
</div>
) : null}
</div>
</section>
);
}
export default TestimonialSwitcher;
function QuoteText({ quote, keyPhrase }: { quote: string; keyPhrase?: string }) {
const k = (keyPhrase ?? "").trim();
const at = k ? quote.indexOf(k) : -1;
if (!k || at < 0) return <span className="cf-ts-key">{quote}</span>;
return (
<>
{quote.slice(0, at)}
<strong className="cf-ts-key">{k}</strong>
{quote.slice(at + k.length)}
</>
);
}
function prefersStill() {
return (
typeof window !== "undefined" &&
typeof window.matchMedia === "function" &&
window.matchMedia("(prefers-reduced-motion: reduce)").matches
);
}
// Scrolls only the tab row (never the page) so the chosen tab sits centred when the row overflows.
function centreTab(scroller: HTMLDivElement | null, tab: HTMLButtonElement | null | undefined, smooth: boolean) {
if (!scroller || !tab) return;
if (scroller.scrollWidth <= scroller.clientWidth + 1) return;
const left = Math.max(0, tab.offsetLeft - (scroller.clientWidth - tab.offsetWidth) / 2);
if (typeof scroller.scrollTo === "function") scroller.scrollTo({ left, behavior: smooth ? "smooth" : "auto" });
else scroller.scrollLeft = left;
}
function initials(name: string) {
return name
.split(" ")
.filter(Boolean)
.slice(0, 2)
.map((w) => w.charAt(0))
.join("")
.toUpperCase();
}
function fill(template: string, n: number, total: number) {
return template.split("{n}").join(String(n)).split("{total}").join(String(total));
}
function clampIndex(i: number, len: number) {
if (!len) return 0;
const n = Math.floor(i) || 0;
return Math.max(0, Math.min(len - 1, n));
}
const CSS = `
.cf-testimonial-switcher{position:relative;isolation:isolate;overflow:hidden;background:var(--band);color:var(--band-ink);font-family:var(--font-body);--ts-gutter:clamp(16px,5vw,48px);padding:clamp(56px,8vw,112px) var(--ts-gutter) clamp(64px,8.5vw,120px);--ts-soft:color-mix(in oklab,var(--band-ink) 88%,var(--band));--ts-muted:color-mix(in oklab,var(--band-ink) 74%,var(--band));--ts-quiet:color-mix(in oklab,var(--band-ink) 72%,var(--band));--ts-line:oklch(from var(--band-ink) l c h / .16);--ts-ease:cubic-bezier(.2,.7,.2,1);--ts-shadow:var(--shadow,oklch(.22 .03 260))}
.cf-testimonial-switcher .cf-ts-wrap{position:relative;z-index:1;max-width:1120px;margin:0 auto}
.cf-testimonial-switcher .cf-ts-head{text-align:center;max-width:46rem;margin:0 auto}
.cf-testimonial-switcher .cf-ts-title{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-.025em);text-transform:var(--display-case,none);font-size:clamp(2rem,3.6vw,3.25rem);line-height:1.06;color:var(--band-ink);text-wrap:balance}
.cf-testimonial-switcher .cf-ts-sub{margin:16px auto 0;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);line-height:1.4;font-weight:500;color:var(--ts-muted);text-wrap:balance}
.cf-testimonial-switcher .cf-ts-scroller{position:relative;margin-top:clamp(32px,4vw,48px);overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;padding:10px 4px 22px}
.cf-testimonial-switcher .cf-ts-scroller::-webkit-scrollbar{display:none}
.cf-testimonial-switcher .cf-ts-track{display:flex;gap:12px;width:max-content;margin:0 auto}
.cf-testimonial-switcher .cf-ts-tab{appearance:none;-webkit-appearance:none;margin:0;font:inherit;text-align:left;display:grid;grid-template-columns:48px minmax(0,1fr);column-gap:14px;align-items:center;min-width:15rem;max-width:19rem;padding:14px 22px 14px 14px;border-radius:var(--card-radius,var(--radius,14px));border:1px solid transparent;background:transparent;color:var(--band-ink);cursor:pointer;scroll-snap-align:center;transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,transform .16s ease}
.cf-testimonial-switcher .cf-ts-tab:hover:not(.is-on){background:oklch(from var(--band-ink) l c h / .07);border-color:var(--ts-line)}
.cf-testimonial-switcher .cf-ts-tab:active:not(.is-on){transform:scale(.985)}
.cf-testimonial-switcher .cf-ts-tab:focus-visible{outline:2px solid var(--band-ink);outline-offset:3px}
.cf-testimonial-switcher .cf-ts-tab.is-on{background:var(--card);color:var(--ink);border-color:oklch(from var(--accent) l c h / .45);box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(from var(--ts-shadow) l c h / .22),0 12px 24px -8px oklch(from var(--ts-shadow) l c h / .32)));transform:translateY(-2px);cursor:default}
.cf-testimonial-switcher .cf-ts-avatar{width:48px;height:48px;border-radius:50%;object-fit:cover;object-position:center 30%;display:block;opacity:.72;filter:saturate(.55);transition:opacity .2s ease,filter .2s ease}
.cf-testimonial-switcher .cf-ts-tab:hover .cf-ts-avatar,.cf-testimonial-switcher .cf-ts-tab.is-on .cf-ts-avatar{opacity:1;filter:none}
.cf-testimonial-switcher .cf-ts-initials{display:grid;place-items:center;background:var(--secondary);color:var(--secondary-ink);font-size:.9375rem;font-weight:800;line-height:1;opacity:1;filter:none}
.cf-testimonial-switcher .cf-ts-who{display:grid;gap:2px;min-width:0}
.cf-testimonial-switcher .cf-ts-name{font-size:1.0625rem;font-weight:800;line-height:1.25;color:var(--ts-soft)}
.cf-testimonial-switcher .cf-ts-role{font-size:.9375rem;font-weight:500;line-height:1.35;color:var(--ts-muted)}
.cf-testimonial-switcher .cf-ts-tab:hover:not(.is-on) .cf-ts-name{color:var(--band-ink)}
.cf-testimonial-switcher .cf-ts-tab.is-on .cf-ts-name{color:var(--ink)}
.cf-testimonial-switcher .cf-ts-tab.is-on .cf-ts-role{color:var(--muted)}
.cf-testimonial-switcher .cf-ts-stage{display:grid;margin-top:clamp(20px,3vw,36px)}
.cf-testimonial-switcher .cf-ts-panel{grid-area:1 / 1;min-width:0;opacity:0;visibility:hidden;transform:translateY(6px);border-radius:var(--radius,12px);transition:opacity .32s var(--ts-ease),transform .32s var(--ts-ease),visibility 0s linear .32s}
.cf-testimonial-switcher .cf-ts-panel.is-on{opacity:1;visibility:visible;transform:none;transition:opacity .36s var(--ts-ease) .04s,transform .36s var(--ts-ease) .04s,visibility 0s linear 0s}
.cf-testimonial-switcher .cf-ts-panel:focus-visible{outline:2px solid var(--band-ink);outline-offset:8px}
.cf-testimonial-switcher .cf-ts-dateline{display:flex;align-items:center;gap:16px;margin:0 0 clamp(28px,4vw,44px);font-size:.875rem;font-weight:800;line-height:1.3;letter-spacing:.08em;text-transform:uppercase;color:var(--ts-muted)}
.cf-testimonial-switcher .cf-ts-dateline::before,.cf-testimonial-switcher .cf-ts-dateline::after{content:"";flex:1 1 2rem;height:1px;background:var(--ts-line)}
.cf-testimonial-switcher .cf-ts-dateline span{flex:0 1 auto;max-width:36rem;text-align:center;text-wrap:balance}
.cf-testimonial-switcher .cf-ts-body{display:grid;grid-template-columns:minmax(0,6fr) 1px minmax(0,7fr);gap:clamp(24px,4vw,56px);align-items:start}
.cf-testimonial-switcher .cf-ts-panel.is-single .cf-ts-body{grid-template-columns:minmax(0,1fr);max-width:46rem;margin:0 auto}
.cf-testimonial-switcher .cf-ts-rule{align-self:stretch;background:var(--ts-line)}
.cf-testimonial-switcher .cf-ts-rows{container-type:inline-size;margin:0;display:grid;gap:28px;min-width:0}
.cf-testimonial-switcher .cf-ts-row{display:grid;gap:10px}
.cf-testimonial-switcher .cf-ts-row dt{font-size:.9375rem;font-weight:600;line-height:1.4;color:var(--ts-muted)}
.cf-testimonial-switcher .cf-ts-row dd{margin:0;display:grid;gap:10px;justify-items:start;min-width:0}
.cf-testimonial-switcher .cf-ts-chip{display:inline-block;max-width:100%;padding:5px 12px;border-radius:999px;background:oklch(from var(--band-ink) l c h / .12);color:var(--band-ink);font-size:.875rem;font-weight:800;line-height:1.5}
.cf-testimonial-switcher .cf-ts-chip svg{display:inline-block;width:16px;height:16px;vertical-align:-.2em;margin-inline-end:.45em}
.cf-testimonial-switcher .cf-ts-line{margin:0;max-width:44ch;font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5;color:var(--ts-muted);text-wrap:pretty}
@container (min-width: 26rem){.cf-testimonial-switcher .cf-ts-row{grid-template-columns:10.5rem minmax(0,1fr);column-gap:16px}.cf-testimonial-switcher .cf-ts-row dt{padding-top:6px;text-wrap:balance}}
.cf-testimonial-switcher .cf-ts-quote{margin:0;min-width:0}
.cf-testimonial-switcher .cf-ts-qmark{display:block;width:32px;height:32px;margin-bottom:16px;color:var(--ts-muted);color:oklch(from var(--accent-fill,var(--accent)) max(l, .72) c h)}
.cf-testimonial-switcher .cf-ts-quote blockquote{margin:0}
.cf-testimonial-switcher .cf-ts-quote blockquote p{margin:0;font-size:clamp(1.3125rem,2vw,1.75rem);line-height:1.38;font-weight:500;letter-spacing:-.01em;color:var(--ts-quiet);text-wrap:pretty}
.cf-testimonial-switcher .cf-ts-key{font-weight:700;color:var(--band-ink)}
.cf-testimonial-switcher .cf-ts-cite{display:block;margin-top:20px;font-size:.9375rem;line-height:1.4;font-weight:500;color:var(--ts-muted)}
.cf-testimonial-switcher .cf-ts-cite strong{color:var(--band-ink);font-weight:800}
.cf-testimonial-switcher .cf-ts-cta{margin-top:clamp(40px,5vw,64px);display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.cf-testimonial-switcher .cf-ts-btn{display:inline-flex;align-items:center;justify-content:center;min-height:64px;min-width:min(100%,20rem);padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;color:var(--button-ink,var(--cta-ink));text-shadow:var(--button-text-shadow,none);background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l + .04) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .02) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--ts-shadow) l c h / .4),0 8px 16px -6px oklch(from var(--ts-shadow) l c h / .5));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-testimonial-switcher .cf-ts-btn:hover:not(:disabled),.cf-testimonial-switcher .cf-ts-btn.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta)) calc(l - .01) c h),oklch(from var(--button-bg-2,var(--cta-2)) calc(l - .07) c h));transform:translateY(-1px);box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta)) calc(l + .14) c h / .7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--ts-shadow) l c h / .45),0 10px 20px -6px oklch(from var(--ts-shadow) l c h / .58)}
.cf-testimonial-switcher .cf-ts-btn:active:not(:disabled),.cf-testimonial-switcher .cf-ts-btn.is-active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta)) calc(l - .22) c h / .55),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta)) calc(l - .16) c h),0 1px 2px oklch(from var(--ts-shadow) l c h / .35)}
.cf-testimonial-switcher .cf-ts-btn:focus-visible{outline:3px solid var(--band-ink);outline-offset:3px}
.cf-testimonial-switcher .cf-ts-btn:disabled{background:var(--secondary);color:var(--secondary-ink);text-shadow:none;box-shadow:none;cursor:not-allowed;transform:none}
.cf-testimonial-switcher .cf-ts-note{margin:0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--ts-muted);text-wrap:pretty}
.cf-testimonial-switcher .cf-ts-note a{color:var(--band-ink);text-decoration:underline;text-decoration-color:oklch(from var(--band-ink) l c h / .45);text-underline-offset:.18em}
.cf-testimonial-switcher .cf-ts-note a:hover{text-decoration-color:currentColor}
.cf-testimonial-switcher .cf-ts-note a:focus-visible{outline:2px solid var(--band-ink);outline-offset:3px;border-radius:4px}
@media (max-width: 760px){.cf-testimonial-switcher .cf-ts-body{grid-template-columns:minmax(0,1fr);gap:28px}.cf-testimonial-switcher .cf-ts-quote{order:-1}.cf-testimonial-switcher .cf-ts-rule{order:0;height:1px;width:100%}.cf-testimonial-switcher .cf-ts-rows{order:1}}
@media (max-width: 640px){.cf-testimonial-switcher .cf-ts-scroller{margin-top:28px;margin-inline:calc(var(--ts-gutter) * -1);padding-inline:var(--ts-gutter);scroll-snap-type:x mandatory;scroll-padding-inline:var(--ts-gutter)}.cf-testimonial-switcher .cf-ts-track{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(6.5rem,1fr);gap:8px;width:100%}.cf-testimonial-switcher .cf-ts-tab{grid-template-columns:minmax(0,1fr);justify-items:center;row-gap:8px;min-width:0;max-width:none;padding:14px 8px 12px;text-align:center;scroll-snap-align:start}.cf-testimonial-switcher .cf-ts-who{justify-items:center}.cf-testimonial-switcher .cf-ts-name{font-size:1rem;text-wrap:balance}.cf-testimonial-switcher .cf-ts-role{display:none}.cf-testimonial-switcher .cf-ts-dateline{margin-bottom:28px}.cf-testimonial-switcher .cf-ts-dateline::before,.cf-testimonial-switcher .cf-ts-dateline::after{display:none}.cf-testimonial-switcher .cf-ts-btn{width:100%;padding:14px 20px;text-wrap:balance}}
@media (prefers-reduced-motion: reduce){.cf-testimonial-switcher .cf-ts-tab,.cf-testimonial-switcher .cf-ts-tab.is-on,.cf-testimonial-switcher .cf-ts-avatar,.cf-testimonial-switcher .cf-ts-panel,.cf-testimonial-switcher .cf-ts-panel.is-on,.cf-testimonial-switcher .cf-ts-btn{transition:none}.cf-testimonial-switcher .cf-ts-panel,.cf-testimonial-switcher .cf-ts-tab.is-on,.cf-testimonial-switcher .cf-ts-tab:active:not(.is-on),.cf-testimonial-switcher .cf-ts-btn:hover:not(:disabled),.cf-testimonial-switcher .cf-ts-btn.is-hover:not(:disabled),.cf-testimonial-switcher .cf-ts-btn:active:not(:disabled),.cf-testimonial-switcher .cf-ts-btn.is-active:not(:disabled){transform:none}}
`;
pieces/proof/testimonial-switcher/specimen.tsx 95 lines
import __studioImage25484baa from "../assets/6c2400f537294f7e.webp";
import __studioImagee085dee2 from "../assets/6b824915ea1592c6.webp";
import __studioImage8df4e769 from "../assets/d00aa189449de320.webp";
import React from "react";
import { TestimonialSwitcher } from "../testimonial-switcher";
export const states = ["default", "hover", "active", "disabled"];
type SpecimenState = "default" | "hover" | "active" | "disabled";
export default function TestimonialSwitcherSpecimen({ state = "default" }: { state?: SpecimenState }) {
return (
<TestimonialSwitcher
state={state}
headline="Busy people. Real strength."
subline="Tap a name to read how their first 90 days with a Summit Strength coach went."
tabsLabel="Summit Strength client stories"
defaultIndex={1}
actionLabel="Start my Summit Strength plan"
actionNote="or keep reading to see how coaching works"
noteHref="#how-it-works"
people={[
{
name: "Dana R.",
role: "Nurse, night shifts",
image: __studioImage25484baa,
dateline: "Denver, CO \u00b7 Week 12",
rows: [
{
label: "Favourite part",
chip: "Sunday check-in call",
icon: "chat",
line: "Fifteen minutes with my coach every Sunday kept me honest all week.",
},
{
label: "Result after 90 days",
chip: "Deadlift up to 135 lb",
icon: "trend",
line: "I started on the empty bar. Now I pull 135 with clean form.",
},
],
quote:
"I used to dread the gym after a twelve-hour shift. Now my 30-minute Summit sessions are the part of the week I protect first.",
keyPhrase: "the part of the week I protect first",
},
{
name: "Marcus T.",
role: "Dad of three, desk job",
image: __studioImagee085dee2,
dateline: "Columbus, OH \u00b7 Week 12",
rows: [
{
label: "Favourite part",
chip: "30-minute home plans",
icon: "clock",
line: "Every session fits between school drop-off and my first meeting.",
},
{
label: "Result after 90 days",
chip: "Down two belt notches",
icon: "trend",
line: "My back stopped aching on long workdays by week six.",
},
],
quote:
"I'd tried every app out there. Having a real coach adjust my plan each week is what finally made strength training stick.",
keyPhrase: "a real coach adjust my plan each week",
},
{
name: "Priya S.",
role: "Teacher, first-time lifter",
image: __studioImage8df4e769,
dateline: "Austin, TX \u00b7 Week 12",
rows: [
{
label: "Favourite part",
chip: "Form video reviews",
icon: "video",
line: "I film a set and my coach replies with fixes the same day.",
},
{
label: "Result after 90 days",
chip: "Squat 95 lb for five",
icon: "dumbbell",
line: "On day one I didn't know how to load a bar.",
},
],
quote:
"I was scared of the weights room. Summit showed me exactly what to do, so now I walk in with a plan and actually enjoy it.",
keyPhrase: "now I walk in with a plan",
},
]}
/>
);
}
| Name | Type | Details |
|---|---|---|
headline OptionalTestimonialSwitcher |
React.ReactNode |
|
subline OptionalTestimonialSwitcher |
React.ReactNode |
|
people OptionalTestimonialSwitcher |
TestimonialSwitcherPerson[] |
|
defaultIndex OptionalTestimonialSwitcher |
number |
|
tabsLabel OptionalTestimonialSwitcher |
string |
|
counterLabel OptionalTestimonialSwitcher |
string |
|
actionLabel OptionalTestimonialSwitcher |
string |
|
actionNote OptionalTestimonialSwitcher |
React.ReactNode |
|
noteHref OptionalTestimonialSwitcher |
string |
|
href OptionalTestimonialSwitcher |
string |
|
onAction OptionalTestimonialSwitcher |
() => void |
|
disabled OptionalTestimonialSwitcher |
boolean |
|
state OptionalTestimonialSwitcher |
"default" | "hover" | "active" | "disabled" |
|
className OptionalTestimonialSwitcher |
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.
--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
This piece reads no image slots.
-
6b824915ea1592c6.webp
image/webp · 124 KB
-
6c2400f537294f7e.webp
image/webp · 65.9 KB
-
d00aa189449de320.webp
image/webp · 84.9 KB