Staaarter

Quote With Metric Badges

A quote card that surfaces a concrete, quantified result inline as small badges next to the quote, rather than in a separate stat block: badges like "+40% conversion" or "2x retention" sit directly beneath the quote text, above the attribution.

By Staaarter Team
Testimonials
Docs
Live preview

Docs

Installation

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

npx shadcn add https://staaarter.com/r/quote-with-metric-badges.json

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

Usage

The file also exports testimonial18Demo, 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 { Testimonial18, testimonial18Demo } from "@/components/blocks/testimonials/testimonial18";

export default function Page() {
  return <Testimonial18 {...testimonial18Demo} />;
}

Props

PropTypeDefaultDescription
quotestringnoneThe customer quote.
metricsMetric[]noneOne or two short metric labels rendered as badges near the quote, e.g. [{ label: "+40% conversion" }].
authorPersonnoneName, role, and optional avatar of the person quoted.
classNamestringnoneExtra classes for the outer section element.

Types

type Metric = {
  label: string;
};

type Person = {
  name: string;
  role: string;
  avatar?: { src: string; alt: string };
};

Behavior notes

  • Fully static/decorative: this is a Server Component with no event handlers or client state.
  • Metric badges use the Badge component's secondary variant and render only when metrics is non-empty.
  • Avatar renders a real photo when author.avatar.src is provided and falls back to initials via initialsFromName otherwise.