# Review Summary

> Customer reviews section: the average, partial stars and a five-row breakdown where every row is a filter, beside the reviews. Mentioned-in-reviews chips filter by topic and highlight it in the text, a select sorts, long reviews expand in place, Helpful counts the visitor's vote, and team replies sit under the review they answer. Active filters show as removable tokens.

- Slug: `review-summary`
- Category: [Testimonials](https://www.assembli.design/category/testimonials.md)
- Type: block
- Tags: reviews, ratings, stars, social-proof, filter, sort, e-commerce
- npm dependencies: motion, lucide-react
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/review-summary
- Page: https://www.assembli.design/components/review-summary

![Review Summary preview](https://www.assembli.design/thumbnails/review-summary-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `eyebrow` | `React.ReactNode` | `"Reviews"` |  |
| `title` | `React.ReactNode` | `"What customers say"` |  |
| `reviews` (required) | `ReviewSummaryReview[]` |  |  |
| `distribution` | `[number, number, number, number, number]` |  | Counts for 5, 4, 3, 2 and 1 stars across every review you have, when `reviews` is only a sample. The average and total come from it. Defaults to counting `reviews`. |
| `topics` | `string[]` | `[]` | "Mentioned in reviews" chips. Each needs a matching entry in a review's `topics`. |
| `recommend` | `number` |  | Share who would recommend you, 0–1, shown under the breakdown. |
| `writeHref` | `string` |  | Where "Write a review" goes. Hidden when unset. |
| `brand` | `string` | `"Our team"` | Your company's name on replies. |
| `pageSize` | `number` | `4` |  |
| `starColor` | `string` | `"oklch(0.8 0.16 78)"` | Star color, any CSS color. |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/review-summary/review-summary.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/review-summary
```

Registry item JSON: https://www.assembli.design/r/review-summary.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
