{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "local-reviews-wall",
  "type": "registry:component",
  "title": "Local Reviews Wall",
  "description": "A rating summary with a star distribution beside two columns of review cards that drift slowly in opposite directions and pause on hover.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "local",
    "reviews",
    "testimonials",
    "rating",
    "marquee",
    "social proof",
    "bakery"
  ],
  "docs": "https://hyperblur.dev/effects/local-reviews-wall",
  "files": [
    {
      "path": "registry/hyperblur/local-reviews-wall.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/local-reviews-wall.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface LocalReview {\n  name: string;\n  rating: number;\n  text: string;\n  source: string;\n  date: string;\n  detail?: string;\n}\n\nexport interface LocalReviewsWallProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  rating?: number;\n  total?: number;\n  distribution?: [number, number, number, number, number];\n  reviews?: LocalReview[];\n  sources?: { name: string; rating: string; color: string }[];\n  cta?: { label: string; href: string };\n  speed?: number;\n  accent?: string;\n}\n\nconst defaultReviews: LocalReview[] = [\n  { name: \"Priya Raman\", rating: 5, source: \"Google\", date: \"2 days ago\", detail: \"Morning bun and flat white\", text: \"The cardamom morning bun is the best thing I have eaten this year. Flaky, sticky, not too sweet. I now walk ten blocks out of my way every Saturday.\" },\n  { name: \"Marcus Bell\", rating: 5, source: \"Yelp\", date: \"1 week ago\", text: \"Ordered a birthday cake two days out and they still made it happen. Lemon and elderflower, perfectly moist, and the piping was gorgeous.\" },\n  { name: \"Hannah Cole\", rating: 4, source: \"Google\", date: \"3 weeks ago\", detail: \"Weekend brunch\", text: \"Gets busy after ten, so come early. Sourdough toast with whipped butter is simple and perfect.\" },\n  { name: \"Diego Alvarez\", rating: 5, source: \"Tripadvisor\", date: \"1 month ago\", text: \"We found this place on our first morning in town and came back every day of the trip. The staff remembered our order by day three.\" },\n  { name: \"Sofia Lindqvist\", rating: 5, source: \"Google\", date: \"1 month ago\", detail: \"Catering order\", text: \"They catered our office breakfast for forty people. Everything arrived warm, labelled for allergies, and the pastries disappeared in minutes.\" },\n  { name: \"Theo Nakamura\", rating: 5, source: \"Yelp\", date: \"2 months ago\", text: \"Their rye is the real deal. Dense, tangy, keeps for days. Worth the early alarm to get one before they sell out.\" },\n  { name: \"Grace Okonkwo\", rating: 5, source: \"Google\", date: \"2 months ago\", detail: \"Gluten-free options\", text: \"As a celiac I rarely get to enjoy a bakery. They have a dedicated gluten-free shelf and the almond cake is incredible.\" },\n  { name: \"Liam Brennan\", rating: 4, source: \"Tripadvisor\", date: \"3 months ago\", text: \"Great coffee, lovely window seats and very friendly baristas. Wish they stayed open a little later on weekdays.\" },\n];\n\nconst defaultSources = [\n  { name: \"Google\", rating: \"4.9\", color: \"#4f8df5\" },\n  { name: \"Yelp\", rating: \"4.8\", color: \"#e0493b\" },\n  { name: \"Tripadvisor\", rating: \"5.0\", color: \"#2fa37a\" },\n];\n\nconst css = `\n.hb-kl8 {\n  --hb-kl8-accent: #e2a03f;\n  box-sizing: border-box;\n  width: 100%;\n  container-type: inline-size;\n  background: #fbfaf7;\n  color: #1d1b18;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kl8 *, .hb-kl8 *::before, .hb-kl8 *::after { box-sizing: border-box; }\n.hb-kl8-wrap { max-width: 1120px; margin: 0 auto; padding: 80px 24px 88px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 48px; align-items: center; }\n.hb-kl8-eyebrow { margin: 0 0 14px; color: #8a8378; font-size: 13px; font-weight: 500; }\n.hb-kl8-title { margin: 0; font-family: var(--font-grotesk, ui-sans-serif, system-ui, sans-serif); font-weight: 600; font-size: clamp(30px, 4cqw, 44px); line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; }\n.hb-kl8-score { display: flex; align-items: flex-end; gap: 14px; margin: 28px 0 6px; }\n.hb-kl8-big { font-family: var(--font-grotesk, ui-sans-serif, system-ui, sans-serif); font-size: 68px; font-weight: 600; line-height: .85; letter-spacing: -.05em; }\n.hb-kl8-stars { display: inline-flex; gap: 2px; color: var(--hb-kl8-accent); }\n.hb-kl8-count { margin: 6px 0 0; color: #8a8378; font-size: 13.5px; }\n.hb-kl8-bars { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }\n.hb-kl8-bar { display: grid; grid-template-columns: 14px minmax(0, 1fr) 36px; align-items: center; gap: 10px; color: #6d675d; font-size: 12.5px; font-variant-numeric: tabular-nums; }\n.hb-kl8-track { height: 6px; border-radius: 999px; background: #ece8e0; overflow: hidden; }\n.hb-kl8-fill { display: block; height: 100%; border-radius: inherit; background: var(--hb-kl8-accent); transform-origin: left; animation: hb-kl8-grow 1.1s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--hb-kl8-i) * 80ms + .2s); }\n@keyframes hb-kl8-grow { from { transform: scaleX(0); } }\n.hb-kl8-sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }\n.hb-kl8-src { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; background: #fff; border: 1px solid #ebe6dc; font-size: 12.5px; color: #3a362f; }\n.hb-kl8-src i { width: 8px; height: 8px; border-radius: 50%; background: var(--hb-kl8-c); }\n.hb-kl8-src b { font-weight: 600; }\n.hb-kl8-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 12px 18px; border-radius: 999px; background: #1d1b18; color: #fbfaf7; font-size: 14.5px; font-weight: 600; text-decoration: none; transition: background .2s, transform .2s; }\n.hb-kl8-cta:hover { background: #3b362e; transform: translateY(-1px); }\n.hb-kl8-cta:focus-visible { outline: 2px solid var(--hb-kl8-accent); outline-offset: 3px; }\n.hb-kl8-wall { position: relative; min-width: 0; height: 560px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; overflow: hidden; mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 12%, #000 88%, transparent); }\n.hb-kl8-col { min-width: 0; }\n.hb-kl8-reel { display: flex; flex-direction: column; gap: 16px; animation: hb-kl8-up var(--hb-kl8-dur) linear infinite; }\n.hb-kl8-col:nth-child(2) .hb-kl8-reel { animation-direction: reverse; }\n.hb-kl8-wall:hover .hb-kl8-reel, .hb-kl8-wall:focus-within .hb-kl8-reel { animation-play-state: paused; }\n@keyframes hb-kl8-up { to { transform: translateY(calc(-50% - 8px)); } }\n.hb-kl8-card { padding: 20px; border-radius: 18px; background: #fff; border: 1px solid #ece7de; box-shadow: 0 1px 0 #fff inset, 0 14px 30px -24px rgba(60, 40, 10, .35); transition: transform .3s, box-shadow .3s, border-color .3s; }\n.hb-kl8-card:hover { transform: translateY(-3px); border-color: #e0d7c6; box-shadow: 0 20px 40px -26px rgba(60, 40, 10, .45); }\n.hb-kl8-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }\n.hb-kl8-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--hb-kl8-c) 10%, #fff); color: color-mix(in srgb, var(--hb-kl8-c) 80%, #000); font-size: 11.5px; font-weight: 600; }\n.hb-kl8-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--hb-kl8-c); }\n.hb-kl8-text { margin: 0; color: #3a362f; font-size: 14.5px; line-height: 1.6; }\n.hb-kl8-detail { display: inline-block; margin-top: 12px; padding: 3px 8px; border-radius: 6px; background: #f5f2ec; color: #7a7366; font-size: 12px; }\n.hb-kl8-who { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1ede5; }\n.hb-kl8-av { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 12.5px; font-weight: 600; }\n.hb-kl8-name { font-size: 14px; font-weight: 600; }\n.hb-kl8-date { color: #9a9387; font-size: 12.5px; }\n@container (max-width: 860px) {\n  .hb-kl8-wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 64px 20px 72px; }\n  .hb-kl8-wall { height: 480px; }\n}\n@container (max-width: 480px) {\n  .hb-kl8-wall { grid-template-columns: minmax(0, 1fr); }\n  .hb-kl8-col:nth-child(2) { display: none; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kl8 *, .hb-kl8 *::before, .hb-kl8 *::after { animation: none !important; transition: none !important; }\n  .hb-kl8-wall { height: auto; max-height: 640px; overflow: auto; }\n}\n`;\n\nconst avatarColors = [\"#c8763a\", \"#5b7f6a\", \"#7a6bb0\", \"#b5546a\", \"#3f7ea6\", \"#9a8a3c\"];\n\nfunction hash(s: string) {\n  let h = 0;\n  for (let i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) >>> 0;\n  return h;\n}\n\nfunction Stars({ value, size = 14 }: { value: number; size?: number }) {\n  return (\n    <span className=\"hb-kl8-stars\" role=\"img\" aria-label={`${value} out of 5 stars`}>\n      {Array.from({ length: 5 }, (_, i) => (\n        <svg key={i} width={size} height={size} viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n          <path d=\"M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.2l-5.7 3.1 1.2-6.4-4.7-4.4 6.4-.8z\" fill={i < Math.round(value) ? \"currentColor\" : \"#e3ddd2\"} />\n        </svg>\n      ))}\n    </span>\n  );\n}\n\nexport function LocalReviewsWall({\n  eyebrow = \"Juniper Bakehouse · Reviews\",\n  title = \"Loved by the whole neighbourhood.\",\n  rating = 4.9,\n  total = 1386,\n  distribution = [1201, 142, 28, 9, 6],\n  reviews = defaultReviews,\n  sources = defaultSources,\n  cta = { label: \"Order for pickup\", href: \"#order\" },\n  speed = 1,\n  accent = \"#e2a03f\",\n  className,\n  style,\n  ...rest\n}: LocalReviewsWallProps) {\n  const sum = distribution.reduce((a, b) => a + b, 0) || 1;\n  const colorFor = (src: string) => sources.find((s) => s.name === src)?.color ?? \"#8a8378\";\n  const columns: LocalReview[][] = [[], []];\n  reviews.forEach((r, i) => columns[i % 2].push(r));\n  const duration = `${(Math.max(reviews.length, 4) * 6.5 / Math.max(speed, 0.1)).toFixed(1)}s`;\n\n  return (\n    <section\n      className={[\"hb-kl8\", className].filter(Boolean).join(\" \")}\n      style={{ \"--hb-kl8-accent\": accent, \"--hb-kl8-dur\": duration, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-local-reviews-wall\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kl8-wrap\">\n        <div>\n          <p className=\"hb-kl8-eyebrow\">{eyebrow}</p>\n          <h2 className=\"hb-kl8-title\">{title}</h2>\n          <div className=\"hb-kl8-score\">\n            <span className=\"hb-kl8-big\">{rating.toFixed(1)}</span>\n            <Stars value={rating} size={20} />\n          </div>\n          <p className=\"hb-kl8-count\">Based on {total.toLocaleString(\"en-US\")} reviews</p>\n          <ul className=\"hb-kl8-bars\" aria-label=\"Rating distribution\">\n            {distribution.map((n, i) => {\n              const pct = (n / sum) * 100;\n              return (\n                <li key={i} className=\"hb-kl8-bar\">\n                  <span>{5 - i}</span>\n                  <span className=\"hb-kl8-track\"><span className=\"hb-kl8-fill\" style={{ width: `${pct.toFixed(1)}%`, \"--hb-kl8-i\": i } as React.CSSProperties} /></span>\n                  <span>{pct.toFixed(0)}%</span>\n                </li>\n              );\n            })}\n          </ul>\n          <div className=\"hb-kl8-sources\">\n            {sources.map((s) => (\n              <span key={s.name} className=\"hb-kl8-src\" style={{ \"--hb-kl8-c\": s.color } as React.CSSProperties}>\n                <i aria-hidden=\"true\" />{s.name} <b>{s.rating}</b>\n              </span>\n            ))}\n          </div>\n          {cta ? (\n            <a className=\"hb-kl8-cta\" href={cta.href}>\n              {cta.label}\n              <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n                <path d=\"M5 12h14M13 6l6 6-6 6\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n              </svg>\n            </a>\n          ) : null}\n        </div>\n        <div className=\"hb-kl8-wall\" aria-label=\"Customer reviews\" role=\"region\">\n          {columns.map((col, ci) => (\n            <div key={ci} className=\"hb-kl8-col\">\n              <div className=\"hb-kl8-reel\">\n                {[0, 1].map((copy) =>\n                  col.map((r) => (\n                    <article key={`${copy}-${r.name}`} className=\"hb-kl8-card\" aria-hidden={copy === 1 ? true : undefined}>\n                      <div className=\"hb-kl8-top\">\n                        <Stars value={r.rating} />\n                        <span className=\"hb-kl8-badge\" style={{ \"--hb-kl8-c\": colorFor(r.source) } as React.CSSProperties}>\n                          <i aria-hidden=\"true\" />{r.source}\n                        </span>\n                      </div>\n                      <p className=\"hb-kl8-text\">{r.text}</p>\n                      {r.detail ? <span className=\"hb-kl8-detail\">{r.detail}</span> : null}\n                      <div className=\"hb-kl8-who\">\n                        <span className=\"hb-kl8-av\" style={{ background: avatarColors[hash(r.name) % avatarColors.length] }} aria-hidden=\"true\">\n                          {r.name.split(\" \").map((p) => p[0]).join(\"\").slice(0, 2)}\n                        </span>\n                        <div>\n                          <div className=\"hb-kl8-name\">{r.name}</div>\n                          <div className=\"hb-kl8-date\">{r.date}</div>\n                        </div>\n                      </div>\n                    </article>\n                  )),\n                )}\n              </div>\n            </div>\n          ))}\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}