Staaarter

Social Proof with Ratings

A centered eyebrow and heading sit above a star rating display with a review count, followed by a row of stat proofs such as active-user count and average rating, for a compact trust-indicator section.

By Staaarter Team
Feature
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/social-proof-with-ratings.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature140.tsx instead.

Usage

The file also exports feature140Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Feature140, feature140Demo } from "@/components/blocks/feature/feature140";

export default function Page() {
  return <Feature140 {...feature140Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringnoneSmall label above the heading.
headingstringnoneSection heading.
descriptionstringnoneSupporting copy under the heading.
ratingnumbernoneRating out of 5, e.g. 4.9. Rounded to the nearest whole star for the star display.
reviewCountstringnoneReview count text shown next to the rating, e.g. "2,400+ reviews".
statsFeature140Stat[]noneRow of stat proofs shown under the rating.
classNamestringnoneExtra classes for the outer section element.

Types

type Feature140Stat = { value: string; label: string };

Behavior notes

  • Fully static server component, no client-side state.
  • Stars render from a fixed 5-element array; each star's fill is driven by `Math.round(rating)` against its index, using `fill-current text-primary` for a filled star and `fill-none text-muted-foreground/30` for an empty one, never a literal color class.
  • The star row is aria-hidden with an adjacent sr-only string spelling out the rating and review count, so the meaning isn't conveyed by the icons alone.