shadcn.io is not affiliated with official shadcn/ui
Service Provider Reviews Block for React
Reviews of a local plumbing and heating firm with a profile column, a job-type group that re-derives the rating, services and project cost on each review and the firm's replies.
Installation
Overview
A service provider reviews section for React with Base UI, for Bellmere Plumbing & Heating, a fictional local trades firm. A start-aligned header gives the count, then a split behind a divider. At the start is the provider's profile column: a lettermark and the name, the average of four category scores (punctuality, tidiness, value and communication) as a large figure with half-star stars, a single-choice group of job types (all jobs, boilers, leaks and bathrooms), a few facts (replies within two hours, the area covered, and the verified hires worked out from the reviews) and the four category scores as figures with bars. At the end are the three newest reviews of the chosen job as ruled rows, with the stars, the title, the text, the services done as badges, the project cost, the customer and the firm's reply in a collapsible. The rating, the facts, the bars and the list all re-derive from the typed reviews of the chosen job, and an unseen copy of every job holds the list's height. On a phone the profile comes first. It's built from ToggleGroup, Rating, Collapsible, Badge, Avatar and Guides.
FAQ
How is the rating for a job worked out?
Each typed review carries four scores from 1 to 5. The profile averages the scores of the reviews for the chosen job, one decimal by integer maths, and each bar is a category's average out of five. A review's own stars are the average of its four scores, to the nearest whole star. Edit REVIEWS at the top of the file to use your own.
What does the job group change?
The rating, the stars, the count, the verified hires, the four bars and the list: all of it is recomputed from the reviews of that kind of job. "All jobs" lifts the narrowing. An unseen copy of every job keeps the list's height, so choosing one never moves the page.
How do the firm's replies open?
Each review that has a reply carries a button, "Reply from Bellmere", that opens it under the review. It is a collapsible disclosure: Enter and Space open and close it, and the reply stays in the page's text for the libraries that keep closed content in the HTML.
How is the project cost shown?
As a pounds figure in a left-to-right span, so it reads the same in a right-to-left page. The services done are badges in a real list, one per service.
Related
- Pro
Reply Thread Reviews
Votes and repliesOne 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.
- Pro
Criterion Picker Multi-Criteria Reviews
Criteria and compareReviews that each score five criteria, with a picker that sorts the list by one criterion and shows every criterion's average, and the five scores of each review drawn as dots.
- Pro
Weighted Category Ratings Reviews
Criteria and compareFive criteria as ruled rows with a bar, a score and a signed change against the previous quarter, and a Select that weighs them for everyday, commuting or gym use and re-derives the overall score.
- Pro
Verified Toggle Reviews
Score summariesA review summary with a Verified purchases only switch: the average, the count, the share rated four or more and five distribution rows are worked out again, with a delta line against all reviews.
- Pro
Location Based Reviews
By industryA branch ranking for a coworking chain: six cities as accordion rows with the average, count and reply share worked out from star counts, a rating or volume ranking, and each branch's reviews.
- Pro
Detailed Card Reviews
Cards and wallsOne review with everything it can carry in a card in card: the reviewer and purchase facts, five criteria scores, pros and cons, three drawn pictures, a Helpful vote and the seller's reply.