# Review Card

A customer review with author, rating, text, photos, a reply from the store and a helpful button.

- Category: Commerce
- Page: https://wunderui.com/components/review-card
- Tier: Core and Pro

## Install

Review Card ships with WunderUI Core and Pro in the @wunderui/react package.

## Import

```tsx
import { ReviewCard, ReviewCardProps } from "@wunderui/react"
```

## Minimal usage

Then use it:

```tsx
import * as React from "react"
import { ReviewCard } from "@wunderui/react"

export function ProductReview() {
  const [helpful, setHelpful] = React.useState(false)

  return (
    <ReviewCard
      author={{ name: "Priya Raman", color: "indigo" }}
      verified
      rating={5}
      date="Nov 2, 2026"
      title="Stable at full height"
      helpfulCount={helpful ? 25 : 24}
      helpful={helpful}
      onHelpful={() => setHelpful((value) => !value)}
    >
      Stable at full height and quiet. Assembly took twenty minutes.
    </ReviewCard>
  )
}
```

Expected result: You should see a card for Priya Raman with a green Verified purchase badge, five stars, a title, the text and a Helpful button. Pressing the button turns it indigo and makes the count 25.

## When to use

### Use Review Card for

- A customer review in a list on a product page
- A review with a reply from the shop, photos and a vote that it helped
- A review that a moderator holds back, with a note that says why

### Use something else

- [Rating](https://wunderui.com/components/rating) for only the rating of a product, in a line or a tile (read-only, size sm), or asking a customer for one, where the stars are a control
- [Progress](https://wunderui.com/components/progress) for the number of reviews per star level above the list (ProgressRow)

## Keyboard

The card is an article and has no focus stop of its own. Only the buttons inside are focusable, in this order: the menu button, Helpful, Report, each only when you pass its handler.

| Key | Action |
|---|---|
| `Tab` or `Shift+Tab` | Moves focus to the next or previous button inside the card, then on to the next card. Photos and the store reply are skipped. |
| `Enter` or `Space` | Presses the focused button. On Helpful it calls `onHelpful`, which flips `helpful` and the count in your state; on Report and the menu button it calls their handler. |

## Behavior

What the card does with its props, its optional parts and its handlers. It is controlled: it holds no state of its own.

- **Controlled vote:** The card never changes the helpful state or count: Helpful calls your handler and you flip the state. A voted button shows a check mark and an indigo border, and the count reads 1 person or 24 people.
- **Optional parts:** The menu button, Helpful and Report exist only with their handlers, and the title, photos, reply, badge and count only with their props. The footer always renders, so it may be empty.
- **Author:** The avatar shows the first two initials of the author name unless you set them. A photo falls back to the initials if it fails; otherwise the tint is the author colour, orange by default.
- **Flagged:** Flagged puts a yellow note under the header and turns the card border yellow. The note is in the page for everyone who sees the card, so show it only to the people who should see it.
- **Photos:** Every photo is a 72 px tile cropped to fit, with an empty alt text, and the row wraps when there are too many. A tile that fails to load falls back to the yellow tint and the package icon.
- **Long content:** The text, title and reply wrap and the card grows. In a narrow card the name and badge wrap onto a second line and the footer stacks its count beside the buttons, so nothing is cut off.
- **Words in the card:** Verified purchase, Helpful, Report, Review menu and the count line are English and fixed. The date is a node, so write it in the format of your language yourself.
- **Motion and reduced motion:** The card does not animate. The buttons inside use the shared press feedback, a 3 percent scale that is switched off under reduced motion.

## Anatomy

- `ReviewCard`: An article with a hairline border, a 16 px radius and 16 px padding, with 12 px between its sections. It takes no other attributes and is not named, so give a list of reviews a label.
- `Avatar`: The author as tinted initials, or as a photo with the initials as the fallback.
- `Author name`: The author name in 12 px semibold text.
- `Verified badge`: A green Verified purchase badge beside the name.
- `Rating and date`: The stars from the rating, then the date in 11 px tertiary text. The number itself is not printed.
- `Menu button`: A ghost icon button with three dots, named Review menu. It only calls its handler; the card does not open a menu itself.
- `Title`: The title in 14 px semibold text, above the text.
- `Text`: The review text in a 12 px paragraph. Use plain text or inline markup only, because it sits in a p element.
- `Photos`: One 72 px square tile with an 8 px radius for every photo address. The row wraps when it is too wide, and the tiles have no alt text and no focus.
- `Store reply`: A box with 8 px corners and a 1 px border on the page background. It holds the sender in semibold, the date after a dot and the reply text below, with an optional logo before the name.
- `Helpful count`: The line N people found this helpful on the left of the footer. It says 1 person for one.
- `Helpful button`: A plain small button that reads Helpful, and Helpful with a check mark and an indigo border once the vote is set. It carries the pressed state.
- `Report`: A text button in the link colour that only calls its handler.

## Best practices

### When to use

- Use Review Card in review lists on product pages. For the star breakdown above the list, use ProgressRow.

### Do

- Set the verified flag only for confirmed purchases; it adds a Verified purchase badge.
- Pass the helpful handler with the helpful state to toggle the button, and the helpful count for the count text.
- Own the vote. Keep the helpful state and the count in your own state, add one to the count while helpful is true, and send the vote to your server in the handler.
- Open your own menu or sheet from the menu handler, and your own report form from the report handler. Both are plain click handlers.
- Give a list of reviews a label, for example a section named Reviews. Every card is an unnamed article, and every card has a link that reads only Report.
- Use the flagged state only for a moderator or the author, with a sentence that says why the review is held. Customers do not need to see it.

### Don't

- Don't put block elements in the review text. It is wrapped in a paragraph, so pass plain text or inline markup.
- Don't rely on the photos to carry information. They have no alt text, so say what they show in the text.
- Don't show the helpful button with a count that never changes. A button that does nothing is worse than no button, so leave the handler out when voting is off.

## API reference

### ReviewCard

| Prop | Type | Default | Description |
|---|---|---|---|
| author* | Person |  | The person who wrote the review: `name` (required), `initials` to replace the two letters taken from the name, `src` for a photo, and `color` for the tint of the initials, orange by default. Required. |
| children* | React.ReactNode |  | The text of the review, in a 12 px paragraph. Plain text or inline markup only. Required. |
| date* | React.ReactNode |  | The date of the review, shown after the stars. Any node, so you format it. Required. |
| rating* | number |  | The rating, drawn as Stars. It is rounded to a whole star, and the number is not printed. Required. |
| className | string |  | Added to the `article`. Use it for the width and the margins. |
| flagged | React.ReactNode |  | A moderation note in a yellow box above the title. It also turns the border of the card yellow. |
| helpful | boolean |  | Whether the current reader has voted. It sets `aria-pressed` and the check mark of the Helpful button. Controlled: you own it. |
| helpfulCount | number |  | The number in the line `N people found this helpful` on the left of the footer. The line is left out without it. |
| onHelpful | () => void |  | Adds the Helpful button and is called when it is pressed. Flip `helpful` and update `helpfulCount` in it. |
| onMenu | () => void |  | Adds a three-dot button named Review menu at the end of the header and is called when it is pressed. The card draws no menu; open yours from the handler. |
| onReport | () => void |  | Adds the Report link and is called when it is pressed. Open your own report form in it. |
| photos | string[] |  | A list of image addresses, one 72 px tile each, under the text. The tiles have no alt text. |
| reply | { from: React.ReactNode; date?: React.ReactNode; text: React.ReactNode; logo?: React.ReactNode } |  | The answer of the shop: `from` (the name), `text`, and optionally `date` and `logo`, which is drawn in front of the name. The box sits between the photos and the footer. |
| title | React.ReactNode |  | A short headline above the text, in 14 px semibold. Nothing is drawn without it. |
| verified | boolean |  | Adds a green Verified purchase badge beside the name. Set it only for a confirmed purchase. |

## Examples

### Content: text, title, photos or the reply of the shop

### Author: initials, photo or a verified purchase

### Rating: the stars follow the rating

### Actions: Helpful, Report and the menu button

### State: default, flagged or a long text

## In context

### Review list: sorted, with votes

The strip changes the sort and the list shows the first three. Helpful toggles the vote and the count on each card, and a vote stays when the sort changes.

### Moderation: a held review and two decisions

The flagged note says why the review is held. Keep review clears it, Remove review takes the card away and a status line says what happened; both buttons are plain.

## For AI agents

`get_component("review-card")`

Hand your agent this page as Markdown or the WunderUI MCP server, not a screenshot.
