Testimonials Deck
Stacked deck of glass testimonial cards offset in depth; a ‘Next story’ button sends the top card to the back and the others slide forward, with a live counter.
glass/section/testimonials-deckSource
"use client";
import { useState } from "react";
import { ArrowRight } from "lucide-react";
import { cn } from "@/lib/utils";
export interface TestimonialsDeckItem {
quote: string;
name: string;
role: string;
company: string;
}
export interface TestimonialsDeckProps {
eyebrow?: string;
title?: string;
items?: TestimonialsDeckItem[];
className?: string;
}
const GLASS = "da-stroke bg-da-surface backdrop-blur-da backdrop-saturate-150";
const TONES = ["from-da-primary to-da-accent", "from-da-accent to-da-success", "from-da-danger to-da-primary", "from-da-warning to-da-danger"];
const DEFAULT_ITEMS: TestimonialsDeckItem[] = [
{
quote: "We cancelled our Monday status meeting. Halo recaps and two-minute videos replaced it, and nobody misses it.",
name: "Amara Diallo",
role: "Head of Product",
company: "Lumen",
},
{ quote: "Sales calls go straight into HubSpot with next steps. My reps got four hours a week back.", name: "Leo Park", role: "VP Sales", company: "Parcel" },
{
quote: "Ask Halo is scary good. I found the pricing decision from March in ten seconds, with the exact timestamp.",
name: "Sofia Rossi",
role: "COO",
company: "Quanta",
},
{
quote: "Half our team is in Lisbon, half in Seoul. Live translation made our all-hands feel like one room.",
name: "Noah Klein",
role: "CEO",
company: "Heliograph",
},
];
/** Stacked deck of glass testimonial cards; “Next” sends the top card to the back with a slide, others move up. Keyboard friendly. */
export function TestimonialsDeck({
eyebrow = "Loved by busy teams",
title = "Fewer meetings. Better ones.",
items = DEFAULT_ITEMS,
className,
}: TestimonialsDeckProps) {
const [top, setTop] = useState(0);
const n = items.length;
return (
<section aria-labelledby="glass-deck-title" className={cn("da-section overflow-hidden text-da-fg", className)}>
<div className="da-container grid items-center gap-12 lg:grid-cols-[1fr_1.2fr]">
<div>
<p className="text-sm font-semibold text-da-primary">{eyebrow}</p>
<h2
id="glass-deck-title"
className="mt-3 font-da-display text-[clamp(2rem,4.5vw,3.25rem)] leading-[1.08] font-semibold tracking-da-display text-balance"
>
{title}
</h2>
<div className="mt-8 flex items-center gap-4">
<button
type="button"
onClick={() => setTop((t) => (t + 1) % n)}
className="da-focus da-transition group inline-flex h-12 items-center gap-2 rounded-da-pill bg-da-fg px-6 font-semibold text-da-bg shadow-da-md hover:-translate-y-0.5"
>
Next story
<ArrowRight aria-hidden className="da-transition size-4 group-hover:translate-x-0.5" />
</button>
<p className="font-da-mono text-sm text-da-muted-fg" aria-live="polite">
{top + 1} / {n}
</p>
</div>
</div>
<div className="relative mx-auto grid w-full max-w-lg pt-10">
{items.map((t, i) => {
const depth = (i - top + n) % n;
return (
<figure
key={t.name}
aria-hidden={depth !== 0}
inert={depth !== 0}
className={cn(
"col-start-1 row-start-1 rounded-da-lg p-7 shadow-da-lg transition-[translate,scale,opacity] duration-(--da-duration-slow) ease-(--da-ease-emphasized) motion-reduce:transition-none",
GLASS,
depth > 2 && "opacity-0",
)}
style={{ translate: `0 ${-depth * 18}px`, scale: `${1 - depth * 0.05}`, zIndex: n - depth }}
>
<blockquote className="font-da-display text-xl leading-snug font-medium tracking-da-display text-balance">“{t.quote}”</blockquote>
<figcaption className="mt-6 flex items-center gap-3">
<span aria-hidden className={cn("size-10 rounded-full bg-gradient-to-br", TONES[i % TONES.length])} />
<span className="text-sm">
<span className="block font-semibold">{t.name}</span>
<span className="block text-da-muted-fg">
{t.role}, {t.company}
</span>
</span>
</figcaption>
</figure>
);
})}
</div>
</div>
</section>
);
}
export default TestimonialsDeck;
modules/glass/section/testimonials-deck/index.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow / title | string | — | Header. |
| items | { quote, name, role, company }[] | — | Cards. |
| className | string | — | Classes. |
Other testimonials variants in Glass
Testimonials Marquee
Two rows of frosted testimonial cards scrolling infinitely in opposite directions with faded edges, pause on hover, star rating summary above. A static sr-only list carries the content for assistive tech.
Testimonials Masonry
Rating summary pill (stars, 4.9/5, review count) above a masonry wall of glass quote cards with star ratings; one highlight card is filled with the brand gradient.
Testimonials Video
Three video-testimonial glass cards with gradient posters, initials, play button and duration; opening one expands a glass player panel above with headline, quote and author.
Testimonials in other art directions
Testimonials Big Quote
Full-bleed blue section showing one giant uppercase quote at a time with a tilted yellow metric card, author row, pressable prev/next buttons and bar-shaped pagination.
Testimonials Logos
Case-study strip: four ruled cells, each with a company wordmark, a giant result number, its label and a one-line quote, alternating solid and paper tones.
Testimonials Posts
Social-post wall: ruled cards styled like timeline posts (square colored avatar, handle, date, casual copy, reply/repost/like counts) in a 3-column grid with a 'see more' CTA.
Testimonials Wall
Wall of quote cards in alternating solid colors with hard shadows, initials avatars and optional rotated metric stickers ("2× adoption").
Testimonials Carousel
One large quote at a time with initials avatar and role, cross-fading between slides; progress dots, a 01 / 04 counter and round prev/next buttons, arrow-key navigation.
Testimonials Case Studies
Three case-study cards led by an oversized mono metric in indigo (−71% pages), a short quote, author and a Read the story link that makes the whole card clickable.
Testimonials Grid
Asymmetric testimonial grid: one large featured quote with a headline metric, flanked by two compact quotes, then a second row. Hairline cards, initials avatars, no logos needed.
Testimonials Posts
Masonry wall of social-post cards in 1–3 CSS columns: initials avatar, name and handle, post text, date and like count. Hairline cards, centered header.
Testimonials Grid
Hairline grid of short quotes (gap-px on a border-colored background) — 3 columns desktop, each cell with the quote and mono attribution; no cards, no shadows.
Testimonials List
Testimonials as an editorial ruled list: each row pairs a mono index + name/studio/city on the left with the quote on the right in a larger size; rows separated by hairlines.
Testimonials Marquee
Slow horizontal ticker of short quotes in large display type, separated by signal dots, between two ink rules; pauses on hover, static and wrapped with reduced motion. Pure CSS.
Testimonials Quote
One oversized pull quote set in the display face with a hanging opening quote mark, mono attribution under a short ink rule; lots of whitespace.
Testimonials Cards
Clean 3-column grid of bordered quote cards with company name header, quote, and initials avatar + role footer divided by a hairline.
Testimonials Case Study
Featured customer story: bordered card split into a company quote (logo wordmark, quote, author) and a tinted column of three big result metrics with a “Read the case study” link.
Testimonials Logos
Row of customer wordmark buttons acting as tabs; selecting one swaps the quote, author and key metric below.
Testimonials Ratings
Review-site proof: rating tiles per platform (score + stars + review count), a row of award badges, and two review excerpts.
Testimonials Carousel
Gentle one-at-a-time carousel on a sage band: serif quote cross-fades, round prev/next buttons, leaf-shaped position dots; no autoplay.
Testimonials Notes
Kind words as handwritten-feeling notes: slightly tilted paper/sage/clay cards with italic serif quotes and a small “pinned” dot, straightening on hover.
Testimonials Portrait
Single large testimonial: an arch-shaped sage “portrait” with big initials and a leaf, next to a large serif quote, attribution and a clay result chip.
Testimonials Wall
Masonry wall of soft rounded quote cards in mixed tints (CSS columns), each with a small leaf-dot avatar, name and role.
Testimonials Bubbles
Testimonials as a friendly group chat: alternating pastel speech bubbles with round avatars and names inside a big white phone-like card, next to the section title.
Testimonials Notes
Wall of pastel sticky notes, slightly rotated with a round periwinkle pin on top, each holding a bold short quote and author; notes straighten on hover.
Testimonials Slider
Horizontal slider of pastel testimonial cards with star ratings; round prev/next buttons move one card at a time and pill dots show the position.
Testimonials Spotlight
One big quote on a mint block with a giant quote mark, a flat shape avatar, three white stat bubbles and a row of customer wordmarks below.