shadcn.io is not affiliated with official shadcn/ui
Numbered Top Testimonials Block for React
A leaderboard of three customer quotes in ruled bands: oversized numerals 01 to 03, the quote and its author, and the votes each got in a survey over a bar of its share, under a compact header with a Shine Button.
Installation
Overview
A short, ranked list of the reasons customers give for switching to Cairnwell, a UI kit. Three bands carry oversized numerals, 01 to 03, in a cell of their own, in order of how many survey respondents voted for that reason. Beside each numeral sits the quote with its author, and on the end side the vote count, a bar of its share of the 640 respondents, the share in words and a star rating in the text colour. The bands are ruled with + marks, and a compact header carries a Shine Button to the survey results. The ranking is the point: it tells a visitor which reasons matter most to the people who came before. It's built from Guides, Avatar and Shine Button with Lucide's star, CSS transitions only and your theme's tokens. On a phone each band stacks its numeral, quote, author and votes. For landing pages where a curated top three does more than a wall of quotes.
FAQ
How do I change the reasons and the votes?
Edit REASONS and RESPONDENTS at the top of the file. Keep the list in order, most votes first: the numerals are drawn from each band's position, so the list order is the ranking. The percentage and the bar's width are worked out from the votes and the number of respondents, so you only type the two raw numbers.
Is the survey real?
No. The 640 respondents and the vote counts are sample data. Replace them with your own survey results, and keep the sentence under the heading true: it says respondents could pick several reasons, which is why the percentages do not add up to 100.
How are the numerals handled for screen readers?
The ranking is already in the list: the bands are an ordered list, so a screen reader announces "1 of 3", and the big numerals are hidden so they are not read twice. The vote count and share are real text, and the bar is decoration.
How are the stars shown?
The stars are decoration, filled in the text colour and empty in the border colour, and a screen reader reads a sentence instead, such as "Rated 5 out of 5". Set each reason's rating from what the customer gave, and remove the stars if you did not collect one.
How does it fit a phone?
Each band is one column on phones: the numeral, then the quote and author, then the votes. At the medium breakpoint the numeral sits in a narrow column beside the quote, with the votes in a row below, and from the large one the votes get a column of their own. The counts sit in a bdi, so they never wrap awkwardly, even at 320 pixels.
Related
- Pro
Headline Testimonials
Quote gridsA side header and a hairline grid of Sundial customers' quotes: the page column splits at `lg`, each quote leads with its takeaway as a large headline, and on a phone the six cells become one snap row.
- Pro
Cards Testimonials
Quote gridsThree customer quotes for an invoicing app in cells apart on hairline frames with + marks, each led by its result, with the middle one raised and a header that carries the rating and one Shine Button.
- Pro
Top Rated Testimonials
Ratings and reviewsFour 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
Centered Light Numbered Steps CTA
Lists and stepsA centred card-in-card call to action for a deploy platform: a headline, a sentence and the Shine Button, over a closing band of three setup steps staggered along a dashed path that draws itself once.
- Pro
Role Badge Testimonials
Quote gridsFour customer quotes in a two-by-two band of cells that share their hairlines, each avatar carrying a small icon badge for its owner's role, with the role also written as an outline badge and a Shine Button in the header.
- Pro
Accordion Testimonials
Rows and listsCustomer 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.