About
A decorative dots/grid/hexagon/rings/checkerboard pattern painted behind page content, with an optional cursor-following spotlight highlight.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Background Pattern to your project and fits it to your theme.
Code
How Background Pattern is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { BackgroundPattern } from "@/components/ui/background-pattern";
const variants = ["dots", "grid", "hexagons", "rings", "checkerboard"] as const;
export default function BackgroundPatternVariants() {
return (
<div className="grid w-full max-w-2xl grid-cols-1 gap-4 sm:grid-cols-2">
{variants.map((variant) => (
<BackgroundPattern
key={variant}
variant={variant}
className="bg-background-subtle flex min-h-40 items-center justify-center overflow-hidden rounded-xl sm:last:col-span-2"
>
<span className="text-foreground-intense text-sm font-medium capitalize">
{variant}
</span>
</BackgroundPattern>
))}
</div>
);
}







