shadcn.io is not affiliated with official shadcn/ui
Quote Carousel Testimonials Block for React
A split testimonials carousel for a CI service: the heading and a Shine Button beside a raised card in a tinted shell that follows the theme, advancing by itself under a story-style progress bar with pause, previous and next.
Installation
Overview
Let one voice at a time take the stage with this quote carousel for React with Base UI. It splits in two with a hairline divider: on one side the heading, a sentence about the product (here a CI service) and the block's one primary button, a Shine Button, with three facts the four teams share on wide screens; on the other a raised card inside a tinted shell, light on a light page and dark on a dark one. The card holds a row of segments, one per quote, a counter with pause, previous and next, and a single large quote with its author. The current segment fills over six seconds, then the next quote slides in. It's built from Carousel, Button, Avatar, Guides and Shine Button, with CSS transitions only and your theme's tokens. Made for landing pages that have four or five strong endorsements and room for only one at a time.
FAQ
How do I change how long each quote stays?
The fill is a CSS animation of six seconds: change duration-[6000ms] in the FILL class at the top of the file. The next quote starts when that animation ends, so the bar and the change are always in step, and there's no timer to keep in sync. Add a quote by adding an object to QUOTES; the segments, the counter and the slides all follow the list.
When does it stop turning by itself?
It holds while the pointer is over the panel and while a control inside it has keyboard focus, and it picks up where it left off. It stops for good, until the visitor presses play, as soon as they choose a quote with the segments, the arrows or a swipe, and it never starts for visitors who prefer reduced motion. The pause button comes right after the segments and ahead of the arrows, so a keyboard user can stop it quickly.
How do screen readers and keyboards handle it?
The section is named by its h2, and the carousel is a region named "Customer quotes". Each quote is a figure with a blockquote and a figcaption, and only the quote on show is exposed: the others are inert. The segments are buttons named "Quote 2 of 4, from Marcus Williams" and mark the current one with aria-current. While the carousel turns by itself nothing is announced; once the visitor moves it, a polite status line says which quote is now showing.
Does it follow the light and dark theme?
Yes. The panel is a bg-card card with shadow-lg and a thin ring inside a bg-muted/50 shell with hairline corner marks, so the emphasis comes from structure, not from a black panel. The name is historical. The text, the segments and the buttons all use your theme's tokens, and nothing sets a dark scope.
Does it work in right-to-left languages?
Yes. The bar fills from the inline start, the arrows mirror, the segments run in reading order and each quote sits in a bdi so its quotation marks stay at the ends. The slide direction follows the page direction on every target.
How do I load the quotes from a CMS?
QUOTES is a plain typed array at the top of the file, so you can replace it with data fetched in a parent and passed down. Keep the quotes to about two sentences: the slides are all as tall as the longest one, which keeps the page from jumping, so one very long quote leaves empty space under the others.
Related
- Pro
Docblock Quote Testimonials
Chats and postsA split testimonial for a build tool: the headline and a Shine Button on the left, and on the right one customer quote written as a code docblock in an editor window framed by hairline corners, with line numbers, comment colours and the author as @author and @role tags. It follows the theme.
- Pro
Seconded Quote Testimonials
One big quoteA spotlight quote on a raised card inside a tinted shell that follows the theme, with the evidence turned outside it: a row of overlapping avatars on the shell, each a button that opens that team's own one-line agreement.
- Pro
Quote Carousel Testimonials with Next-Speaker Preview
Carousels and decksA centred, looping carousel of large customer quotes in a card in a card, whose Previous and Next buttons preview who speaks next, with the neighbour's avatar and first name.
- Pro
Testimonials Centre-Mode Carousel
Carousels and decksA centre-mode quote carousel for a support inbox: a centred header with a Shine Button above one hairline band, where the active quote sits in the middle on a raised card with its neighbours peeking in, with previous and next buttons, a dot per quote and arrow-key control.
- “Pro
Testimonials Rotating Hero
TestimonialsA reverse split hero with a card that shows one customer quote at a time in a hairline frame, a pause button and a dot per quote, beside an announcement pill, a headline, a Shine Button and an outline action.
- “Pro
Testimonial Quote CTA
Social proofA split call to action led by one customer quote, with a marker stroke drawn across its key phrase and the author beneath in the wide cell, and the headline and a Shine Button to the full story in the narrow one.