Dot Distortion Shader
A grid of dots renders on canvas. Each dot has position, velocity, brightness, and glow properties. When the mouse moves near a dot, it pushes away from the cursor using physics-based calculations.
Dots slowly return to their original positions using spring-like motion controlled by the returnSpeed prop. Individual dots randomly pulse with higher glow intensity, creating a breathing or twinkling effect across the grid.
Props control dot gap, size, colors, mouse influence radius, distortion strength, and animation speeds. The component uses useCallback for optimized event handlers and cleanup.
Works well for tech product landing pages, AI/ML product sites, or any application wanting an interactive, futuristic background that responds to user movement.
Part of Shaders ยท All blocks
Build websites faster and 10x better than your competitors with
Aceternity UI Pro
Next.js 15, Tailwind CSS v4 and Motion for react powered templates
100+ templates and blocks combined
Ready to copy paste component blocks, save days of development time



