{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"logo-cloud","type":"registry:block","title":"Logo cloud","description":"Trusted by wordmark grid with hover reveal of client outcomes and an optional two row marquee mode.","dependencies":["lucide-react","motion"],"registryDependencies":["utils"],"files":[{"path":"registry/items/logo-cloud/logo-cloud.tsx","type":"registry:block","target":"components/facade/logo-cloud.tsx","content":"\"use client\";\n\nimport * as React from \"react\";\nimport { motion, useReducedMotion } from \"motion/react\";\nimport { ArrowUpRight } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface LogoCloudItem {\n  name: string;\n  /** Short line revealed on hover, e.g. an outcome. */\n  detail?: string;\n  href?: string;\n  /** Optional custom mark. Defaults to a typographic wordmark. */\n  logo?: React.ReactNode;\n}\n\nexport interface LogoCloudProps {\n  eyebrow?: string;\n  title?: string;\n  description?: string;\n  logos?: LogoCloudItem[];\n  /** \"grid\" shows a hover-reveal grid, \"marquee\" scrolls logos in two rows. */\n  variant?: \"grid\" | \"marquee\";\n  /** Marquee loop duration in seconds. */\n  speed?: number;\n  className?: string;\n}\n\nconst EASE = [0.16, 1, 0.3, 1] as const;\n\n/* A few quiet sans treatments so wordmarks read like real logos without serif or mono fonts. */\nconst WORDMARK_STYLES = [\n  \"font-semibold tracking-[-0.02em]\",\n  \"text-[0.8em] font-medium uppercase tracking-[0.16em]\",\n  \"font-bold tracking-[-0.04em] lowercase\",\n  \"text-[0.82em] font-semibold uppercase tracking-[0.06em]\",\n  \"font-semibold tracking-[-0.02em]\",\n  \"text-[0.85em] font-medium tracking-[0.02em]\",\n  \"font-bold tracking-[-0.04em] lowercase\",\n  \"text-[0.8em] font-semibold uppercase tracking-[0.12em]\",\n];\n\nconst DEFAULT_LOGOS: LogoCloudItem[] = [\n  { name: \"Summit Roofing\", detail: \"+212% booked jobs\" },\n  { name: \"Bayside Dental\", detail: \"4.9 stars, 860 reviews\" },\n  { name: \"Keller Homes\", detail: \"$48M listings sold\" },\n  { name: \"Lone Star HVAC\", detail: \"3x inbound calls\" },\n  { name: \"Alder & Vine\", detail: \"Rebrand + new site\" },\n  { name: \"Copperline\", detail: \"Top 3 in Maps\" },\n  { name: \"brightpaws\", detail: \"11 locations live\" },\n  { name: \"Harbor Realty\", detail: \"-38% cost per lead\" },\n];\n\nfunction Wordmark({ item, index }: { item: LogoCloudItem; index: number }) {\n  if (item.logo) return <>{item.logo}</>;\n  return (\n    <span\n      className={cn(\n        \"whitespace-nowrap text-base md:text-lg lg:text-[22px]\",\n        WORDMARK_STYLES[index % WORDMARK_STYLES.length],\n      )}\n    >\n      {item.name}\n    </span>\n  );\n}\n\nfunction GridCell({ item, index }: { item: LogoCloudItem; index: number }) {\n  const reduce = useReducedMotion();\n  const Tag = item.href ? \"a\" : \"div\";\n  return (\n    <motion.li\n      initial={{ opacity: 0, y: 12 }}\n      whileInView={{ opacity: 1, y: 0 }}\n      viewport={{ once: true, margin: \"-40px 0px\" }}\n      transition={{ duration: 0.7, delay: reduce ? 0 : index * 0.05, ease: EASE }}\n      className=\"relative overflow-hidden rounded-[20px] bg-muted\"\n    >\n      <Tag\n        {...(item.href ? { href: item.href, \"aria-label\": item.detail ? `${item.name}, ${item.detail}` : item.name } : {})}\n        className=\"group relative flex h-28 items-center justify-center overflow-hidden px-3 outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring sm:h-32 sm:px-4\"\n      >\n        <span className=\"text-foreground/40 transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] group-hover:-translate-y-3 group-hover:text-foreground group-focus-visible:-translate-y-3 group-focus-visible:text-foreground\">\n          <Wordmark item={item} index={index} />\n        </span>\n        {item.detail && (\n          <span className=\"absolute inset-x-0 bottom-4 flex translate-y-3 items-center justify-center gap-1 text-[13px] font-medium text-muted-foreground opacity-0 transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)] group-hover:translate-y-0 group-hover:opacity-100 group-focus-visible:translate-y-0 group-focus-visible:opacity-100 sm:bottom-5\">\n            {item.detail}\n            {item.href && <ArrowUpRight className=\"size-3\" aria-hidden />}\n          </span>\n        )}\n      </Tag>\n    </motion.li>\n  );\n}\n\nfunction MarqueeRow({\n  logos,\n  reverse,\n  speed,\n  offset,\n}: {\n  logos: LogoCloudItem[];\n  reverse?: boolean;\n  speed: number;\n  offset: number;\n}) {\n  return (\n    <div\n      // Decorative: the full client list is rendered once for screen readers below the rows.\n      aria-hidden\n      className=\"group flex overflow-hidden [mask-image:linear-gradient(to_right,transparent,black_12%,black_88%,transparent)]\"\n      style={{\n        [\"--marquee-gap\" as string]: \"1rem\",\n        [\"--marquee-duration\" as string]: `${speed}s`,\n      }}\n    >\n      <ul\n        className={cn(\n          \"flex w-max shrink-0 animate-marquee items-center gap-[var(--marquee-gap)] py-1 group-hover:[animation-play-state:paused]\",\n          reverse && \"[animation-direction:reverse]\",\n        )}\n      >\n        {[...logos, ...logos].map((item, i) => (\n          <li\n            key={i}\n            className=\"flex h-14 items-center justify-center rounded-full bg-muted px-7 text-foreground/45 transition-colors hover:text-foreground\"\n          >\n            <Wordmark item={item} index={(i % logos.length) + offset} />\n          </li>\n        ))}\n      </ul>\n    </div>\n  );\n}\n\nexport function LogoCloud({\n  eyebrow = \"Trusted locally\",\n  title = \"The go-to partner for 140+ businesses across Texas\",\n  description = \"From single-location shops to regional brokerages, owners stay with us for the results.\",\n  logos = DEFAULT_LOGOS,\n  variant = \"grid\",\n  speed = 40,\n  className,\n}: LogoCloudProps) {\n  const half = Math.ceil(logos.length / 2);\n  return (\n    <section className={cn(\"bg-background py-20 text-foreground sm:py-28\", className)}>\n      <div className=\"mx-auto max-w-[1120px] px-6\">\n        <div className=\"mx-auto max-w-[640px] text-center\">\n          {eyebrow && (\n            <p className=\"text-xs font-medium uppercase tracking-[0.08em] text-muted-foreground\">\n              {eyebrow}\n            </p>\n          )}\n          {title && (\n            <h2 className=\"mt-4 text-balance text-[34px] font-semibold leading-[1.05] tracking-[-0.03em] sm:text-[44px]\">\n              {title}\n            </h2>\n          )}\n          {description && (\n            <p className=\"mt-5 text-pretty text-[17px] leading-relaxed text-muted-foreground\">\n              {description}\n            </p>\n          )}\n        </div>\n\n        {variant === \"grid\" ? (\n          <ul className=\"mt-14 grid grid-cols-2 gap-3 md:grid-cols-4\">\n            {logos.map((item, i) => (\n              <GridCell key={item.name} item={item} index={i} />\n            ))}\n          </ul>\n        ) : (\n          <div className=\"mt-14 flex flex-col gap-3\">\n            <MarqueeRow logos={logos.slice(0, half)} speed={speed} offset={0} />\n            <MarqueeRow logos={logos.slice(half)} speed={speed * 1.15} offset={half} reverse />\n            <ul className=\"sr-only\">\n              {logos.map((l) => (\n                <li key={l.name}>{l.name}</li>\n              ))}\n            </ul>\n          </div>\n        )}\n      </div>\n    </section>\n  );\n}\n\nexport default LogoCloud;\n"}],"categories":["sections"],"meta":{"tier":"free","demo":"import { LogoCloud } from \"./logo-cloud\";\n\nexport default function Demo() {\n  return (\n    <div>\n      <LogoCloud />\n      <LogoCloud\n        variant=\"marquee\"\n        eyebrow=\"Featured partners\"\n        title=\"Austin brands that grow with us\"\n        description=\"Hover a row to pause it.\"\n        className=\"pt-0 sm:pt-0\"\n      />\n    </div>\n  );\n}\n"}}