Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Testimonials Portrait Carousel Block for React

Customer stories for a site builder on slides in one hairline band: each pairs a framed portrait, a monogram on a grid with the result the customer got, with the quote, split by a divider, and a footer row with a 01 / 04 count and previous and next buttons, under a header with one Shine Button.

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 carousel for React with Base UI for when the person is part of the proof. A compact header names the product (a site builder) and holds the block's one primary button, a Shine Button. Below it, one band between two hairlines holds the slides, and each slide is a split with a divider; a footer row ruled under the slides holds the "01 / 04" count with the previous and next buttons. On one side a framed figure, with + marks on its corners, shows the customer's monogram on a faint grid with a small panel under it that names the result they got and their company; on the other, the quote in a large, calm size above the author's avatar, name and role. On a phone the quote comes first and the portrait follows it, shorter. The previous and next buttons wrap around so a button never ends up disabled under a visitor's focus. Nothing moves on its own, so there is no autoplay to pause. It's built from Carousel, Grid Pattern, Guides, Avatar, Badge, Button and Shine Button, with CSS transitions for the entrance and your theme's tokens. For founder endorsements, executive quotes and any section where a face and a number belong together.

FAQ

How do I change the stories?

Edit STORIES at the top of the file: each story has a quote, the person's name, role, company and initials, and a result with a value ("3 weeks") and the label that follows it ("to rebuild the product surface"). The count, the slide names and the buttons all come from the list, so any number of stories works; four to six is a comfortable length. The count is padded to two digits, so a list past 99 would need the helper changed.

How do I use real photos in the portrait tile?

Replace the monogram and the GridPattern inside the framed tile with an image that fills it (object-cover), and keep the result panel on top. Give the image an empty alt when the author's name is already in the caption, which it is here. Keep the tile's height classes (h-52 sm:h-64, and a minimum on wide screens): they hold the slide's height, so a taller photo would make the band grow from one slide to the next.

How does the carousel work on each library?

It's the Carousel built on Embla: setApi hands the block Embla's API, and its select event keeps the count in step. The direction comes from Base UI's own provider, so the slides move the right way on a right-to-left page. Slides out of view are inert.

Can visitors move between stories with a keyboard?

Yes. The previous and next buttons are real buttons in the footer row, in the tab order, and with focus inside the carousel the left and right arrow keys move between slides too. Next on the last story goes back to the first, and previous on the first goes to the last. The slides that are out of view are inert, so Tab never lands on content that is hidden.

What does a screen reader announce?

The carousel is a region named "Customer stories", and each slide is a group named by its person and position, such as "Hana Matsuda, 3 of 4". The quote is a blockquote inside a figure, with the author as the caption; the avatar and the grid are decorative and hidden. When a visitor changes the slide, the new one is announced politely. The count is read as "Story 01 / 04".

What changes with reduced motion, and what about right-to-left?

The header and the band appear without their entrance. The slides still change when the buttons are pressed, and nothing moves on its own. In a right-to-left page the layout mirrors: the portrait and the divider move to the other side. The count and the result values are wrapped so their digits and units keep their order.

  • Pro

    A band of avatar-and-name chips for five customers: choose one and the large quote in a raised card in a card below changes to theirs, with arrow-key control between the chips, one scrolling row on phones, and a polite announcement of the change.

  • Pro

    A 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

    A quote carousel for an accounting platform that shows one, two or three cells per page by screen width, in a hairline-ruled band, paged with previous and next buttons and a Page 1 of 2 count in the heading row, or with the arrow keys.

  • Pro

    Testimonial With Portrait

    Audio, video, photo

    One customer story for a finance close tool in a reverse split: a framed illustrated portrait that a close checklist overlaps on the start, the quote and a Shine Button on the end, with a solid divider between.

  • Pro

    A featured quote and two supporting quotes for a checkout platform in a resizable split inside a framed figure: drag the divider, or focus it and use the arrow keys, to give either side more room, with a Shine Button in the header row.

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