{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"testimonials-grid","type":"registry:block","title":"Testimonials grid","description":"A masonry wall of quotes with stars and who said them, in three columns, then two, then one.","dependencies":["lucide-react"],"registryDependencies":["https://dashral.com/r/utils.json","https://dashral.com/r/avatar.json"],"files":[{"path":"registry/dashral/blocks/testimonials-grid.tsx","type":"registry:file","target":"components/dashral/blocks/testimonials-grid.tsx","content":"import { Star } from \"lucide-react\"\nimport { Avatar } from \"../avatar\"\nimport { cn } from \"../lib/utils\"\n\nexport type Quote = { text: string; name: string; role: string; src?: string; /** Out of 5; 5 without it. */ stars?: number }\n\nconst sampleQuotes: Quote[] = [\n  { text: \"We replaced three spreadsheets and a weekly meeting. The numbers are just there now.\", name: \"Olivia Martin\", role: \"Head of Ops, Acme\", src: \"https://randomuser.me/api/portraits/women/44.jpg\" },\n  { text: \"Set up in an afternoon. By Friday the whole sales team had it open on a second screen.\", name: \"Liam Johnson\", role: \"Sales Lead, Globex\", src: \"https://randomuser.me/api/portraits/men/32.jpg\" },\n  {\n    text: \"The alerts are the best part. I hear about a drop in checkout before a customer emails us about it, which used to be the other way round.\",\n    name: \"Sofia Davis\",\n    role: \"Product Designer, Initech\",\n    src: \"https://randomuser.me/api/portraits/women/68.jpg\",\n  },\n  { text: \"Finally a dashboard our finance team trusts. The Excel export alone saved us hours.\", name: \"Budi Santoso\", role: \"CFO, PT Nusantara\" },\n  { text: \"Clean, fast, and it works on my phone in a taxi. That's all I wanted.\", name: \"Ava Chen\", role: \"Founder, Umbrella Co.\" },\n  {\n    text: \"We tried four tools. This is the one people kept opening without being reminded to.\",\n    name: \"Noah Kim\",\n    role: \"COO, Hooli\",\n    src: \"https://randomuser.me/api/portraits/men/75.jpg\",\n  },\n]\n\n/**\n * What customers say, as cards in columns that flow like a masonry wall: the quote, five stars, and who said it.\n * Three columns, then two, then one on phones. Every part comes from props.\n */\nexport function TestimonialsGrid({\n  eyebrow = \"Customers\",\n  title = \"Teams open it every morning\",\n  description = \"Over 2,000 teams run their week from Acme. Here's what a few of them say.\",\n  quotes = sampleQuotes,\n}: {\n  eyebrow?: React.ReactNode\n  title?: React.ReactNode\n  description?: React.ReactNode\n  quotes?: Quote[]\n}) {\n  return (\n    <section className=\"bg-background px-4 py-16 sm:px-6 sm:py-24\">\n      <div className=\"mx-auto max-w-6xl\">\n        <div className=\"mx-auto max-w-2xl text-center\">\n          {eyebrow && <p className=\"text-sm font-medium text-primary-text\">{eyebrow}</p>}\n          <h2 className=\"mt-3 text-3xl font-semibold tracking-[-0.03em] text-balance sm:text-4xl\">{title}</h2>\n          {description && <p className=\"mt-4 text-pretty text-muted-foreground\">{description}</p>}\n        </div>\n        <ul className=\"mt-12 gap-4 [column-fill:_balance] sm:columns-2 lg:columns-3\">\n          {quotes.map((quote) => (\n            <li key={quote.name} className=\"mb-4 break-inside-avoid\">\n              <figure className=\"grid gap-4 rounded-2xl border bg-card p-6\">\n                <div className=\"flex gap-0.5\" aria-label={`${quote.stars ?? 5} out of 5 stars`} role=\"img\">\n                  {Array.from({ length: 5 }, (_, i) => (\n                    <Star key={i} className={cn(\"size-4 text-warning\", i < (quote.stars ?? 5) ? \"fill-warning\" : \"opacity-30\")} aria-hidden />\n                  ))}\n                </div>\n                <blockquote className=\"text-sm leading-relaxed\">“{quote.text}”</blockquote>\n                <figcaption className=\"flex items-center gap-3\">\n                  <Avatar src={quote.src} name={quote.name} alt=\"\" />\n                  <span className=\"grid\">\n                    <span className=\"text-sm font-medium\">{quote.name}</span>\n                    <span className=\"text-xs text-muted-foreground\">{quote.role}</span>\n                  </span>\n                </figcaption>\n              </figure>\n            </li>\n          ))}\n        </ul>\n      </div>\n    </section>\n  )\n}\n"}],"cssVars":{"theme":{"color-primary-text":"var(--primary-text, var(--primary))","color-warning":"var(--warning)","color-warning-foreground":"var(--warning-foreground)","color-warning-text":"var(--warning-text)"},"light":{"warning":"#f59200","warning-foreground":"oklch(0.3 0.07 60)","warning-text":"#964e00"},"dark":{"warning":"#f59200","warning-foreground":"oklch(0.25 0.06 60)","warning-text":"#ffba42"}}}