{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dot-pattern",
  "title": "Dot Pattern",
  "description": "A dot background that fills its container.",
  "dependencies": [
    "cn"
  ],
  "registryDependencies": [
    "@gnostic/merge-styles"
  ],
  "files": [
    {
      "path": "packages/ui/src/components/patterns/dot-pattern/dot-pattern.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { DotPatternProps } from \"./types.ts\"\n\nimport { cn } from \"cn\"\nimport { mergeStyles } from \"@/lib/merge-styles.ts\"\n\n/**\n * Dot background.\n *\n * The pattern fills its nearest positioned parent.\n * Each dot is one tile of a radial-gradient background.\n */\ntype Props = HTMLAttributes<\"div\"> & DotPatternProps\n\nconst {\n  dotSize = 1,\n  dotSpace = \"1.5rem\",\n  dotColor = \"color-mix(in srgb, var(--foreground) 16%, transparent)\",\n  dotBg = \"transparent\",\n  class: className,\n  style: styleProp,\n  ...props\n} = Astro.props\n\nconst style = mergeStyles(\n  {\n    \"--dot-color\": dotColor,\n    \"background-color\": dotBg,\n    \"background-image\": `radial-gradient(circle, var(--dot-color) ${dotSize}px, transparent ${dotSize * 1.2}px)`, // 1.2 multiple adds a small amount of blur around the dots\n    \"background-size\": `${dotSpace} ${dotSpace}`,\n    \"background-position\": \"center\",\n  },\n  styleProp,\n)\n---\n\n<div\n  aria-hidden=\"true\"\n  data-slot=\"dot-pattern\"\n  class={cn(\"pointer-events-none absolute inset-0 size-full\", className)}\n  style={style}\n  {...props}\n></div>\n",
      "type": "registry:file",
      "target": "~/src/components/patterns/dot-pattern/dot-pattern.astro"
    },
    {
      "path": "packages/ui/src/components/patterns/dot-pattern/index.ts",
      "content": "export { default as DotPattern } from './dot-pattern.astro'\nexport type { DotPatternProps } from './types.ts'\n",
      "type": "registry:file",
      "target": "~/src/components/patterns/dot-pattern/index.ts"
    },
    {
      "path": "packages/ui/src/components/patterns/dot-pattern/types.ts",
      "content": "export type DotPatternProps = {\n    /**\n     * Radius of each dot, as a CSS size.\n     * @default 1\n     */\n    dotSize?: number\n    /**\n     * Distance from one dot to the next, as a CSS size.\n     * The tile is square, so this sets both axes.\n     * @default \"1.5rem\"\n     */\n    dotSpace?: string\n    /**\n     * Valid CSS color string. Use an opaque color for better contrast.\n     * @default `color-mix(in srgb, var(--foreground) 16%, transparent)`\n     */\n    dotColor?: string\n    /**\n     * Valid CSS color string.\n     * @default \"transparent\"\n     */\n    dotBg?: string\n}\n",
      "type": "registry:file",
      "target": "~/src/components/patterns/dot-pattern/types.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui",
    "testedDependencies": {
      "cn": "0.5.2"
    }
  },
  "docs": "https://gnosticai.com/ui/patterns/dot-pattern",
  "categories": [
    "patterns"
  ],
  "type": "registry:component"
}
