Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Testimonials Rotating Hero Block for React

A 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.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A reverse split hero with social proof that keeps moving. At the start sits a card in a hairline frame with + marks on its corners that shows one customer quote at a time, large, with the author's initials avatar, name, role and company; at the end, past a divider, an announcement pill, a headline, a sentence, a Shine Button and an outline action. A new quote fades and rises in every five seconds. A pause button and a dot for each quote sit at the card's foot with a count above: the rotation holds while the pointer is over the card or a control has focus, and stops for good once the visitor picks a quote or presses pause. The card keeps the height of the longest quote, so nothing moves. On a phone the text comes first and the card follows under a hairline. It's built from Announcement, Badge, Status, Avatar, Shine Button, Button and Guides, with a timer in React state and CSS transitions. The copy speaks for Conveyor, workflow automation. For SaaS landing pages, product launches and homepages that want several voices in the space of one.

FAQ

How do I change the quotes or how long each one stays?

Edit TESTIMONIALS at the top of the file: each quote has its quote text, the author, their role and company, and the initials in the avatar. A dot is added for each quote and the count follows the list. INTERVAL is how long a quote stays, in milliseconds (5000 by default); give longer quotes more time, since a visitor has to finish reading before it changes.

How can visitors stop the rotation?

Three ways. The pause button under the quote stops it until it's pressed again; it's a toggle, announced as pressed while the quotes are paused. Moving the pointer over the card, or tabbing to the pause button or a dot, holds the current quote until the pointer leaves or focus moves on. And choosing a quote with its dot stops the rotation, so the quote the visitor picked stays. Content that moves on its own needs a way to pause it (WCAG 2.2.2), and the button is that way for keyboard and touch users who can't hover.

How do screen readers handle the changing quote?

The card is a region named by its heading, "What our customers say", and each quote is a figure with a blockquote and its author as the figcaption. While the quotes change on their own, nothing is announced, so a screen reader isn't interrupted every five seconds. Once the visitor picks a quote with a dot, the area becomes a polite live region and the chosen quote is read out. Each dot is named after its quote ("Quote 2 of 3, from James Whitfield") and the current one is marked as current. The "1 / 3" count is hidden, since the dots already say it.

What happens with reduced motion?

With reduced motion the quotes don't rotate on their own: the first quote shows, the pause button shows play, and the visitor can start the rotation or move between quotes with the dots. Quotes then change without the fade, and the page's entrance doesn't play.

How do I load the quotes from a CMS?

Fetch the quotes on the server and pass them into the block in place of TESTIMONIALS, keeping the same fields: the dots, the count, the timer and the reserved height all come from the list, so any number of quotes works. Give each one a unique author, since it keys the quote and its dot. Keep the list short, three to five quotes: a visitor rarely waits for the sixth.

When should I use rotating quotes instead of a wall?

Use rotating quotes when space is tight and one voice at a time is enough: the card takes the room of a single quote, beside a hero that stays focused on the pitch. Use a wall when the volume is the message, many customers at a glance; a rotating quote hides all but one at any moment, and most visitors won't wait to see the rest.

  • Pro

    A compact start-aligned hero with a headline, a Shine Button and an outline action over a closing band that holds one customer's quote, large, beside their rating, name, role and the number it is about.

  • Pro

    A centred showcase hero with a headline, a Shine Button and an outline action over a wall of six customer quotes in cells that share their hairlines, a snap carousel on a phone.

  • Pro

    A split hero for month-end close software: the pitch, a Shine Button and an outline button beside a customer's five-star testimonial in a card in a card, with the two results it names.

  • Pro

    A reverse split hero that opens with a customer quote: a tinted panel on the start side in three ruled bands (quote, author, two results), and the headline and a Shine Button at the end.

  • Pro

    A showcase centered hero led by its review score, with five stars and the average, a Shine Button, review-site badges and three reviews below in cells whose hairlines overshoot their corners.

  • Pro

    A compact start-aligned hero closed by a three-cell social proof bar on its own rule: an avatar stack with the user count, a five-star rating with the review count and a compliance mark.