Testimonial Grid 1
Results-first proof band: one dominant featured story, result-led story cards with an audience filter,
Use it in a prompt
Use proof/testimonial-grid 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-grid.tsx. - Import it and pass your copy and images (Props tab):
import { TestimonialGrid } from "@/components/funneldna/proof/testimonial-grid"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/proof/testimonial-grid/component.tsx 489 lines
// layout: bento-grid
// Results-first proof band: one dominant featured story, result-led story cards with an audience filter,
// and a closing tile that turns the proof into the order click.
import React from 'react';
import { Check, ChevronLeft, ChevronRight, Quote, ShieldCheck } from 'lucide-react';
import { motion, useReducedMotion } from 'motion/react';
export type TestimonialStory = {
/** Display name, e.g. a first name, last initial and city */
name: string;
/** Short role shown under the name */
role?: string;
/** Audience group used by the filter row (e.g. Coaches) */
audience?: string;
/** The bold result headline the card leads with */
result: React.ReactNode;
/** Short quote in the customer's own words (quote marks are added) */
quote: React.ReactNode;
/** Optional photo URL; initials are shown when absent */
photo?: string;
/** Photo alt text; falls back to the name */
photoAlt?: string;
};
export type TestimonialGridImage = { src: string; alt?: string };
export type TestimonialGridProps = {
/** Proof stories, 4 to 8 recommended. Empty by default: the block renders nothing without real stories. */
stories?: TestimonialStory[];
/** Band headline */
headline?: string;
/** Phrase inside the headline that gets the marker stroke */
highlight?: string;
/** Supporting line under the headline */
lead?: React.ReactNode;
/** Shows the audience filter when stories carry two or more audiences */
showFilters?: boolean;
/** Label of the filter chip that shows every story */
allLabel?: string;
/** Accessible name of the filter chip group */
filterLabel?: string;
/** Screen-reader status after filtering; placeholders {count} and {total} */
showingLabel?: string;
/** Accessible name of the story list */
listLabel?: string;
/** Closing headline in the action tile, set in the band's text colour */
actionHeadline?: React.ReactNode;
/** Short reason to act, under the closing headline */
actionText?: React.ReactNode;
/** Button's first line */
actionLabel?: string;
/** Price shown on the button's second line */
price?: string;
/** Button second line when a price is set; placeholders {price} and {sublabel} */
priceLine?: string;
/** Button second line (or its {sublabel} part when a price is set) */
actionSublabel?: string;
/** Reassurance line under the button, with a shield icon */
guarantee?: string;
/** Product shots fanned above the action (slots item-1 to item-3) */
itemImages?: TestimonialGridImage[];
/** Navigation destination; the button renders as a link when set */
href?: string;
/** Called on the action click */
onAction?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
disabled?: boolean;
/** Forces a button state for previews */
state?: 'default' | 'hover' | 'active' | 'disabled';
/** Accessible label of the phone carousel's previous button */
prevLabel?: string;
/** Accessible label of the phone carousel's next button */
nextLabel?: string;
/** Phone carousel position; placeholders {current} and {total} */
counterLabel?: string;
/** Root class for page-level placement */
className?: string;
};
export function TestimonialGrid(props: TestimonialGridProps) {
const {
stories = [],
headline = 'Here’s what changed for them',
highlight = 'what changed',
lead = 'The result first. Then the story in their own words.',
showFilters = true,
allLabel = 'All stories',
filterLabel = 'Filter stories by audience',
showingLabel = 'Showing {count} of {total} stories',
listLabel = 'Customer stories',
actionHeadline = 'Your story starts with one download.',
actionText,
actionLabel = 'Send Me The Kit',
price,
priceLine = '{price} · {sublabel}',
actionSublabel = 'Instant download',
guarantee,
itemImages = [],
href,
onAction,
disabled = false,
state = 'default',
prevLabel = 'Previous story',
nextLabel = 'Next story',
counterLabel = '{current} of {total}',
className,
} = props;
const headingId = React.useId();
const reduce = useReducedMotion();
const railRef = React.useRef<HTMLUListElement>(null);
const [audience, setAudience] = React.useState<string | null>(null);
const [touched, setTouched] = React.useState(false);
const [railIndex, setRailIndex] = React.useState(0);
const groups = React.useMemo(() => {
const seen: string[] = [];
stories.forEach((story) => {
const group = story.audience?.trim();
if (group && !seen.includes(group)) seen.push(group);
});
return seen;
}, [stories]);
const active = audience && groups.includes(audience) ? audience : null;
const visible = active ? stories.filter((story) => story.audience?.trim() === active) : stories;
if (!visible.length) return null;
const photoAt = visible.findIndex((story) => Boolean(story.photo));
const featuredAt = photoAt >= 0 ? photoAt : 0;
const featured = visible[featuredAt];
const rest = visible.filter((_, i) => i !== featuredAt);
const plan = bentoPlan(rest.length);
const viewKey = active ?? 'all';
const animateIn = touched && !reduce;
const isDisabled = disabled || state === 'disabled';
const subline = price ? fill(priceLine, { price, sublabel: actionSublabel }) : actionSublabel;
const reveal = (i: number) => ({
initial: animateIn ? { opacity: 0.35, y: 14 } : (false as const),
animate: { opacity: 1, y: 0 },
transition: { duration: 0.36, delay: Math.min(i * 0.05, 0.25), ease: EASE },
});
const choose = (next: string | null) => {
setAudience(next);
setTouched(true);
setRailIndex(0);
railRef.current?.scrollTo({ left: 0 });
};
const onRailScroll = () => {
const el = railRef.current;
if (!el) return;
const kids = Array.from(el.children) as HTMLElement[];
if (el.scrollLeft > 0 && el.scrollLeft + el.clientWidth >= el.scrollWidth - 4) {
setRailIndex(kids.length - 1);
return;
}
const pad = railPad(el);
let best = 0;
let distance = Infinity;
kids.forEach((kid, i) => {
const d = Math.abs(kid.offsetLeft - pad - el.scrollLeft);
if (d < distance) {
distance = d;
best = i;
}
});
setRailIndex(best);
};
const goTo = (i: number) => {
const el = railRef.current;
const kid = el?.children[i] as HTMLElement | undefined;
if (!el || !kid) return;
el.scrollTo({ left: kid.offsetLeft - railPad(el), behavior: reduce ? 'auto' : 'smooth' });
setRailIndex(i);
};
const buttonBody = (
<>
<span className='cf-tg-btn-main'>{actionLabel}</span>
{subline ? <span className='cf-tg-btn-sub'>{subline}</span> : null}
</>
);
const button =
href && !isDisabled ? (
<a className='cf-tg-btn' href={href} data-state={state} onClick={onAction}>
{buttonBody}
</a>
) : (
<button type='button' className='cf-tg-btn' data-state={state} disabled={isDisabled} onClick={onAction}>
{buttonBody}
</button>
);
return (
<section className={['cf-testimonial-grid', className].filter(Boolean).join(' ')} aria-labelledby={headingId}>
<style>{CSS}</style>
<div className='cf-tg-inner'>
<header className='cf-tg-head'>
<h2 id={headingId} className='cf-tg-title'>
{withMarker(headline, highlight)}
</h2>
{lead ? <p className='cf-tg-lead'>{lead}</p> : null}
{showFilters && groups.length > 1 ? (
<div className='cf-tg-filters' role='group' aria-label={filterLabel}>
{[null, ...groups].map((group) => {
const count = group ? stories.filter((story) => story.audience?.trim() === group).length : stories.length;
return (
<button
key={group ?? '__all'}
type='button'
className='cf-tg-chip'
aria-pressed={group === active}
onClick={() => choose(group)}
>
<span>{group ?? allLabel}</span>
<span className='cf-tg-count' aria-hidden='true'>
{count}
</span>
</button>
);
})}
</div>
) : null}
<p className='cf-tg-sr' aria-live='polite'>
{touched ? fill(showingLabel, { count: visible.length, total: stories.length }) : ''}
</p>
</header>
<div
className='cf-tg-grid'
style={{ '--a-col': plan.actionCol, '--a-row': plan.actionRow, '--a-tab': plan.tabletAction } as React.CSSProperties}
>
<motion.div key={'feat-' + viewKey} className='cf-tg-feat' {...reveal(0)}>
<article className='cf-tg-card cf-tg-card--feat'>
{featured.photo ? (
<div className='cf-tg-photo'>
<img src={featured.photo} alt={featured.photoAlt ?? featured.name} decoding='async' />
</div>
) : null}
<div className='cf-tg-feat-body'>
{!featured.photo ? <Quote className='cf-tg-qicon' aria-hidden='true' /> : null}
<h3 className='cf-tg-result cf-tg-result--feat'>
<span className='cf-tg-tick' aria-hidden='true'>
<Check strokeWidth={3} />
</span>
<span>{featured.result}</span>
</h3>
<blockquote className='cf-tg-quote'>
<p>“{featured.quote}”</p>
</blockquote>
<Person story={featured} showAvatar={!featured.photo} />
</div>
</article>
</motion.div>
{rest.length ? (
<ul ref={railRef} className='cf-tg-rest' role='list' aria-label={listLabel} onScroll={onRailScroll}>
{rest.map((story, i) => (
<motion.li
key={viewKey + '-' + i + '-' + story.name}
className='cf-tg-cell'
data-wide={plan.restSpan === 2 ? '' : undefined}
{...reveal(i + 1)}
>
<article className='cf-tg-card'>
<h3 className='cf-tg-result'>{story.result}</h3>
<blockquote className='cf-tg-quote'>
<p>“{story.quote}”</p>
</blockquote>
<Person story={story} showAvatar />
</article>
</motion.li>
))}
</ul>
) : null}
{rest.length > 1 ? (
<div className='cf-tg-railnav'>
<button
type='button'
className='cf-tg-railbtn'
aria-label={prevLabel}
disabled={railIndex <= 0}
onClick={() => goTo(railIndex - 1)}
>
<ChevronLeft aria-hidden='true' />
</button>
<span className='cf-tg-counter' aria-live='polite'>
{fill(counterLabel, { current: railIndex + 1, total: rest.length })}
</span>
<button
type='button'
className='cf-tg-railbtn'
aria-label={nextLabel}
disabled={railIndex >= rest.length - 1}
onClick={() => goTo(railIndex + 1)}
>
<ChevronRight aria-hidden='true' />
</button>
</div>
) : null}
<div className='cf-tg-act'>
<div className='cf-tg-act-card'>
<div className='cf-tg-act-in'>
{itemImages.length ? (
<div className='cf-tg-fan'>
{itemImages.slice(0, 3).map((image, i) => (
<img key={i} src={image.src} alt={image.alt ?? ''} loading='lazy' decoding='async' />
))}
</div>
) : null}
<div className='cf-tg-act-copy'>
{actionHeadline ? <h3 className='cf-tg-act-title'>{actionHeadline}</h3> : null}
{actionText ? <p className='cf-tg-act-text'>{actionText}</p> : null}
{button}
{guarantee ? (
<p className='cf-tg-guar'>
<ShieldCheck aria-hidden='true' />
{guarantee}
</p>
) : null}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
);
}
export default TestimonialGrid;
function Person({ story, showAvatar }: { story: TestimonialStory; showAvatar: boolean }) {
return (
<footer className='cf-tg-who'>
{showAvatar ? (
<span className='cf-tg-ava' aria-hidden='true'>
{story.photo ? <img src={story.photo} alt='' loading='lazy' decoding='async' /> : initials(story.name)}
</span>
) : null}
<span className='cf-tg-id'>
<cite className='cf-tg-name'>{story.name}</cite>
{story.role ? <span className='cf-tg-role'>{story.role}</span> : null}
</span>
</footer>
);
}
const EASE: [number, number, number, number] = [0.2, 0.7, 0.2, 1];
// Desktop is a 3-column bento: the featured story holds column 1 across two rows, the closing tile fills whatever the last row leaves.
function bentoPlan(rest: number) {
let actionCol = 2;
let actionRow = 1;
let restSpan = 1;
if (rest >= 4) {
const left = (rest - 4) % 3;
actionCol = left === 0 ? 3 : 3 - left;
} else if (rest === 3) {
actionCol = 1;
} else if (rest === 1) {
restSpan = 2;
} else if (rest === 0) {
actionRow = 2;
}
return { actionCol, actionRow, restSpan, tabletAction: rest % 2 === 1 ? 1 : 2 };
}
// Left padding of the phone rail, so snap positions line up with the first card.
function railPad(el: HTMLElement) {
return parseFloat(getComputedStyle(el).paddingLeft) || 0;
}
function fill(template: string, values: Record<string, string | number>) {
return Object.keys(values).reduce((text, key) => text.split('{' + key + '}').join(String(values[key])), template);
}
function initials(name: string) {
return name
.split(',')[0]
.trim()
.split(' ')
.filter(Boolean)
.slice(0, 2)
.map((word) => word.charAt(0).toUpperCase())
.join('');
}
function withMarker(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='cf-tg-mark'>{phrase}</span>
{text.slice(at + phrase.length)}
</>
);
}
// Theme: every colour, face, radius and shadow reads the theme tokens (theme-contract.md). Band text tints blend
// --band-ink with --band in oklab, because the two can carry different hues. Filter chips and rail arrows read the
// secondary-button role tokens (--button-2-bg/-ink/-border), falling back to the approved card look; the closing
// tile reads --card-radius, and the card hover lift reads --card-shadow.
const CSS = `
.cf-testimonial-grid{--tg-gap:clamp(14px,1.6vw,20px);--tg-radius:var(--card-radius,var(--radius,14px));--tg-line:oklch(from var(--ink,#101828) l c h / 0.13);--tg-marker:color-mix(in oklch,var(--marker,#fae37c) 78%,transparent);--tg-shadow:var(--shadow,oklch(0.22 0.03 260));position:relative;overflow-x:clip;padding:clamp(56px,8vw,104px) 20px;background:color-mix(in oklch,var(--ink,#101828) 3%,var(--surface,#ffffff));color:var(--ink,#101828);font-family:var(--font-body,system-ui,sans-serif)}
.cf-testimonial-grid *,.cf-testimonial-grid *::before,.cf-testimonial-grid *::after{box-sizing:border-box}
.cf-testimonial-grid .cf-tg-inner{max-width:1200px;margin:0 auto}
.cf-testimonial-grid .cf-tg-head{max-width:880px;margin:0 auto clamp(28px,4vw,48px);text-align:center}
.cf-testimonial-grid .cf-tg-title{margin:0 0 clamp(12px,1.3vw,18px);font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.025em);font-size:clamp(2rem,1.15rem + 3.3vw,3.5rem);line-height:1.04;color:var(--ink,#101828);text-wrap:balance}
.cf-testimonial-grid .cf-tg-mark{padding:0 .1em;margin:0 -.04em;border-radius:.18em .4em .3em .22em;background-image:linear-gradient(178deg,transparent 50%,var(--tg-marker) 50%,var(--tg-marker) 92%,transparent 92%);-webkit-box-decoration-break:clone;box-decoration-break:clone}
.cf-testimonial-grid .cf-tg-lead{margin:0 auto;max-width:60ch;font-size:clamp(1.0625rem,.98rem + .4vw,1.25rem);font-weight:500;line-height:1.5;color:var(--muted,#475467);text-wrap:pretty}
.cf-testimonial-grid .cf-tg-filters{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:clamp(22px,2.6vw,30px)}
.cf-testimonial-grid .cf-tg-chip{appearance:none;display:inline-flex;align-items:center;gap:.6rem;min-height:46px;margin:0;padding:0 .55rem 0 1.15rem;border:1px solid var(--button-2-border,var(--tg-line));border-radius:999px;background:var(--button-2-bg,var(--card,#ffffff));color:var(--button-2-ink,var(--ink,#101828));font:inherit;font-size:1rem;font-weight:700;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / 0.18));transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .12s ease}
.cf-testimonial-grid .cf-tg-chip:hover{border-color:oklch(from var(--ink,#101828) l c h / 0.3);background:color-mix(in oklch,var(--ink,#101828) 4%,var(--button-2-bg,var(--card,#ffffff)))}
.cf-testimonial-grid .cf-tg-chip:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:3px}
.cf-testimonial-grid .cf-tg-chip[aria-pressed='true']{background:var(--ink,#101828);border-color:var(--ink,#101828);color:var(--card,#ffffff);box-shadow:var(--shadow-md,0 1px 2px oklch(0.22 0.03 260 / 0.22),0 4px 10px -2px oklch(0.22 0.03 260 / 0.2))}
.cf-testimonial-grid .cf-tg-chip[aria-pressed='true']:hover{background:oklch(from var(--ink,#101828) calc(l + 0.04) c h);border-color:oklch(from var(--ink,#101828) calc(l + 0.04) c h)}
.cf-testimonial-grid .cf-tg-count{display:inline-grid;place-items:center;min-width:1.9rem;height:1.9rem;padding:0 .5rem;border-radius:999px;background:color-mix(in oklch,var(--ink,#101828) 7%,var(--card,#ffffff));color:var(--ink,#101828);font-size:.875rem;font-weight:800;font-variant-numeric:tabular-nums}
.cf-testimonial-grid .cf-tg-chip[aria-pressed='true'] .cf-tg-count{background:color-mix(in oklch,var(--card,#ffffff) 18%,var(--ink,#101828));color:var(--card,#ffffff)}
.cf-testimonial-grid .cf-tg-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.cf-testimonial-grid .cf-tg-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row dense;gap:var(--tg-gap);align-items:stretch}
.cf-testimonial-grid .cf-tg-rest{display:contents;list-style:none;margin:0;padding:0}
.cf-testimonial-grid .cf-tg-feat{grid-column:1;grid-row:1 / span 2;display:flex;min-width:0;container:tg-feat / inline-size}
.cf-testimonial-grid .cf-tg-cell{grid-column:span 1;display:flex;min-width:0}
.cf-testimonial-grid .cf-tg-cell[data-wide]{grid-column:span 2}
.cf-testimonial-grid .cf-tg-act{grid-column:span var(--a-col,1);grid-row:span var(--a-row,1);display:flex;min-width:0;container:tg-act / inline-size}
.cf-testimonial-grid .cf-tg-railnav{display:none}
.cf-testimonial-grid .cf-tg-card{flex:1;display:flex;flex-direction:column;min-width:0;margin:0;padding:clamp(20px,2vw,26px);background:var(--card,#ffffff);color:var(--ink,#101828);border:1px solid var(--card-border,color-mix(in oklch,var(--ink,#101828) 12%,transparent));border-radius:var(--tg-radius);box-shadow:var(--card-shadow,var(--shadow-md,0 1px 2px oklch(0.22 0.03 260 / 0.22),0 4px 10px -2px oklch(0.22 0.03 260 / 0.2)));transition:transform .25s cubic-bezier(.2,.7,.2,1),box-shadow .25s ease}
.cf-testimonial-grid .cf-tg-result{margin:0 0 .8rem;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.015em);font-size:clamp(1.25rem,1.05rem + .55vw,1.5rem);line-height:1.15;color:var(--ink,#101828);text-wrap:balance}
.cf-testimonial-grid .cf-tg-quote{margin:0}
.cf-testimonial-grid .cf-tg-quote p{margin:0;font-size:1.0625rem;line-height:1.55;color:color-mix(in oklch,var(--ink,#101828) 84%,var(--card,#ffffff));text-wrap:pretty}
.cf-testimonial-grid .cf-tg-who{display:flex;align-items:center;gap:.75rem;margin-top:auto;padding-top:1.25rem}
.cf-testimonial-grid .cf-tg-ava{flex:0 0 auto;display:grid;place-items:center;width:46px;height:46px;border-radius:50%;overflow:hidden;background:var(--accent-fill,var(--accent,#2563eb));color:var(--accent-fill-ink,var(--card,#ffffff));font-family:var(--font-display,inherit);font-weight:800;font-size:1rem;letter-spacing:.02em}
.cf-testimonial-grid .cf-tg-ava img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 25%}
.cf-testimonial-grid .cf-tg-id{display:flex;flex-direction:column;gap:.15rem;min-width:0}
.cf-testimonial-grid .cf-tg-name{font-style:normal;font-weight:800;font-size:1rem;line-height:1.25;color:var(--ink,#101828)}
.cf-testimonial-grid .cf-tg-role{font-size:.9375rem;line-height:1.3;color:var(--muted,#475467)}
.cf-testimonial-grid .cf-tg-card--feat{padding:clamp(12px,1.1vw,14px)}
.cf-testimonial-grid .cf-tg-photo{position:relative;overflow:hidden;aspect-ratio:4 / 3;border-radius:calc(var(--tg-radius) * .7);background:color-mix(in oklch,var(--ink,#101828) 6%,var(--card,#ffffff))}
.cf-testimonial-grid .cf-tg-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 30%;transition:transform .6s cubic-bezier(.2,.7,.2,1)}
.cf-testimonial-grid .cf-tg-feat-body{display:flex;flex-direction:column;flex:1;padding:clamp(18px,1.8vw,22px) clamp(8px,1vw,12px) clamp(8px,1vw,12px)}
.cf-testimonial-grid .cf-tg-qicon{width:44px;height:44px;margin:0 0 .75rem;color:var(--accent-fill,var(--accent,#2563eb))}
.cf-testimonial-grid .cf-tg-result--feat{display:flex;align-items:flex-start;gap:.5rem;margin-bottom:1rem;font-size:clamp(1.625rem,1.2rem + 1.3vw,2.25rem);line-height:1.08}
.cf-testimonial-grid .cf-tg-result--feat > span:last-child{min-width:0;text-wrap:balance}
.cf-testimonial-grid .cf-tg-tick{flex:0 0 auto;display:grid;place-items:center;width:.82em;height:.82em;margin-top:.13em;border-radius:50%;background:var(--success,#1a7f3c);color:var(--tick-glyph,#ffffff);box-shadow:inset 0 -2px 0 oklch(from var(--success,#1a7f3c) calc(l - 0.1) c h),var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / 0.18))}
.cf-testimonial-grid .cf-tg-tick > svg{display:block;width:60%;height:60%}
.cf-testimonial-grid .cf-tg-card--feat .cf-tg-quote p{font-size:clamp(1.0625rem,1rem + .3vw,1.1875rem)}
.cf-testimonial-grid .cf-tg-act-card{flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0;padding:clamp(20px,2.2vw,28px);border-radius:var(--card-radius,var(--radius,14px));background:var(--band,#1b2a4a);color:var(--band-ink,#ffffff);box-shadow:var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32))}
.cf-testimonial-grid .cf-tg-act-in{display:flex;flex-direction:column;align-items:center;gap:clamp(18px,2vw,24px)}
.cf-testimonial-grid .cf-tg-act-copy{width:100%;max-width:440px;text-align:center}
.cf-testimonial-grid .cf-tg-fan{display:flex;justify-content:center;align-items:flex-end;width:100%;max-width:360px;padding:10px 0 6px}
.cf-testimonial-grid .cf-tg-fan img{position:relative;width:36%;margin:0 -3%;aspect-ratio:1;object-fit:cover;border-radius:12px;filter:drop-shadow(0 2px 2px oklch(from var(--tg-shadow) calc(l - 0.1) c h / 0.5)) drop-shadow(0 10px 12px oklch(from var(--tg-shadow) calc(l - 0.1) c h / 0.35));transition:transform .35s cubic-bezier(.2,.7,.2,1)}
.cf-testimonial-grid .cf-tg-fan img:nth-child(1){transform:rotate(-8deg) translateY(8px)}
.cf-testimonial-grid .cf-tg-fan img:nth-child(2){z-index:2;transform:translateY(-6px) scale(1.06)}
.cf-testimonial-grid .cf-tg-fan img:nth-child(3){transform:rotate(8deg) translateY(8px)}
.cf-testimonial-grid .cf-tg-act-title{margin:0 0 .55rem;font-family:var(--font-display,inherit);font-weight:var(--display-weight,800);text-transform:var(--display-case,none);letter-spacing:var(--display-tracking,-0.015em);font-size:clamp(1.3125rem,1.1rem + .6vw,1.5rem);line-height:1.15;color:var(--band-ink,#ffffff);text-wrap:balance}
.cf-testimonial-grid .cf-tg-act-text{margin:0 0 1.1rem;font-size:1.0625rem;line-height:1.5;color:color-mix(in oklab,var(--band-ink,#ffffff) 88%,var(--band,#1b2a4a));text-wrap:pretty}
.cf-testimonial-grid .cf-tg-btn{--tg-b:var(--button-bg,var(--cta,#d4351c));--tg-b2:var(--button-bg-2,var(--cta-2,#b02a15));position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.25rem;width:100%;min-height:66px;margin:0;padding:.85rem 1.1rem 1rem;border:1px solid oklch(from var(--tg-b2) calc(l - 0.06) c h);border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--tg-b) calc(l + 0.04) c h),var(--tg-b2));color:var(--button-ink,var(--cta-ink,#ffffff));font-family:var(--button-font,var(--font-display,inherit));text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow,none);cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--tg-b) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--tg-b2) calc(l - 0.12) c h),0 1px 2px oklch(from var(--tg-shadow) calc(l - 0.1) c h / 0.5),0 6px 12px -4px oklch(from var(--tg-shadow) calc(l - 0.1) c h / 0.55));transition:transform .16s cubic-bezier(.2,.7,.2,1),box-shadow .16s ease,background .16s ease}
.cf-testimonial-grid .cf-tg-btn-main{font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.0625rem,.95rem + .45vw,1.25rem);line-height:1.15;letter-spacing:-0.005em;text-wrap:balance}
.cf-testimonial-grid .cf-tg-btn-sub{font-family:var(--font-body,inherit);font-weight:600;font-size:.9375rem;line-height:1.3;letter-spacing:0;text-transform:none;text-wrap:pretty}
.cf-testimonial-grid .cf-tg-btn:hover:not(:disabled),.cf-testimonial-grid .cf-tg-btn[data-state='hover']{background:linear-gradient(oklch(from var(--tg-b) calc(l + 0.07) c h),oklch(from var(--tg-b2) calc(l + 0.03) c h));box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--tg-b) calc(l + 0.16) c h / 0.75),inset 0 -3px 0 oklch(from var(--tg-b2) calc(l - 0.12) c h),0 2px 3px oklch(from var(--tg-shadow) calc(l - 0.1) c h / 0.5),0 10px 18px -6px oklch(from var(--tg-shadow) calc(l - 0.1) c h / 0.6))}
.cf-testimonial-grid .cf-tg-btn:active:not(:disabled),.cf-testimonial-grid .cf-tg-btn[data-state='active']{background:linear-gradient(var(--tg-b2),oklch(from var(--tg-b2) calc(l - 0.03) c h));box-shadow:var(--button-shadow,inset 0 2px 3px oklch(from var(--tg-b2) calc(l - 0.14) c h / 0.6),0 1px 1px oklch(from var(--tg-shadow) calc(l - 0.1) c h / 0.5))}
.cf-testimonial-grid .cf-tg-btn:focus-visible{outline:3px solid var(--band-ink,#ffffff);outline-offset:3px}
.cf-testimonial-grid .cf-tg-btn:disabled,.cf-testimonial-grid .cf-tg-btn[data-state='disabled']{cursor:not-allowed;transform:none;background:var(--secondary,#e7eaf0);border-color:transparent;color:var(--secondary-ink,#101828);text-shadow:none;box-shadow:none}
.cf-testimonial-grid .cf-tg-guar{margin:.75rem 0 0;font-size:.9375rem;font-weight:600;line-height:1.4;color:color-mix(in oklab,var(--band-ink,#ffffff) 88%,var(--band,#1b2a4a));text-wrap:pretty}
.cf-testimonial-grid .cf-tg-guar svg{display:inline-block;width:1.15em;height:1.15em;vertical-align:-.22em;margin-inline-end:.4em;color:var(--band-ink,#ffffff)}
.cf-testimonial-grid .cf-tg-railbtn{display:grid;place-items:center;width:44px;height:44px;margin:0;padding:0;border:1px solid var(--button-2-border,var(--tg-line));border-radius:50%;background:var(--button-2-bg,var(--card,#ffffff));color:var(--button-2-ink,var(--ink,#101828));cursor:pointer;box-shadow:var(--shadow-sm,0 1px 2px oklch(0.22 0.03 260 / 0.18));transition:transform .12s ease,background-color .18s ease}
.cf-testimonial-grid .cf-tg-railbtn svg{width:20px;height:20px}
.cf-testimonial-grid .cf-tg-railbtn:hover:not(:disabled){background:color-mix(in oklch,var(--ink,#101828) 5%,var(--button-2-bg,var(--card,#ffffff)))}
.cf-testimonial-grid .cf-tg-railbtn:focus-visible{outline:3px solid var(--field-focus,var(--accent,#2563eb));outline-offset:2px}
.cf-testimonial-grid .cf-tg-railbtn:disabled{cursor:default;opacity:.4;box-shadow:none}
.cf-testimonial-grid .cf-tg-counter{min-width:4.5rem;text-align:center;font-size:.9375rem;font-weight:700;color:var(--muted,#475467);font-variant-numeric:tabular-nums}
@container tg-feat (min-width:620px){.cf-testimonial-grid .cf-tg-card--feat{flex-direction:row;align-items:stretch;gap:clamp(8px,1.4vw,16px)}.cf-testimonial-grid .cf-tg-card--feat .cf-tg-photo{flex:0 0 44%;aspect-ratio:auto;min-height:320px}.cf-testimonial-grid .cf-tg-card--feat .cf-tg-feat-body{padding:clamp(14px,2vw,24px)}}
@container tg-act (min-width:560px){.cf-testimonial-grid .cf-tg-act-in{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);align-items:start;gap:clamp(20px,3cqi,36px)}.cf-testimonial-grid .cf-tg-act-copy{max-width:none;text-align:left}}
@media (min-width:981px){.cf-testimonial-grid .cf-tg-card--feat .cf-tg-photo{aspect-ratio:auto;flex:1 1 240px;min-height:240px}.cf-testimonial-grid .cf-tg-card--feat .cf-tg-photo + .cf-tg-feat-body{flex:0 0 auto}}
@media (max-width:980px){.cf-testimonial-grid .cf-tg-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cf-testimonial-grid .cf-tg-feat{grid-column:1 / -1;grid-row:auto}.cf-testimonial-grid .cf-tg-cell,.cf-testimonial-grid .cf-tg-cell[data-wide]{grid-column:span 1}.cf-testimonial-grid .cf-tg-act{grid-column:span var(--a-tab,2);grid-row:auto}}
@media (max-width:640px){.cf-testimonial-grid{padding:52px 20px 56px}.cf-testimonial-grid .cf-tg-filters{gap:8px;margin-top:22px}.cf-testimonial-grid .cf-tg-chip{flex:0 0 auto;min-height:44px;gap:.5rem;padding:0 .45rem 0 .95rem;font-size:.9375rem}.cf-testimonial-grid .cf-tg-count{min-width:1.7rem;height:1.7rem;font-size:.8125rem}.cf-testimonial-grid .cf-tg-grid{display:flex;flex-direction:column;gap:16px}.cf-testimonial-grid .cf-tg-rest{position:relative;display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;margin:0 -20px;padding:4px 20px 10px;scroll-padding-inline:20px;scrollbar-width:none}.cf-testimonial-grid .cf-tg-rest::-webkit-scrollbar{display:none}.cf-testimonial-grid .cf-tg-cell{flex:0 0 min(84%,340px);scroll-snap-align:start}.cf-testimonial-grid .cf-tg-cell:only-child{flex-basis:100%}.cf-testimonial-grid .cf-tg-railnav{display:flex;align-items:center;justify-content:center;gap:14px;margin-top:-4px}.cf-testimonial-grid .cf-tg-card{padding:20px}.cf-testimonial-grid .cf-tg-card--feat{padding:12px}}
@media (hover:hover) and (prefers-reduced-motion:no-preference){.cf-testimonial-grid .cf-tg-card:hover{transform:translateY(-3px);box-shadow:var(--card-shadow,var(--shadow-lg,0 2px 4px oklch(0.22 0.03 260 / 0.22),0 12px 24px -8px oklch(0.22 0.03 260 / 0.32)))}.cf-testimonial-grid .cf-tg-card--feat:hover .cf-tg-photo img{transform:scale(1.035)}.cf-testimonial-grid .cf-tg-act-card:hover .cf-tg-fan img:nth-child(1){transform:rotate(-11deg) translate(-6px,6px)}.cf-testimonial-grid .cf-tg-act-card:hover .cf-tg-fan img:nth-child(2){transform:translateY(-10px) scale(1.08)}.cf-testimonial-grid .cf-tg-act-card:hover .cf-tg-fan img:nth-child(3){transform:rotate(11deg) translate(6px,6px)}.cf-testimonial-grid .cf-tg-btn:hover:not(:disabled){transform:translateY(-2px)}}
@media (prefers-reduced-motion:no-preference){.cf-testimonial-grid .cf-tg-btn[data-state='hover']{transform:translateY(-2px)}.cf-testimonial-grid .cf-tg-btn:active:not(:disabled),.cf-testimonial-grid .cf-tg-btn[data-state='active']{transform:translateY(1px)}.cf-testimonial-grid .cf-tg-chip:active{transform:translateY(1px)}.cf-testimonial-grid .cf-tg-railbtn:active:not(:disabled){transform:scale(.94)}}
@media (prefers-reduced-motion:reduce){.cf-testimonial-grid .cf-tg-card,.cf-testimonial-grid .cf-tg-photo img,.cf-testimonial-grid .cf-tg-fan img,.cf-testimonial-grid .cf-tg-btn,.cf-testimonial-grid .cf-tg-chip,.cf-testimonial-grid .cf-tg-railbtn{transition:none}.cf-testimonial-grid .cf-tg-rest{scroll-behavior:auto}}
`;
pieces/proof/testimonial-grid/specimen.tsx 83 lines
import __studioImage5563e80b from "../assets/0e6c11889c659325.webp";
import __studioImage08e2c091 from "../assets/9dd56ed801164594.webp";
import React from 'react';
import { TestimonialGrid, type TestimonialGridProps } from '../testimonial-grid';
import defaults from '../../studio-defaults.json';
import { slot } from '../../slots';
export const states = ['default', 'hover', 'active', 'disabled'];
type SpecimenState = NonNullable<TestimonialGridProps['state']>;
export default function TestimonialGridSpecimen({ state = 'default' }: { state?: SpecimenState }) {
const sample = defaults.sample;
const itemImages = sample.items.map((item, i) => ({ src: slot('item-' + (i + 1), item.image), alt: item.imageAlt }));
const customerOne = slot('customer-1', __studioImage5563e80b);
const customerTwo = slot('customer-2', __studioImage08e2c091);
return (
<TestimonialGrid
state={state}
headline='What changes when your funnel starts with a plan'
highlight='starts with a plan'
lead='Coaches, course creators and service pros share the one result that changed their launch.'
stories={[
{
name: 'Dana R., Austin',
role: 'Life coach',
audience: 'Coaches',
result: 'My offer finally fit on one page',
quote: 'I mapped the offer and every page on a Saturday morning. Building felt easy after that.',
photo: customerOne,
photoAlt: 'Dana R. smiling in her home office',
},
{
name: 'Marcus T., Leeds',
role: 'Course creator',
audience: 'Course creators',
result: 'I wrote my sales page in two evenings',
quote: 'The workbook prompts handed me a headline, an offer and a call to action I actually liked.',
photo: customerTwo,
photoAlt: 'Marcus T. in his studio',
},
{
name: 'Priya S., Denver',
role: 'Bookkeeping services',
audience: 'Services',
result: 'Launch day went out with zero broken links',
quote: 'The checklist caught a form that sent leads nowhere. I fixed it before anyone saw it.',
},
{
name: 'Leo M., Toronto',
role: 'Fitness coach',
audience: 'Coaches',
result: 'I stopped rebuilding the same page',
quote: 'Once the plan was clear, I built each page once and moved on.',
},
{
name: 'Hannah K., Portland',
role: 'Course creator',
audience: 'Course creators',
result: 'My webinar funnel went live in a week',
quote: 'Guide on Monday, pages by Thursday, live by Sunday.',
},
{
name: 'Sam O., Atlanta',
role: 'Web designer',
audience: 'Services',
result: 'Every client build now starts with a funnel plan',
quote: 'I run the planning guide in kickoff calls. It saves my clients and me hours.',
},
]}
actionHeadline={'Every story here started with ' + sample.name + '.'}
actionText={sample.reason}
actionLabel='Send Me The Starter Kit'
price={sample.price}
priceLine='{price} · {sublabel}'
actionSublabel='Instant download'
guarantee={sample.guarantee}
itemImages={itemImages}
onAction={(event) => event.preventDefault()}
/>
);
}
| Name | Type | Details |
|---|---|---|
stories OptionalTestimonialGrid |
TestimonialStory[] |
|
headline OptionalTestimonialGrid |
string |
|
highlight OptionalTestimonialGrid |
string |
|
lead OptionalTestimonialGrid |
React.ReactNode |
|
showFilters OptionalTestimonialGrid |
boolean |
|
allLabel OptionalTestimonialGrid |
string |
|
filterLabel OptionalTestimonialGrid |
string |
|
showingLabel OptionalTestimonialGrid |
string |
|
listLabel OptionalTestimonialGrid |
string |
|
actionHeadline OptionalTestimonialGrid |
React.ReactNode |
|
actionText OptionalTestimonialGrid |
React.ReactNode |
|
actionLabel OptionalTestimonialGrid |
string |
|
price OptionalTestimonialGrid |
string |
|
priceLine OptionalTestimonialGrid |
string |
|
actionSublabel OptionalTestimonialGrid |
string |
|
guarantee OptionalTestimonialGrid |
string |
|
itemImages OptionalTestimonialGrid |
TestimonialGridImage[] |
|
href OptionalTestimonialGrid |
string |
|
onAction OptionalTestimonialGrid |
(event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void |
|
disabled OptionalTestimonialGrid |
boolean |
|
state OptionalTestimonialGrid |
'default' | 'hover' | 'active' | 'disabled' |
|
prevLabel OptionalTestimonialGrid |
string |
|
nextLabel OptionalTestimonialGrid |
string |
|
counterLabel OptionalTestimonialGrid |
string |
|
className OptionalTestimonialGrid |
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- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
--marker- The highlighter colour behind key phrases.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
customer-1- An image this piece places.
customer-2- An image this piece places.
-
0e6c11889c659325.webp
image/webp · 120 KB
-
9dd56ed801164594.webp
image/webp · 102 KB
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB