Dot Background

A highly customizable dotted background component with a built-in radial mask. Perfect for creating depth and modern aesthetics in sections, hero areas, or cards without using heavy image assets.

ui

Installation

$npx futureuikit add dot-background

Import

import { DotBackground } from "@/components/ui/dot-background"
Color Theme
Theme
Size

Named Keys & Props

Pass these exact named keys as props on <DotBackground />. Click any color pill to copy the prop.

colorDefault is "default"(Black & White)
themeSurface theme
"default""modern""clean"
sizeComponent size
"default""sm""md""lg""xl"

Usage Example

A basic implementation example to get you started.

Example Implementation
import { DotBackground } from"@/components/ui/dot-background";

export default function Example() {
 return (
 <div className="w-full h-100 border rounded-3xl overflow-hidden">
 <DotBackground 
 dotColor="#6366f1"
 dotSize={1.5} 
 gap={24} 
 maskOpacity={0.1}
 >
 <h2 className="text-2xl font-bold">Content Over Background</h2>
 </DotBackground>
 </div>
 );
}

Features

Key capabilities and highlights.

Key Capabilities
  • ◆Pure CSS-based dotted grid using radial gradients.
  • ◆Built-in radial mask for smooth blending with the page background.
  • ◆Fully customizable dot size, gap (spacing), and color.
  • ◆Adjustable mask opacity to control the intensity of the effect.
  • ◆Works as a wrapper or a standalone background layer.
  • ◆Lightweight and performant with zero image dependencies.

Notes

Important implementation details to consider.

Implementation Details
  • ◆Install: Run'npx futureuikit add dot-background'.
  • ◆Import:'import { DotBackground } from "@/components/ui/dot-background";'
  • ◆Nesting: Wrap your entire section content inside'DotBackground'for an immediate professional upgrade.
  • ◆Customization: Use'dotSize'(px) and'gap'(px) to adjust the grid density.
  • ◆Masking: The'maskOpacity'prop (0 to 1) controls the radial fade-out toward the container edges.