Reviews
Review summary card with the average rating, a star distribution, the latest reviews with verified-purchase marks, and read-all and write-a-review actions.
Parts
| Part | File | Does |
|---|---|---|
| Reviews | Reviews.vue | Shows the average rating with its star breakdown and a few reviews. |
Styling
All of Reviews’s styles live in reviews.json. New to styling in Frontic UI? How styling works →
Install
- npm packages
- @lucide/vue
- reka-ui
Built from
API reference
Shows the average rating with its star breakdown and a few reviews.
Props 15
| Prop | Type | Default | |
|---|---|---|---|
| title | string | 'Customer reviews' | |
| |||
| description | string | — | |
| |||
| rating* | number | — | |
| |||
| total* | number | — | |
| |||
| distribution | ReviewsShare[] | [] | |
| |||
| reviews | ReviewsEntry[] | [] | |
| |||
| totalLabel | ((count: number) => string) | count === 1 ? '1 review' : `${count} reviews` | |
| |||
| starsLabel | ((stars: number) => string) | stars === 1 ? '1 star' : `${stars} stars` | |
| |||
| verifiedLabel | string | 'Verified purchase' | |
| |||
| readAllLabel | ((count: number) => string) | `Read all ${count}` | |
| |||
| writeLabel | string | 'Write a review' | |
| |||
| ratingShape | 'star' | 'dot' | 'star' | |
| |||
| surface | 'raised' | 'bare' | 'raised' | |
| |||
| locale | string | — | |
| |||
| class | ClassValue | — | |
| |||
Events 2
Data attributes 1
| Data attribute | Values | |
|---|---|---|
| data-surface | 'raised' | 'bare' | |
| ||