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.jsonPrefer 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
| Prop | Type | Default | Description |
|---|---|---|---|
| quote | string | none | The customer quote. |
| metrics | Metric[] | none | One or two short metric labels rendered as badges near the quote, e.g. [{ label: "+40% conversion" }]. |
| author | Person | none | Name, role, and optional avatar of the person quoted. |
| className | string | none | Extra 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.
More Testimonials Blocks
View all →Single Large Quote
One large centered pull-quote with a decorative quote mark and a simple avatar attribution below.
Three Column Grid
Responsive grid of quote cards, each with a star rating, avatar, name, role, and quote text.
Quote Carousel
Interactive one-at-a-time quote carousel with prev/next arrows and clickable dot indicators.
Video Testimonial Grid
Grid of video-style testimonial cards, each a 16:9 thumbnail with a play-button overlay and a caption.
Masonry Wall
"Wall of love" style masonry layout of many short quote cards using CSS columns, not a JS library.
Quote With Stats Sidebar
Split layout pairing a large quote and attribution with a sidebar of 2-3 result stats.