Calm motion: animations on this site only fade, with no movement
Review summary
The average stars, the count, and a bar for each star level
Sums up the reviews of a product or a show, over the list of reviews. A click on a bar shows only the reviews with that number of stars. For one rating that a person gives, use the rating.
Basic
4.51182 reviews
Showing all reviews
countsis the number of reviews with 5, 4, 3, 2, and 1 star, in that order.- The summary shows the average with one decimal, five stars filled up to the average, and the number of reviews.
- Each bar shows the share of one star level. With
filterable(on by default), the bars are toggle buttons. A click setsv-model:filterto the level, and a second click clears it. The other bars turn gray. localesets the format of the numbers (defaulten).- The stars are an image with the average in words. Each bar tells screen readers its level and its count, such as "4 stars: 236 reviews". Change the words with
labelsor a label pack:average(a function of the score),reviews(a function of the count), andlevel(a function of the stars and the count).
Usage
ts
import { BlessReviewSummary } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
counts* | number[] | — | the number of reviews with 5, 4, 3, 2, and 1 star, in that order |
filterable | boolean | true | the bars are buttons that set `v-model:filter` |
locale | string | "en" | the language of the numbers, for example `id` |
labels | Partial<{ average: (score: string) => string; reviews: (count: number) => string; level: (stars: number, count: number) => string; }> | — | |
filter | number | — | the star level that filters the reviews, or none |
Events
| Name | Payload | Description |
|---|---|---|
update:filter | [value: number | undefined] |