{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonial",
  "type": "registry:ui",
  "title": "Testimonial",
  "description": "Testimonial card with a quote, avatar with initials fallback, name and role, using semantic figure and blockquote markup. Built in Tailwind for landing pages.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.minidev.pro/r/avatar.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/testimonial.tsx",
      "type": "registry:ui",
      "target": "components/ui/testimonial.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\n\n/** A quote card with the customer's avatar, name and role, for landing pages and case studies. */\ntype TestimonialProps = {\n  quote?: string\n  name?: string\n  role?: string\n  /** Avatar image; initials are used when absent. */\n  src?: string\n  className?: string\n}\n\n/** \"Maya Chen\" → \"MC\"; single words keep their first two letters. */\nfunction initials(name: string) {\n  const parts = name.trim().split(/\\s+/)\n  return (parts.length > 1 ? parts[0][0] + parts[parts.length - 1][0] : name.slice(0, 2)).toUpperCase()\n}\n\nfunction Testimonial({\n  quote = \"Lumen took our month-end close from six days to two. The invoice workflow is the first finance tool the whole team actually likes using.\",\n  name = \"Maya Chen\",\n  role = \"Head of Finance, Northwind\",\n  src,\n  className,\n}: TestimonialProps) {\n  return (\n    <figure\n      data-slot=\"testimonial\"\n      className={cn(\"w-full max-w-md rounded-xl border border-border bg-surface p-6\", className)}\n    >\n      <blockquote className=\"text-base leading-[1.55] text-fg\">“{quote}”</blockquote>\n      <figcaption className=\"mt-4 flex items-center gap-3\">\n        <Avatar className=\"size-9\">\n          {src ? <AvatarImage src={src} alt=\"\" /> : null}\n          <AvatarFallback>{initials(name)}</AvatarFallback>\n        </Avatar>\n        <div>\n          <div className=\"text-sm font-medium text-fg\">{name}</div>\n          {role ? <div className=\"text-xs text-fg-muted\">{role}</div> : null}\n        </div>\n      </figcaption>\n    </figure>\n  )\n}\nexport { Testimonial }\nexport type { TestimonialProps }\n"
    }
  ]
}
