Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Filterable Testimonials Block for React

Role chips with live counts filter a wall of eight customer quotes, with a status line, a clear button and an empty state. A hairline band holds the controls and the cells' lines overshoot their corners.

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

Customer proof the visitor can narrow down, for React with Base UI. A compact header says who the product is for and carries the one call to action, a Shine Button that links to the customer stories. Under it a hairline band holds four role chips (Engineering, Design, Product and Leadership), each with a count, and a status line with a Clear filters button. Below that, eight quotes sit in cells whose lines overshoot their corners and meet in + marks: four columns from lg, two from sm. Pick one chip or several: the wall keeps only the quotes whose person holds every picked role, so a design engineer shows up under both Engineering and Design. Each chip's count says how many quotes you would be left with if you added it, so you can see a dead end before you reach it. The wall keeps the height of all eight cells, so nothing below it moves, and a combination with no quotes shows an empty state. On a phone the cells become one snap row with the next one peeking in. It's built from Toggle Group, Badge, Empty, Avatar, Button, Guides and Shine Button, with your theme's tokens only. For pages with enough quotes that a visitor needs to find the one that sounds like them.

FAQ

How do I change the roles and the quotes?

Edit ROLES and PEOPLE at the top of the file. Each person lists every role they hold in roles, and a quote is shown when the person holds all of the picked roles. The chip counts, the status line and the empty state all come from the data, so adding a quote or a role needs no other change. The grid is four columns from lg; with a number of quotes that isn't a multiple of four, the last row is shorter.

How are the chip counts worked out?

A chip that isn't picked shows how many quotes would match with it added to the picks; a picked chip shows how many match now. With nothing picked, each chip shows its role's total. They are recounted from the data on every change, never typed, so they can't drift from the wall.

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

Each chip is a toggle button: Tab moves to the group, the arrow keys move between chips, and Space or Enter toggles one; it is announced as pressed or not pressed, with its count. A picked chip gets a foreground border and a tint, not the primary colour. When the picks change, a polite status line reads the result ("2 of 8 quotes shown"), so the wall's change is announced without moving focus. Clearing the filters returns focus to the first chip.

How does the wall fit on a phone?

Below sm the eight cells become one row you swipe, each cell 85% of the width so the next quote is visible as the hint. The first quote starts on the first screen, with the chips above it. The row is a tab stop, so a keyboard can scroll it with the arrow keys. From sm the cells sit in a grid and nothing scrolls sideways.

Why doesn't the page jump as the wall shrinks?

An unseen copy of all eight cells sits in the same grid cell as the live wall, so the cell keeps its full height while the quotes you filtered out leave. The copy is hidden from screen readers and can't take focus. The empty state replaces the cells inside the same box, so it doesn't move the page either.

What about reduced motion and right-to-left pages?

Quotes that come back fade in with CSS; with reduced motion they simply appear. In a right-to-left page the chips, the cells and the lines mirror, and each quote keeps its curly marks in place. The one call to action is a Shine Button, which sweeps a band of light once on hover or focus and only fades it in with reduced motion.

  • Pro

    Tag Filter Testimonials

    Filter and search

    A wall of nine customer quotes for a component kit in hairline cells, each ending in two topic tags that are buttons: pick one to filter the wall and get a removable chip.

  • Pro

    Search Testimonials

    Filter and search

    A search box in the header row that filters eight customer quotes as you type and marks the matched words, with a result count, Escape to clear and an empty state, in a band of hairline-ruled rows.

  • Pro

    Icon tabs in the header row that switch customer quotes by industry: four sectors, each a panel of three cells (the typical rollout time and two quotes) above a band with a Shine Button.

  • Pro

    A two-way segmented switch between startups and enterprise in the header row that swaps a band of three cells: the usual outcome as a big figure with a Shine Button, and two customer quotes.

  • Pro

    A centered showcase hero for a marketplace: a search form with the Shine Button and category pills that really filter a shelf of eight product cards in hairline cells.

  • Pro

    Five customer quotes about a UI kit, set large in ruled bands under keyword chips: pick one and every quote that mentions it marks the words, lights a bar and counts where it comes up.