{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "grid-pattern", "title": "Grid Pattern", "description": "Subtle SVG grid lines background with optional highlighted squares", "files": [ { "path": "registry/pioneerui/grid-pattern.tsx", "content": "import React, { useId } from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nexport interface GridPatternProps extends React.SVGAttributes {\n width?: number\n height?: number\n x?: number\n y?: number\n squares?: [x: number, y: number][]\n className?: string\n}\n\nexport function GridPattern({\n width = 40,\n height = 40,\n x = -1,\n y = -1,\n squares,\n className,\n ...props\n}: GridPatternProps) {\n const id = useId()\n\n return (\n \n \n \n \n \n \n \n {squares && (\n \n {squares.map(([squareX, squareY], idx) => (\n \n ))}\n \n )}\n \n )\n}\n\nexport interface GridPatternBackgroundProps extends React.HTMLAttributes {\n children?: React.ReactNode\n squares?: [x: number, y: number][]\n}\n\nexport function GridPatternBackground({\n children,\n className,\n squares,\n ...props\n}: GridPatternBackgroundProps) {\n return (\n \n \n
{children}
\n \n )\n}\n", "type": "registry:ui", "target": "components/pioneerui/grid-pattern.tsx" } ], "type": "registry:ui" }