{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dot-pattern",
  "title": "Dot Pattern",
  "author": "VenusUI",
  "description": "A repeating dot grid background, with an optional fade toward the edges.",
  "files": [
    {
      "path": "registry/default/ui/dot-pattern.tsx",
      "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface DotPatternProps extends React.ComponentProps<\"svg\"> {\n  /** Distance between dots, in pixels. */\n  spacing?: number\n  /** Dot radius, in pixels. */\n  radius?: number\n  /** Fade the pattern out toward the edges. */\n  fade?: boolean\n}\n\n/**\n * A repeating dot grid that fills its positioned parent. Dots use\n * `currentColor`, so set the color with a text class, e.g. `text-border`.\n */\nfunction DotPattern({ spacing = 16, radius = 1, fade = false, className, style, ...props }: DotPatternProps) {\n  // useId output may contain characters that break `url(#id)`; keep it safe.\n  const id = `dot-pattern-${React.useId().replace(/[^a-zA-Z0-9_-]/g, \"\")}`\n  return (\n    <svg\n      aria-hidden=\"true\"\n      data-slot=\"dot-pattern\"\n      className={cn(\"pointer-events-none absolute inset-0 size-full text-foreground/15\", className)}\n      style={\n        fade\n          ? { maskImage: \"radial-gradient(ellipse at center, #000 30%, transparent 75%)\", ...style }\n          : style\n      }\n      {...props}\n    >\n      <defs>\n        <pattern id={id} width={spacing} height={spacing} patternUnits=\"userSpaceOnUse\">\n          <circle cx={spacing / 2} cy={spacing / 2} r={radius} fill=\"currentColor\" />\n        </pattern>\n      </defs>\n      <rect width=\"100%\" height=\"100%\" fill={`url(#${id})`} />\n    </svg>\n  )\n}\n\nexport { DotPattern, type DotPatternProps }\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "backgrounds"
  ],
  "type": "registry:ui"
}