nuxt-x-affiliate
Customer Reviews
User-submitted review list with star distribution histogram, verified-buyer badge, and helpful count.
Customer Reviews
The XAFCustomerReviews component renders user-submitted reviews — typically aggregated from Amazon / Walmart / Trustpilot — with a star-distribution histogram, an optional average-rating override, and a verified-buyer badge.
Components
<XAFCustomerReviews />
<XAFCustomerReviews
:reviews="[
{ author: 'Alex P.', rating: 5, text: 'Great keyboard — typing all day is a joy.', date: '2026-02-01', verified: true, helpful: 14, source: 'Amazon', location: 'Seattle, WA' },
{ author: 'Sam T.', rating: 4, text: 'Solid. Wish the battery was a bit longer.', date: '2026-01-22', verified: true, helpful: 6, source: 'Amazon' },
]"
:average-rating="4.4"
:total-count="1247"
title="What buyers say"
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
reviews | CustomerReview[] | required | Each review carries author, text, optional rating, date, source, verified, helpful, location. |
averageRating | number | computed | Override the computed average. |
totalCount | number | reviews.length | Override the total review count. |
title | string | "Customer Reviews" | Section heading. |
showDistribution | boolean | true | Show the star-distribution histogram. |
Review shape
interface CustomerReview {
author: string
rating?: number
text: string
date?: string // ISO
source?: string // e.g. "Amazon", "Walmart"
verified?: boolean
helpful?: number
location?: string
}
AI Context
component: XAFCustomerReviews
package: "@xenterprises/nuxt-x-affiliate"
use-when: User-submitted reviews with star distribution histogram, verified-buyer badge, and helpful count.
