Reviews, rating
betaThe average rating written large with its stars, the count and where reviews were left, beside a masonry of starred reviews.
npx rasengan-ui add reviews-rating
- 5 out of 5
The best ndolé in Akwa, and I have tried them all. Generous plates, and the folere is made on the spot.
Aïcha N. · 18 Oct 2026 · Google - 5 out of 5
We ordered for a family lunch of twenty people. Everything arrived hot and on time.
Paul from Bonapriso · 2 Oct 2026 · Google - 4 out of 5
Lovely terrace in the evening. Busy on Fridays, so book ahead.
Mireille K. · 27 Sept 2026 · Google - 5 out of 5
Came for work, came back three times in a week. The fish is grilled exactly right.
Thomas B. · 12 Sept 2026 · In the shop - 5 out of 5
They made my mother's birthday cake a surprise, candles and all. Thank you to the whole team.
Esther M. · 30 Aug 2026 · Google - 4 out of 5
Good food, fair prices. The plantain could be riper, but I will be back.
Didier T. · 14 Aug 2026 · Google
- Use it
- A business with a good public rating and real reviews to quote: restaurants, salons, garages.
- Avoid it
- A handful of long testimonials with photos: testimonials-carousel. No real rating to show.
- Built with
- Button
- Pairs with
- Menu, cardsBooking, form
Installation
It installs into components/blocks/reviews-rating/, with what it uses (Button) and lib/blocks.ts.
Usage
Without content, the block shows its example. Pass your own, typed by the block's schema, from a content file (here, the example with one field changed):
The summary and the reviews are content you copy in: nothing is fetched. Quote real reviews, shortened if needed, never rewritten, and give the real average and count. source is a label ("Google"); no third-party logo is shown.
Content
| Field | Type | Limits | Guidance |
|---|---|---|---|
title | string | 2–48 chars | 'What our guests say', 'Reviews'. |
summary | object | The average and how many reviews it is over, from where they were left. Real numbers only. | |
summary.score | number | 0–5 | The average out of 5, e.g. 4.8. |
summary.count | integer | ≥ 0 | How many reviews the average is over. |
summary.sourceoptional | string | ≤ 24 chars | Where the reviews were left, as a label: 'Google'. |
summary.hrefoptional | string | A link to read them all or to leave one. | |
reviews | object[] | 3–9 items | Real reviews, in the customers' words; shorten them, never rewrite them. |
reviews[].author | string | 1–48 chars | As the customer signs: 'Aïcha N.', 'Paul from Bonapriso'. |
reviews[].rating | integer | 1–5 | |
reviews[].text | string | 12–400 chars | In the customer's words. |
reviews[].dateoptional | string | date | 'YYYY-MM-DD', shown in the project's locale. |
reviews[].sourceoptional | string | ≤ 24 chars | Where it was left, as a label: 'Google', 'In the shop'. Never a logo. |
localeoptional | string | A BCP 47 locale for the score and dates ('en-CM'); the page's language when left out. | |
labels | object | The words around the numbers. | |
labels.outOf | string | 1–16 chars | After a score: 'out of 5'. |
labels.reviews | string | 1–16 chars | After the count: 'reviews'. |
labels.onoptional | string | ≤ 8 chars, default "on" | Before the source: '320 reviews on Google'. |
labels.readAlloptional | string | ≤ 32 chars | The link to all of them: 'Read all reviews'. |
Props
| Prop | Notes |
|---|---|
content | ReviewsRatingContent; the example when left out |
id | the section's id, for anchor links; "reviews" by default |
headingLevel | 1, 2 or 3: the heading's tag; 2 by default |
className | on the <section>, for spacing |
Accessibility
- Every score is written out ("4.8 out of 5"); the stars are decoration.
- Reviews are
figures with ablockquoteand a caption naming the author.