Review Cards
Review section with the average score, distribution bars, a write-a-review prompt, and dated reviews marked when the purchase is verified, or a note when there are none yet.
Parts
| Part | File | Does |
|---|---|---|
| ReviewCards | ReviewCards.vue | Shows the average rating with its breakdown, review cards and a write-a-review prompt. |
Styling
All of Review Cards’s styles live in review-cards.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 breakdown, review cards and a write-a-review prompt. Renders a <div>.
Props 16
| Prop | Type | Default | |
|---|---|---|---|
| average | number | 0 | |
| |||
| totalCount | number | 0 | |
| |||
| counts | RatingCount[] | [] | |
| |||
| reviews | ReviewItem[] | [] | |
| |||
| title | string | 'Customer reviews' | |
| |||
| summaryLabel | ((count: number) => string) | `Based on ${count} ${count === 1 ? 'review' : 'reviews'}` | |
| |||
| distributionLabel | string | 'Review data' | |
| |||
| starReviewsLabel | string | 'star reviews' | |
| |||
| shareTitle | string | 'Share your thoughts' | |
| |||
| shareText | string | 'If you've used this product, share your thoughts with other customers' | |
| |||
| writeReviewLabel | string | 'Write a review' | |
| |||
| reviewsLabel | string | 'Recent reviews' | |
| |||
| verifiedLabel | string | 'Verified purchase' | |
| |||
| emptyLabel | string | 'No reviews yet.' | |
| |||
| locale | string | — | |
| |||
| class | ClassValue | — | |
| |||
Events 1
| Event | Payload | |
|---|---|---|
| write-review | — | |
| ||
Recipe review-cards 1 group
Recipe review-cards-author 1 group
Recipe review-cards-average 1 group
Uses @page-title, every property overridden.
Recipe review-cards-content 1 group
Recipe review-cards-heading 1 group
Uses @heading, every property overridden.