NK

Search

Search pages, posts, and components

All components

Testimonial

Cards

A customer quote, as a bordered card or a plain pull quote.

Dropped it in on Friday, shipped on Monday.

GHGrace HopperCTO, Ledger

Installation

Add it with the shadcn CLI:

$pnpm dlx shadcn@latest add https://nawalkattel.com.np/r/testimonial.json
Or install manually
  1. 1. Install dependencies

    pnpm add clsx tailwind-merge
  2. 2. Copy the component source into components/library/testimonial.tsx

Props

PropTypeDefaultDescription
quotestring - The quoted text.
namestring - Who said it.
rolestring - Their title or company.
avatarstring - Image URL; falls back to initials.
variant"card" | "plain""card"Bordered card, or a bare quote.

Accessibility

  • Uses <figure> and <figcaption>, so the attribution is tied to the quote.
  • Falls back to text initials when no avatar is given.
  • Avatars carry the person's name as alt text.

Dependencies

clsxtailwind-merge