Background Grid with Dots and Animations
An interactive SVG grid background with line distortion and dot movement effects on mouse hover. Features performance-optimized animations using requestAnimationFrame, customizable highlight colors, and automatic dark mode support.
Interactive grid with motion effects
The grid pattern renders using individual SVG line and circle elements that respond to mouse proximity. Lines distort with a wave effect and change color based on distance from the cursor, while dots follow the movement of their intersecting lines.
The AnimatedGridWithDots component is performance-optimized using requestAnimationFrame with linear interpolation for smooth animations. It uses passive event listeners, MutationObserver for dark mode detection, and automatically stops the animation loop when the mouse leaves to minimize CPU usage.
Props include gridSize (default 80px), dotSize (default 2px), glowRadius (default 150px), and separate highlightColor / highlightColorDark for theming with Tailwind CSS color variables.
Ideal for hero sections, landing pages, and interactive showcases where you want an engaging grid texture that responds to user interaction.
More from Backgrounds
Included with All-Access
One payment unlocks the code for this block and every other block, template and page.
Get All-AccessAbout this block
The grid pattern renders using individual SVG line and circle elements that respond to mouse proximity. Lines distort with a wave effect and change color based on distance from the cursor, while dots follow the movement of their intersecting lines.
The AnimatedGridWithDots component is performance-optimized using requestAnimationFrame with linear interpolation for smooth animations. It uses passive event listeners, MutationObserver for dark mode detection, and automatically stops the animation loop when the mouse leaves to minimize CPU usage.
Props include gridSize (default 80px), dotSize (default 2px), glowRadius (default 150px), and separate highlightColor / highlightColorDark for theming with Tailwind CSS color variables.
Ideal for hero sections, landing pages, and interactive showcases where you want an engaging grid texture that responds to user interaction.





