Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Detailed Reviews Testimonials Block for React

Three long reviews of a bookkeeping app beside a rail of proof: the average rating and its spread, with Helpful and Not helpful votes whose counts change as you choose.

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 testimonials section for products where people want the whole story. On the left a rail of proof for Tallybook, a fictional bookkeeping app for freelancers: the header, the average rating (4.8, worked out from the spread), a bar for each star level and the one filled Shine Button, "Read all 212 reviews". On the right three long reviews run down the page, each a cell of its own with hairlines that run past its corners, with the reviewer, a star rating in foreground tones, how long ago it was written and two paragraphs. Under each one, "Was this helpful?" has two toggle buttons, Helpful and Not helpful, with the running count on each. Choose one and its count goes up by one; choose the other and the vote moves; press it again to take it back. A short "Thanks for the feedback" confirms it. On a phone the rail comes first without its bars, and only the first two reviews show until "Show all 3 reviews" opens the rest. It's built from Avatar, Toggle, Button, Guides and Shine Button, with Lucide's icons, CSS transitions only and your theme's tokens. For pricing pages, product pages and review sections that benefit from people agreeing with each other.

FAQ

Are the votes saved?

No. The block keeps each visitor's vote in local state, so the counts change on screen and reset when the page reloads, and nothing is sent anywhere. To save votes, call your endpoint from the vote function and seed helpful and notHelpful from the stored totals. The counts shown are always the typed starting number plus the visitor's own vote, so they never go below it. Each review allows one choice at a time: choosing the other button moves the vote and pressing the chosen one again withdraws it, so a count only ever rises by one.

How do I change the reviews and the rating?

Edit the REVIEWS array at the top of the file. Each review has a name, role, company, initials, a relative date such as "3 weeks ago", a rating from 1 to 5, its starting vote counts and an array of paragraphs. The quotation marks are added around the first and last paragraph for you. The rail's average, total and bars come from the SPREAD array (how many reviews gave each star level), so change those counts and everything follows.

What happens on a phone?

The rail shows the average and the button without the bars, the first two reviews show, and a ghost button, "Show all 3 reviews", reveals the rest. It reports aria-expanded and names the list it controls, and on desktop all three reviews always show.

How does it work with a keyboard and a screen reader?

Each pair of votes is a fieldset named after the reviewer ("Was James Holloway's review helpful?"), holding two toggle buttons that announce whether they are pressed; Tab moves between them and Space or Enter presses one. The confirmation is a polite live region that is always on the page, so it is read out when a vote changes. The stars are decorative; the review says "Rated 5 out of 5" in text instead, and each bar's figures are read as "5 stars, 182 reviews".

Where does the button go?

It's a link to href="#": point it at your full reviews page. It's a ShineButton with render set to an a element and nativeButton={false}.

Does it work in right-to-left languages?

Yes. The rail, the cells and the vote row use logical sides, and each paragraph and each count sits in a bdi, so the quotation marks and the digits stay in order.

  • Pro

    Four customer quotes in a two-column grid, each cut to three lines with a Read more button that lifts the cut and turns into Show less.

  • Pro

    Customer stories as accordion rows beside a side header, on the page's drafting lines: each row shows the person, a one-line summary and a rating, and opens one at a time to read the full quote.

  • Pro

    Interview Testimonials

    Chats and posts

    A customer interview as a Q&A transcript in a split: a rail with the headline, the interviewee and a Shine Button beside five ruled exchanges, each with its answer set as a quote and a chip with the time it was said.

  • Pro

    Verified Buyer Testimonials

    Ratings and reviews

    One focal review under a Verified purchase badge in a raised card inside a tinted shell, a divider and a receipt of what the customer bought, then a band of three compact reviews with the same badge.

  • Pro

    Top Rated Testimonials

    Ratings and reviews

    Four reviews of an operations app with a sort control in the header: most helpful, highest rated or newest, re-ordered live from typed numbers, in one band of ruled rows with a status line and an average.

  • Pro

    A split testimonials section for an app: a header with store stats and a Shine Button beside a divider, then a phone-width Ratings and reviews panel in a hairline frame, each review answered by the team in a nested reply.