{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "logo-cloud",
  "title": "Logo Cloud / Trusted By",
  "description": "A trusted-by logo grid with hairline cells where logos swap in place one at a time with a blur, a customer metric that slides up when a logo is hovered or focused, monochrome logos that light up, and pausing while people look.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/logo-cloud/logo-cloud.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport interface CloudLogo {\n  name: string;\n  /** Your logo: an <img>, an <svg> or any node. Without it a simple wordmark is drawn from the name. */\n  logo?: React.ReactNode;\n  /** Short proof shown when the cell is hovered or focused, e.g. \"38% fewer meetings\". */\n  metric?: string;\n  href?: string;\n}\n\nexport interface LogoCloudProps {\n  title?: string;\n  /** Small text on the right of the title row, e.g. a customer count. */\n  stat?: string;\n  logos?: CloudLogo[];\n  columns?: 3 | 4 | 5 | 6;\n  rows?: 1 | 2 | 3;\n  /** Swap logos in place when there are more logos than cells. */\n  rotate?: boolean;\n  /** Milliseconds between swaps. */\n  interval?: number;\n  /** Logos are shown in one colour until hovered. */\n  monochrome?: boolean;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { bg: \"#0A0A0A\", text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.55)\", faint: \"rgba(245,244,241,0.38)\", line: \"rgba(255,255,255,0.08)\", cell: \"#0A0A0A\", hover: \"#111111\", ring: \"rgba(245,244,241,0.6)\" },\n  light: { bg: \"#FAFAF8\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.55)\", faint: \"rgba(10,10,10,0.4)\", line: \"rgba(10,10,10,0.08)\", cell: \"#FAFAF8\", hover: \"#FFFFFF\", ring: \"rgba(10,10,10,0.5)\" },\n};\n\ntype Mark = \"ring\" | \"tri\" | \"square\" | \"arc\" | \"bars\" | \"diamond\" | \"plus\" | \"wave\";\nconst DEFAULT_LOGOS: (CloudLogo & { mark: Mark; style: \"bold\" | \"light\" | \"serif\" | \"caps\" | \"mono\" })[] = [\n  { name: \"Halcyon\", mark: \"ring\", style: \"bold\", metric: \"140 people moved in a month\" },\n  { name: \"Northwind\", mark: \"tri\", style: \"caps\", metric: \"Standups down to 5 minutes\" },\n  { name: \"Kestrel\", mark: \"bars\", style: \"light\", metric: \"Onboarding in 1 day, not 4\" },\n  { name: \"Lumen\", mark: \"arc\", style: \"serif\", metric: \"2x campaigns per quarter\" },\n  { name: \"Oakline\", mark: \"diamond\", style: \"bold\", metric: \"Quarter planned in a week\" },\n  { name: \"Fieldnote\", mark: \"square\", style: \"mono\", metric: \"A release every 9 days\" },\n  { name: \"Brightline\", mark: \"plus\", style: \"caps\", metric: \"Audit passed, zero gaps\" },\n  { name: \"Tessellate\", mark: \"wave\", style: \"light\", metric: \"3x deploys per week\" },\n  { name: \"Morrow\", mark: \"ring\", style: \"serif\", metric: \"One plan for 3 offices\" },\n  { name: \"Copperleaf\", mark: \"arc\", style: \"bold\", metric: \"60% less email\" },\n  { name: \"Harbor\", mark: \"tri\", style: \"mono\", metric: \"14 clinics, one board\" },\n  { name: \"Parallel\", mark: \"bars\", style: \"caps\", metric: \"11 hours saved per project\" },\n  { name: \"Vantage\", mark: \"diamond\", style: \"light\", metric: \"Specs read twice as often\" },\n  { name: \"Quill\", mark: \"square\", style: \"serif\", metric: \"Docs search under 100 ms\" },\n  { name: \"Atlas\", mark: \"plus\", style: \"bold\", metric: \"40 teams, one roadmap\" },\n  { name: \"Ember\", mark: \"wave\", style: \"caps\", metric: \"Churn down 18%\" },\n];\n\nfunction MarkIcon({ mark }: { mark: Mark }) {\n  const c = \"currentColor\";\n  return (\n    <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" aria-hidden=\"true\" className=\"shrink-0\">\n      {mark === \"ring\" && <circle cx=\"12\" cy=\"12\" r=\"8\" fill=\"none\" stroke={c} strokeWidth=\"3.5\" />}\n      {mark === \"tri\" && <path d=\"M12 3 22 20H2z\" fill={c} />}\n      {mark === \"square\" && <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"5\" fill={c} />}\n      {mark === \"arc\" && <path d=\"M3 19a9 9 0 0 1 18 0h-4.5a4.5 4.5 0 0 0-9 0z\" fill={c} />}\n      {mark === \"bars\" && (\n        <>\n          <rect x=\"3\" y=\"10\" width=\"4\" height=\"11\" rx=\"1.2\" fill={c} />\n          <rect x=\"10\" y=\"6\" width=\"4\" height=\"15\" rx=\"1.2\" fill={c} />\n          <rect x=\"17\" y=\"3\" width=\"4\" height=\"18\" rx=\"1.2\" fill={c} />\n        </>\n      )}\n      {mark === \"diamond\" && <path d=\"M12 2 22 12 12 22 2 12z\" fill={c} />}\n      {mark === \"plus\" && <path d=\"M9 3h6v6h6v6h-6v6H9v-6H3V9h6z\" fill={c} />}\n      {mark === \"wave\" && <path d=\"M2 14c3-6 6-6 10 0s7 6 10 0\" fill=\"none\" stroke={c} strokeWidth=\"3.5\" strokeLinecap=\"round\" />}\n    </svg>\n  );\n}\n\nfunction Wordmark({ name, mark, style }: { name: string; mark: Mark; style: string }) {\n  const cls = style === \"bold\" ? \"font-bold tracking-[-0.03em]\" : style === \"light\" ? \"font-light tracking-[-0.01em]\" : style === \"serif\" ? \"font-serif italic tracking-[-0.01em]\" : style === \"caps\" ? \"font-semibold tracking-[0.14em] uppercase text-[14px]\" : \"font-mono font-medium tracking-[-0.02em] text-[15px]\";\n  return (\n    <span className=\"flex items-center gap-2 text-[18px] leading-none\">\n      <MarkIcon mark={mark} />\n      <span className={cls}>{name}</span>\n    </span>\n  );\n}\n\nexport function LogoCloud({ title = \"Trusted by product teams at\", stat = \"9,000+ teams\", logos, columns = 4, rows = 2, rotate = true, interval = 2200, monochrome = true, theme = \"dark\", className }: LogoCloudProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const pool = React.useMemo(() => logos ?? DEFAULT_LOGOS, [logos]);\n  const cells = Math.min(columns * rows, pool.length);\n  const [shown, setShown] = React.useState(() => Array.from({ length: cells }, (_, i) => i));\n  const [paused, setPaused] = React.useState(false);\n  const next = React.useRef(cells);\n  const tick = React.useRef(0);\n\n  React.useEffect(() => {\n    if (!rotate || reduce || paused || pool.length <= cells) return;\n    const id = setInterval(() => {\n      tick.current += 1;\n      // Visit cells in a scattered but repeatable order so swaps feel random.\n      const cell = (tick.current * 5 + 3) % cells;\n      setShown((prev) => {\n        const out = [...prev];\n        let candidate = next.current % pool.length;\n        let guard = 0;\n        while (out.includes(candidate) && guard++ < pool.length) candidate = (candidate + 1) % pool.length;\n        out[cell] = candidate;\n        next.current = candidate + 1;\n        return out;\n      });\n    }, interval);\n    return () => clearInterval(id);\n  }, [rotate, reduce, paused, pool.length, cells, interval]);\n\n  const colsClass = { 3: \"@[560px]:grid-cols-3\", 4: \"@[640px]:grid-cols-4\", 5: \"@[640px]:grid-cols-3 @[860px]:grid-cols-5\", 6: \"@[640px]:grid-cols-3 @[960px]:grid-cols-6\" }[columns];\n\n  return (\n    <section className={cn(\"@container w-full\", className)} style={{ background: p.bg, color: p.text }}>\n      <div className=\"mx-auto max-w-6xl px-6 py-16 @[640px]:py-20\">\n        <div className=\"mb-6 flex flex-wrap items-baseline justify-between gap-3\">\n          <h2 className=\"m-0 text-[14px] font-medium\" style={{ color: p.muted }}>\n            {title}\n          </h2>\n          {stat && (\n            <p className=\"m-0 text-[13px] tabular-nums\" style={{ color: p.faint }}>\n              {stat}\n            </p>\n          )}\n        </div>\n        <ul\n          className={cn(\"m-0 grid list-none grid-cols-2 gap-px overflow-hidden rounded-2xl p-0\", colsClass)}\n          style={{ background: p.line, border: `1px solid ${p.line}` }}\n          onMouseEnter={() => setPaused(true)}\n          onMouseLeave={() => setPaused(false)}\n          onFocus={() => setPaused(true)}\n          onBlur={(e) => !e.currentTarget.contains(e.relatedTarget as Node) && setPaused(false)}\n        >\n          {Array.from({ length: cells }, (_, i) => (shown[i] !== undefined && shown[i] < pool.length ? shown[i] : i)).map((idx, cell) => {\n            const l = pool[idx] as CloudLogo & { mark?: Mark; style?: string };\n            const content = l.logo ?? <Wordmark name={l.name} mark={l.mark ?? \"ring\"} style={l.style ?? \"bold\"} />;\n            const Tag = l.href ? \"a\" : \"div\";\n            return (\n              <li key={cell} className=\"relative\" style={{ background: p.cell }}>\n                <Tag\n                  {...(l.href ? { href: l.href } : { tabIndex: l.metric ? 0 : -1 })}\n                  aria-label={l.metric ? `${l.name}: ${l.metric}` : l.name}\n                  className=\"group relative flex h-24 items-center justify-center overflow-hidden px-4 no-underline outline-none focus-visible:ring-2 focus-visible:ring-inset @[640px]:h-28\"\n                  style={{ color: p.text, [\"--tw-ring-color\" as string]: p.ring }}\n                >\n                  <span aria-hidden=\"true\" className=\"absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-visible:opacity-100\" style={{ background: p.hover }} />\n                  <AnimatePresence mode=\"popLayout\" initial={false}>\n                    <motion.span\n                      key={idx}\n                      aria-hidden=\"true\"\n                      className={cn(\"relative flex transition-[opacity,filter,transform] duration-300\", monochrome && \"opacity-60 grayscale group-hover:opacity-100 group-hover:grayscale-0\", l.metric && \"group-hover:-translate-y-3 group-focus-visible:-translate-y-3\")}\n                      initial={reduce ? false : { opacity: 0, y: 14, filter: \"blur(6px)\" }}\n                      animate={{ opacity: 1, y: 0, filter: \"blur(0px)\" }}\n                      exit={reduce ? undefined : { opacity: 0, y: -14, filter: \"blur(6px)\" }}\n                      transition={{ duration: 0.5, ease: [0.2, 0.7, 0.2, 1] }}\n                    >\n                      {content}\n                    </motion.span>\n                  </AnimatePresence>\n                  {l.metric && (\n                    <span aria-hidden=\"true\" className=\"absolute inset-x-3 bottom-3 translate-y-2 text-center text-[12px] leading-[1.3] opacity-0 transition-all duration-300 group-hover:translate-y-0 group-hover:opacity-100 group-focus-visible:translate-y-0 group-focus-visible:opacity-100 @[640px]:bottom-4\" style={{ color: p.muted }}>\n                      {l.metric}\n                    </span>\n                  )}\n                </Tag>\n              </li>\n            );\n          })}\n        </ul>\n      </div>\n    </section>\n  );\n}\n\nexport default LogoCloud;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}