shadcn.io is not affiliated with official shadcn/ui
Conversation Thread Testimonials Block for React
An email-style thread for a tracing tool that turns a sceptic into an advocate, in a framed window beside a hairline divider: a subject line, earlier messages folded behind a disclosure row, the two latest open, and a Shine Button.
Installation
Overview
A testimonial told as an internal email thread, because the best proof is a change of mind, in React with Base UI. The block is a reverse split: the thread sits in a framed window with + marks on its corners, and a hairline divider separates it from the heading, the block's one primary button (a Shine Button) and, on wide screens, a short list of what changed the sceptic's mind. On a phone the heading comes first and the thread follows it. The thread has a subject line and a count of its messages. The first three messages, the sceptic's doubt about tracing tools, the manager's two-day proposal and the grudging "fine", are folded behind a row that reads "3 earlier messages" with the faces of who wrote them. The two latest are open: the on-call lead's result, and the sceptic's reply that he owes everyone a coffee. Opening the row slides the earlier messages in between, with nothing above it moving. It's built from Collapsible, Avatar, Badge, Button, Guides and Shine Button, with CSS only and your theme's tokens. For products that win over a doubting engineer, where how the opinion changed matters more than the final score.
FAQ
How do I change the thread?
Edit THREAD at the top of the file, oldest first (and REASONS, the three short lines beside it that say what changed the sceptic's mind): each message has a quote, the sender's name, role and initials, and a relative time such as "Yesterday". FOLDED says how many of the first messages sit behind the row; the rest are always open. The count in the row and the badge by the subject are both worked out from the list.
How does the earlier-messages row work?
It is a disclosure button that says whether the earlier messages are shown, and it opens and closes with Enter or Space. The earlier messages are in the page while it is closed but hidden from everyone, so they are neither read by a screen reader nor reachable by Tab until you open the row. The chevron turns over to show the state.
How do screen readers read the thread?
The section's heading is an h2, the subject is an h3, and the open and folded messages are two ordered lists in the order they were sent. The frame, the divider and its + marks are decoration and hidden. Each message is a figure: the sender, role and time are its caption and the words are a blockquote. The initials avatars and the little avatar stack on the row are hidden, because the names are written out.
What about reduced motion?
The two columns fade up once on load, and the folded messages open with a short height transition. Both are CSS and switch off with reduced motion, so the messages simply appear and disappear. The Shine Button's light fades in where it stands instead of sweeping.
How is this different from the bubble chat block?
A chat is a stream of short, informal messages on two sides. This is a thread with a subject, where each message is a full row with a sender and a time, and the older ones fold away like in an email client. Use the chat for the sound of a community, and the thread for a story with a turning point.
Related
- Pro
Bubble Chat Testimonials
Chats and postsA reverse split on drafting lines: a group chat of five dispatchers in a hairline frame, alternating message bubbles with a name, role and relative time above each, beside a header and one Shine Button.
- Pro
Reaction Pills Testimonials
Chats and postsA launch-week chat in a split: the headline and a Shine Button in a rail, and four messages ruled apart by hairlines, each with celebrate, love and ship-it reaction pills that really toggle and count.
- Pro
Notification Centre Testimonials
Chats and postsA reverse split: a notification window in a hairline frame where customer praise arrives as unread rows, with a new-count badge, rows that mark themselves read and a Mark all as read button, beside a header with a Shine Button.
- Pro
Before and After Testimonials
Results and figuresTwo quotes from one customer, the first week and month six, as two cells with a connector between them that holds the person and what changed, each change worked out from its before and after.
- Pro
Split Light Speech Bubble CTA
Social proofA split call to action built as a short chat: the headline at the start, and at the end a customer's quote in a bubble, answered by a reply bubble that holds the Shine Button to start free.
- Pro
Docblock Quote Testimonials
Chats and postsA split testimonial for a build tool: the headline and a Shine Button on the left, and on the right one customer quote written as a code docblock in an editor window framed by hairline corners, with line numbers, comment colours and the author as @author and @role tags. It follows the theme.