{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "testimonials-01",
  "title": "Testimonials",
  "description": "Customer quotes, one featured on the emphasised surface and the rest on tiles beside it, each signed with a name and role. Renders in any Satori UI design system (cueit, skita, folio or a generated one): install a system first.",
  "registryDependencies": [
    "avatar"
  ],
  "files": [
    {
      "path": "design-systems/blocks/testimonials-01.tsx",
      "content": "import * as React from \"react\";\r\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\";\r\nimport { cn } from \"@/lib/utils\";\r\n\r\n/**\r\n * Customer quotes: one featured on the emphasised surface, the rest on\r\n * plain tiles beside it. Each quote names a person, a role and a company,\r\n * because a quote nobody signed persuades nobody.\r\n *\r\n * Written against the block contract only, so it takes the look of\r\n * whichever design system scopes it. The first quote with `featured` takes\r\n * the emphasis; without one, the first quote does.\r\n */\r\n\r\nexport type Testimonial = {\r\n  quote: string;\r\n  name: string;\r\n  role: string;\r\n  /** Leave unset to show initials. */\r\n  avatar?: string;\r\n  featured?: boolean;\r\n};\r\n\r\nconst SAMPLE: Testimonial[] = [\r\n  {\r\n    quote:\r\n      \"We closed the books two days faster the first month. Nobody chases invoices any more, and our customers say paying us is the easiest part of their week.\",\r\n    name: \"Ines Okafor\",\r\n    role: \"Head of finance, Kettle & Fern\",\r\n    featured: true,\r\n  },\r\n  {\r\n    quote: \"The reminders alone paid for it. Late payments went from a third of invoices to almost none.\",\r\n    name: \"Tomás Ferreira\",\r\n    role: \"Founder, Ridgeway\",\r\n  },\r\n  {\r\n    quote: \"Our auditor asked for a year of records and got them in one file the same afternoon.\",\r\n    name: \"Priya Raman\",\r\n    role: \"Controller, Halcyon\",\r\n  },\r\n  {\r\n    quote: \"Billing customers in their own currency stopped a whole class of support tickets.\",\r\n    name: \"Jonah Weiss\",\r\n    role: \"Operations lead, Stackwise\",\r\n  },\r\n  {\r\n    quote: \"Setting it up took an afternoon. We moved two hundred customers over without a single mistake.\",\r\n    name: \"Amara Lindqvist\",\r\n    role: \"COO, Quill & Co\",\r\n  },\r\n];\r\n\r\nconst initials = (name: string) =>\r\n  name\r\n    .split(/\\s+/)\r\n    .map((part) => part[0])\r\n    .slice(0, 2)\r\n    .join(\"\")\r\n    .toUpperCase();\r\n\r\nexport type Testimonials01Props = Omit<React.ComponentProps<\"section\">, \"title\"> & {\r\n  eyebrow?: string;\r\n  title?: string;\r\n  testimonials?: Testimonial[];\r\n};\r\n\r\nexport function Testimonials01({\r\n  eyebrow = \"Customers\",\r\n  title = \"Teams that stopped chasing payments\",\r\n  testimonials = SAMPLE,\r\n  className,\r\n  ...props\r\n}: Testimonials01Props) {\r\n  const featuredIndex = Math.max(\r\n    0,\r\n    testimonials.findIndex((t) => t.featured),\r\n  );\r\n  const featured = testimonials[featuredIndex];\r\n  const rest = testimonials.filter((_, i) => i !== featuredIndex);\r\n\r\n  return (\r\n    <section\r\n      className={cn(\"@container/testimonials w-full px-6 py-16 @3xl/testimonials:py-24\", className)}\r\n      {...props}\r\n    >\r\n      <div className=\"mx-auto mb-12 flex max-w-2xl flex-col items-center gap-4 text-center\">\r\n        <p className=\"ds-label\">{eyebrow}</p>\r\n        <h2 className=\"ds-title text-balance text-foreground [--ds-title-size:1.875rem] @3xl/testimonials:[--ds-title-size:2.25rem]\">\r\n          {title}\r\n        </h2>\r\n      </div>\r\n\r\n      <div className=\"mx-auto grid max-w-5xl gap-4 @3xl/testimonials:grid-cols-3\">\r\n        {featured && (\r\n          <figure className=\"ds-tile-emphasis flex flex-col justify-between gap-8 p-8 @3xl/testimonials:col-span-2 @3xl/testimonials:row-span-2\">\r\n            <blockquote className=\"ds-title text-pretty [--ds-title-size:1.375rem] @3xl/testimonials:[--ds-title-size:1.75rem]\">\r\n              “{featured.quote}”\r\n            </blockquote>\r\n            <Person testimonial={featured} />\r\n          </figure>\r\n        )}\r\n        {rest.map((t) => (\r\n          <figure key={t.name} className=\"ds-tile flex flex-col justify-between gap-6 p-6\">\r\n            <blockquote className=\"ds-text text-pretty text-foreground\">“{t.quote}”</blockquote>\r\n            <Person testimonial={t} />\r\n          </figure>\r\n        ))}\r\n      </div>\r\n    </section>\r\n  );\r\n}\r\n\r\nfunction Person({ testimonial }: { testimonial: Testimonial }) {\r\n  return (\r\n    <figcaption className=\"flex items-center gap-3\">\r\n      <Avatar className=\"size-9\">\r\n        {testimonial.avatar && <AvatarImage src={testimonial.avatar} alt=\"\" />}\r\n        <AvatarFallback className=\"ds-small font-medium\">{initials(testimonial.name)}</AvatarFallback>\r\n      </Avatar>\r\n      <span className=\"ds-small flex flex-col\">\r\n        <span className=\"font-medium\">{testimonial.name}</span>\r\n        <span className=\"text-muted-foreground\">{testimonial.role}</span>\r\n      </span>\r\n    </figcaption>\r\n  );\r\n}\r\n",
      "type": "registry:component",
      "target": "components/satori-ui/blocks/testimonials-01.tsx"
    }
  ],
  "type": "registry:block"
}