{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "radial-gradient-logo-cloud",
  "title": "Radial Gradient Logo Cloud",
  "description": "A \"trusted by\" logo strip rising over the glowing horizon of a planet.",
  "dependencies": [
    "@paper-design/shaders-react"
  ],
  "files": [
    {
      "path": "registry/shaders/radial-gradient-logo-cloud/radial-gradient-logo-cloud.tsx",
      "content": "import { StaticRadialGradient } from \"@paper-design/shaders-react\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Logo = {\n  name: string\n  /** Any image URL. Logos are shown in white, whatever their colors. */\n  src: string\n  href?: string\n}\n\nconst DEFAULT_LOGOS: Logo[] = [\n  {\n    name: \"Northwind\",\n    src: createLogo(\"Northwind\", '<path d=\"M4 34 20 6l16 28H27l-7-12-7 12z\"/>'),\n  },\n  {\n    name: \"Loomly\",\n    src: createLogo(\n      \"Loomly\",\n      '<circle cx=\"20\" cy=\"20\" r=\"11.5\" fill=\"none\" stroke=\"#000\" stroke-width=\"7\"/>'\n    ),\n  },\n  {\n    name: \"Fieldnote\",\n    src: createLogo(\n      \"Fieldnote\",\n      '<path d=\"M6 7h28v7H6zm0 9.5h20v7H6zM6 26h12v7H6z\"/>'\n    ),\n  },\n  {\n    name: \"Kite\",\n    src: createLogo(\"Kite\", '<path d=\"M20 4 35 20 20 36 5 20z\"/>'),\n  },\n  {\n    name: \"Folio\",\n    src: createLogo(\"Folio\", '<path d=\"M6 5h19l9 9v21H6z\"/>'),\n  },\n  {\n    name: \"Arcline\",\n    src: createLogo(\n      \"Arcline\",\n      '<path d=\"M4 33a16 16 0 0 1 32 0h-8a8 8 0 0 0-16 0z\"/>'\n    ),\n  },\n]\n\ntype RadialGradientLogoCloudProps = React.ComponentProps<\"section\"> & {\n  title?: string\n  logos?: Logo[]\n  /** Colors of the horizon, from its bright rim inwards. */\n  colors?: string[]\n  colorBack?: string\n}\n\nfunction RadialGradientLogoCloud({\n  title = \"Trusted by teams at\",\n  logos = DEFAULT_LOGOS,\n  colors = [\"#c7d2fe\", \"#6366f1\", \"#1e1b4b\"],\n  colorBack = \"#000000\",\n  className,\n  style,\n  ...props\n}: RadialGradientLogoCloudProps) {\n  return (\n    <section\n      data-slot=\"radial-gradient-logo-cloud\"\n      className={cn(\n        \"dark relative isolate flex w-full flex-col items-center justify-center gap-10 overflow-hidden px-6 pt-24 pb-52 text-white\",\n        className\n      )}\n      style={{ backgroundColor: colorBack, ...style }}\n      {...props}\n    >\n      {/*\n        A huge circle sitting below the section, so only the glowing top of it\n        shows, like a planet's horizon. The canvas keeps a fixed shape so the\n        curve looks the same at every section size.\n      */}\n      <div\n        aria-hidden\n        className=\"absolute bottom-0 left-1/2 -z-10 aspect-3/1 w-[max(100%,64rem)] -translate-x-1/2\"\n      >\n        <StaticRadialGradient\n          className=\"size-full\"\n          // The gradient runs from the circle's edge to its center. Fading in\n          // from the background softens the rim, and padding the end with the\n          // background keeps the inside of the planet dark.\n          colors={[colorBack, ...colors, ...Array(6).fill(colorBack)]}\n          colorBack={colorBack}\n          radius={1.6}\n          offsetY={0.78}\n          focalDistance={0}\n          falloff={1}\n          mixing={0.9}\n          distortion={0}\n          grainMixer={0}\n          grainOverlay={0.1}\n          fit=\"cover\"\n        />\n      </div>\n      <p className=\"font-mono text-[11px] tracking-widest text-white/50 uppercase\">\n        {title}\n      </p>\n      <ul className=\"flex max-w-4xl flex-wrap items-center justify-center gap-x-12 gap-y-8\">\n        {logos.map((logo) => {\n          const image = (\n            // eslint-disable-next-line @next/next/no-img-element\n            <img\n              src={logo.src}\n              alt={logo.name}\n              className=\"h-7 w-auto brightness-0 invert\"\n            />\n          )\n          return (\n            <li\n              key={logo.src}\n              className=\"opacity-60 transition-opacity hover:opacity-100\"\n            >\n              {logo.href ? <a href={logo.href}>{image}</a> : image}\n            </li>\n          )\n        })}\n      </ul>\n    </section>\n  )\n}\n\n// Placeholder wordmarks: a black mark followed by the name, as an SVG data URI.\nfunction createLogo(name: string, mark: string) {\n  const textWidth = name.length * 12.5\n  const width = 46 + textWidth\n  const svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${width}\" height=\"40\" viewBox=\"0 0 ${width} 40\">${mark}<text x=\"46\" y=\"29\" textLength=\"${textWidth}\" lengthAdjust=\"spacingAndGlyphs\" font-family=\"Helvetica, Arial, sans-serif\" font-size=\"25\" font-weight=\"700\">${name}</text></svg>`\n  return `data:image/svg+xml,${encodeURIComponent(svg)}`\n}\n\nexport { RadialGradientLogoCloud, type Logo }\n",
      "type": "registry:component"
    }
  ],
  "categories": [
    "sections",
    "logos"
  ],
  "type": "registry:block"
}