Reactive Dot Matrix

Interactive canvas-based dot matrix that responds to mouse movement.

Main Features of Reactive Dot Matrix

How to Use Reactive Dot Matrix in Next.js

Installation Guide for Reactive Dot Matrix

Props

Customize the component with these props

PropertyTypeDefaultDescription
backgroundColor
string#09090bBackground color
dotColor
string#3b82f6Dot color
dotBaseRadius
number1.5Base radius of dots
spacing
number30Spacing between dots
interactionDistance
number200Mouse interaction distance
interactionStrength
number40Interaction strength
className
stringAdditional CSS classes

When to Use

Ideal for tech-focused landing pages, developer tools, and Next.js sites that want a subtle, interactive pattern. Use this React component for a canvas-based dot matrix that responds elegantly to user mouse movements.

Best Practices

Maintain consistent spacing within your design system by adjusting the `spacing` and `dotBaseRadius` to match your layout density. Follow React best practices by pairing it with dark-mode themes. Optimize for performance by using the high-performance Canvas API for rendering the hundreds of reactive dots.

Why This Component Matters in Modern UI Development

Interactive backgrounds improve user engagement and create a premium, 'custom-built' feel. This production-ready component helpsคุณ build an interface that feels alive and responsive to human input, adding a layer of technical polish to your project.

Frequently Asked Questions

QHow does the interaction work?

Dots within the `interactionDistance` of the mouse cursor are repelled and increased in size based on the `interactionStrength` prop.

QIs it high-performance?

Yes, it uses a highly optimized Canvas rendering loop with `requestAnimationFrame`, ensuring smooth 60fps interaction even with thousands of dots.

QCan I change the dot colors?

Yes, you can customize the `dotColor` and `backgroundColor` to match any brand identity or UI theme.

Reactive Dot Matrix - React SVG Background Patterns | Uilora