shadcn.io is not affiliated with official shadcn/ui
Reply Thread Reviews Block for React
One three-star dishwasher review with its conversation in a single framed window: the seller's reply, the buyer's follow-up and the seller again under depth rails, and a real reply form with a live character count that appends your reply to the end.
Installation
Overview
A reply thread for React with Base UI, for the Jettyfield Quiet 12, a fictional dishwasher. Under a start-aligned header, one framed window with corner marks holds a three-star review (stars and their value in words, a title, the text, the reviewer with a "Verified purchase" mark and a fixed date) and the conversation under it: a reply from the seller with a Seller badge, the buyer's follow-up and the seller again, each indented under a depth rail that shrinks to a 2 px line on a phone. At the foot is a real form: a text box limited to 280 characters, a live count and the one Shine Button, "Post reply". A reply you post lands at the end of the thread marked as yours, the reply count moves, and a polite note says it stays on this page. The thread and its dates are typed at the top of the file. It uses Rating, Avatar, Badge, Field, Textarea, Shine Button and Guides.
FAQ
Where does my reply go?
Nowhere: it's kept in the page's state and shown at the end of the thread with "Just now" and a "You" name, and a polite note says "It stays on this page; nothing was sent". A reload starts afresh. To send replies for real, post the text from the submit handler and add the saved reply to the thread when your server answers. An empty or very short reply shows an error under the box, says it, and puts focus back in the field.
How does the character count work for screen readers?
The visible "0 / 280" is hidden from assistive technology so it isn't read on every keystroke. A separate polite status says "Twenty or fewer characters left" when 20 are left, "Ten or fewer" at 10 and "No characters left" at 0, and its text stays the same between those stages, so it's read once at each. The box has maxLength, so nothing can go past 280.
How is the depth shown?
Each reply is a list item with a 2 px rail at its start, indented one step further than the reply above (a smaller step on a phone, so the text keeps its width). The depth is typed in depth on each reply, 1 to 3, and the indent comes from literal classes in depthClass. The seller's replies carry a Seller badge and the buyer's a Reviewer badge, so the speaker is in words and not only the position.
What is the framed window?
One block with Guides corner marks and overshooting lines, split inside by solid rules with their own marks: the review, the conversation, then the composer. It's a frame in the section, not a card: it follows your theme and stays flat. The rules and marks come from the Guides component, so they match the lines of the other blocks.
Related
- Pro
Question and Answer Reviews
Votes and repliesQuestions about a pressure cooker answered by people who own one: a search box and an All, Answered or Unanswered group, answers with the seller's pinned first, a Helpful toggle on each, an inline answer form and an Ask a question dialog.
- Pro
Split View Reviews
Lists and pagesA master and detail split for six monitor reviews: a list where each row is a checkbox, a pane that shows the one you tick in full, or two side by side with a 'Both mention' line, and arrow keys that move between rows.
- Pro
App Review Reply Testimonials
Ratings and reviewsA 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.
- Pro
Notification Feed Reviews
ModerationA merchant review inbox for a greenhouse-kit maker: Tabs for All, Needs action and Replies with counts, a Mark all as read button and full-width ruled rows under day dividers with inline Approve, Reply and Mark read.
- Pro
Response Templates Reviews
Merchant toolsReply templates for a bike-repair shop: vertical Tabs for four categories with counts, the templates in each, a Select for the review being answered, an editable Textarea, a preview with marked variables and a Copy button.
- Pro
Helpful Votes Reviews
Votes and repliesThe best favourable and the best critical review of a water filter jug side by side, each with a Helpful vote and a worked-out 'n of m found this helpful', above the other reviews in ruled rows with a most-helpful or newest order.