Data display
ReviewCard
Free17.7 KB gzippedOne customer review: the reviewer with avatar, star rating, date, verified badge, headline, body (clamped with "Read more"), a would- recommend indicator, photos, helpful votes, and an owner reply. Rendered as an <article> named by its headline (or the reviewer).
Accessibility: WCAG 2.2 AA · No A or AA violations in light or dark mode · Keys: Tab, Enter, Space · Full report
More in Pro
ReviewCard is free. ReviewsSection, in the paid Pro add-on, builds a complete reviews section from it, with sorting, filters, pages and a write-a-review form.Import
import { ReviewCard } from "@vjdesigns/vjdesigns-ui";
Importing only ReviewCard adds about 17.7 KB of minified, gzipped JavaScript to your app (React not included). The stylesheet is shared by every component and loaded once: 75.1 KB gzipped.
Examples
Basic
One review: the reviewer, stars, date, a "Verified purchase" badge, the headline and the body. It's an <article> named by its headline, and the date is a <time> formatted for the reader's language.
Best grip I've had in years
Recommends
import { ReviewCard } from "@vjdesigns/vjdesigns-ui";
export function Basic() {
return (
<div style={{ width: "100%", maxWidth: "36rem" }}>
<ReviewCard
author={{ name: "Ava Thompson", meta: "Seattle · 12 reviews" }}
rating={5}
date="2026-10-02"
verified
title="Best grip I've had in years"
recommend
>
Played three tournaments in these and the grip held up on dusty courts. They ran a half size small, so order up.
</ReviewCard>
</div>
);
}
Helpful and reply
onHelpfulChange adds "Helpful? Yes / No" toggle buttons with aria-pressed; pressing the pressed one again takes the vote back. response shows an owner reply under the review.
Good ball, slow shipping
Doesn't recommend
Response from Hoops Outfitters ·
import { useState } from "react";
import { ReviewCard } from "@vjdesigns/vjdesigns-ui";
export function HelpfulAndReply() {
const [helpful, setHelpful] = useState<boolean | null>(null);
return (
<div style={{ width: "100%", maxWidth: "36rem" }}>
<ReviewCard
author={{ name: "Marcus Lee" }}
rating={3}
date="2026-09-14"
title="Good ball, slow shipping"
recommend={false}
helpfulCount={12 + (helpful === true ? 1 : 0)}
helpful={helpful}
onHelpfulChange={setHelpful}
response={{
author: "Hoops Outfitters",
date: "2026-09-16",
body: "Sorry about the wait, Marcus. We've moved to a faster carrier for your area.",
}}
>
The ball feels great indoors, but it took two weeks to arrive.
</ReviewCard>
</div>
);
}
Long review
Long text is clamped to maxLines with a "Read more" button that has aria-expanded. actions adds your own footer buttons, such as Report.
Solid camp for beginners
import { Button, ReviewCard } from "@vjdesigns/vjdesigns-ui";
export function LongReview() {
return (
<div style={{ width: "100%", maxWidth: "36rem" }}>
<ReviewCard
author={{ name: "Jordan Diaz" }}
rating={4}
date="2026-08-30"
title="Solid camp for beginners"
maxLines={2}
actions={
<Button size="sm" variant="ghost">
Report
</Button>
}
>
My daughter went to the week-long camp in August. The coaches split the kids by age and skill on day one, which
kept the drills at the right level. Every afternoon ended with scrimmages, and the final day had a family game.
The only downside was the crowded parking lot at drop-off.
</ReviewCard>
</div>
);
}
Text only
Leave out rating for a text-only review, and change verifiedLabel to fit, such as "Verified attendee".
import { ReviewCard, Stack } from "@vjdesigns/vjdesigns-ui";
export function TextOnly() {
return (
<Stack gap={4} style={{ width: "100%", maxWidth: "36rem" }}>
<ReviewCard author={{ name: "Sam Okafor" }} date="2026-07-21" verified verifiedLabel="Verified attendee">
Great referees and the games started on time.
</ReviewCard>
</Stack>
);
}
Right to left
The first example again, inside a right-to-left LocaleProvider (Arabic). Layout, spacing and arrow icons mirror, and the components' built-in text is translated. The example's own text stays in English.
Basic
Best grip I've had in years
يوصي به
import { LocaleProvider } from "@vjdesigns/vjdesigns-ui";
import ar from "@vjdesigns/vjdesigns-ui/locales/ar";
// Basic is the "Basic" example above.
<LocaleProvider locale="ar" messages={ar}>
<Basic />
</LocaleProvider>
API reference
ReviewCard
New in 3.8.4| Prop | Type | Default |
|---|---|---|
authorRequiredThe reviewer. | ReviewAuthor | — |
ratingStar rating, shown with | number | — |
maxHighest rating. | number | 5 |
titleReview headline, rendered as a heading (see | ReactNode | — |
headingLevelHeading level of | 23456 | 3 |
dateISO date ("YYYY-MM-DD") the review was written. Formatted for the locale in a | string | — |
verifiedShow a "Verified purchase" badge. | boolean | false |
verifiedLabelText of the verified badge, e.g. "Verified attendee". | string | "Verified purchase" |
recommend
| boolean | — |
childrenThe review body. Long text is clamped to | ReactNode | — |
maxLinesLines shown before "Read more". | number | 5 |
mediaPhotos or other media, shown under the body. | ReactNode | — |
helpfulCountHow many people found the review helpful. Shown as "12 people found this helpful". | number | — |
helpfulThe viewer's helpful vote (controlled): | boolean | null | — |
defaultHelpfulInitial helpful vote (uncontrolled). | boolean | null | null |
onHelpfulChangeCalled with the viewer's helpful vote. Setting it shows "Helpful? Yes / No" toggle buttons; pressing the pressed one again clears it ( | (helpful: boolean | null) => void | — |
responseAn owner or seller reply, shown indented under the review. | ReviewResponse | — |
actionsExtra actions in the footer, e.g. Report or Share buttons. | ReactNode | — |
Also accepts native <article> attributes, plus className, style and ref.
See what changed in each version in the Changelog.
Accessibility report
ReviewCard targets WCAG 2.2 AA. Below: a live axe-core audit of this page's examples, Lighthouse scores for the page in both modes, the accessibility behavior built into the component, and the checks only a person can do.
axe-core audit (live)
Checking the examples above…
Lighthouse audit
Light mode
Score 10035 passed · 0 failed · 30 not applicable · 10 to check by hand
Dark mode
Score 10035 passed · 0 failed · 30 not applicable · 10 to check by hand
Lighthouse 13.5.0 audits the whole docs page (header and sidebar included), not just the examples, in English. Last run 11/27/2026. Some failed audits carry no weight in the score, so a page can score 100 and still list one.
Built-in behavior
Keyboard
| Key | Action |
|---|---|
| Tab | Moves through "Read more", the helpful Yes and No buttons, and your actions. |
| EnterSpace | Expands or collapses the review, or presses Yes or No (press it again to take the vote back). |
Roles and states
| Element | Role | States and properties |
|---|---|---|
| Review | article | aria-labelledby (the headline, or the reviewer's name) |
| Headline | heading | Level from headingLevel (3) |
| Date | none | A <time datetime> formatted for the locale |
| "Read more" | button | aria-expanded, aria-controls (the body) |
| Helpful buttons | button | In a group named "Helpful?"; aria-pressed |
| Recommend and verified icons | none | aria-hidden; their text is shown next to them |
Manual checks
Automated tools find roughly a third of accessibility issues. Test these in your app, with your content.
| Check | What to test | WCAG 2.2 |
|---|---|---|
| Keyboard | Every action works with Tab, Shift+Tab, Enter, Space and the arrow keys, and focus never gets stuck. | 2.1.1 (A), 2.1.2 (A) |
| Focus | Focus moves in a logical order, is always visible, and isn't hidden behind sticky headers. | 2.4.3 (A), 2.4.7 (AA), 2.4.11 (AA), 2.4.13 (AAA) |
| Screen readers | Names, roles and states are announced correctly, and status changes are announced without moving focus. | 1.3.1 (A), 4.1.2 (A), 4.1.3 (AA) |
| Color | Meaning never depends on color alone; your own colors meet contrast in both modes. | 1.4.1 (A), 1.4.3 (AA), 1.4.11 (AA), 1.4.6 (AAA) |
| Zoom and reflow | At 200% text size and at 320px wide (400% zoom), nothing is cut off and no sideways scrolling is needed. | 1.4.4 (AA), 1.4.10 (AA), 1.4.12 (AA) |
| Pointer targets | Click and tap targets are at least 24×24px (44×44px for AAA), or spaced so they don't overlap. | 2.5.8 (AA), 2.5.5 (AAA) |
| Motion | Animations respect the reduced-motion setting. | 2.3.3 (AAA) |