Reactive dot grid

Example image of the style Reactive dot grid
Preview built in HTML and CSS in this style

Interactive dot grid · Dot matrix hover · Cursor dot field · Rejilla de puntos interactiva · Campo di punti · Dot grid background

A background of dots on a grid that notices the cursor. Near the pointer the dots grow, light up in colour or shift like iron filings drawn by a magnet, then settle again as the cursor moves away.

Era
2019 – today
Origin
Siti di prodotti tech
Use
Mainstream
Domain
Web / UIMotion
Mood
futuristicsubtleclean
Explore

Live demo

View code
<canvas></canvas><div class="t"><h1>Il caffè, ma connesso</h1><p>Ordini al tavolo in tempo reale</p></div>
<script>
const c=document.querySelector('canvas'),x=c.getContext('2d');let W,H,mx=null,my=null,t=0;const red=!matchMedia('(prefers-reduced-motion: no-preference)').matches;
const rs=()=>{W=c.width=innerWidth*2;H=c.height=innerHeight*2};rs();addEventListener('resize',rs);addEventListener('pointermove',e=>{mx=e.clientX*2;my=e.clientY*2});
const go=()=>{t+=.012;x.clearRect(0,0,W,H);const px=mx??W/2+Math.cos(t)*W*.32,py=my??H/2+Math.sin(t*1.7)*H*.28;
for(let i=24;i<W;i+=28)for(let j=24;j<H;j+=28){const d=Math.hypot(i-px,j-py),k=red?0:Math.max(0,1-d/220);x.beginPath();x.arc(i,j,2.2+k*6,0,7);x.fillStyle=k>0?`rgba(${124-102*k|0},${92+119*k|0},${255-17*k|0},${.35+k*.65})`:'#2A2F3A';x.fill()}
requestAnimationFrame(go)};go();
</script>
body{background:#0B0D12;color:#fff;font-family:Inter,sans-serif;overflow:hidden}
canvas{position:fixed;inset:0;width:100%;height:100%}
.t{position:relative;height:100%;display:grid;place-content:center;text-align:center;pointer-events:none}h1{margin:0;font-size:34px}p{margin:6px 0 0;color:#9aa3b5}

Characteristics

  • Small regular dots on a dark or very light background
  • Halo of bigger, coloured dots around the cursor
  • Effect fading with distance
  • Smooth return to rest
  • Drawn on canvas for thousands of dots

Palette

Click a swatch to copy it

Typography

Headings · Inter Reactive dot grid

Body · Inter A background of dots on a grid that notices the cursor. Near the pointer the dots grow, light up in colour or shift like iron filings drawn by a magnet, then settle again as the cursor moves away.

Motion

Easing
interpolazione 0.15 verso la dimensione di destinazione
Typical duration
continua; 400–800 ms per tornare a riposo
Techniques
canvas 2D con requestAnimationFrame, distanza euclidea dal puntatore, radial-gradient CSS con mask e custom properties, WebGL per griglie molto dense

Accessibility (reduced motion)

The grid stays still; at most a static glow follows the cursor.

Prompt for your agent

Copy and paste into your prompt to have an agent or image generator reproduce this style.

For web pages and UI

Design the web page or interface in this style: Reactive dot grid (Interactive dot grid, Dot matrix hover).
A background of dots on a grid that notices the cursor. Near the pointer the dots grow, light up in colour or shift like iron filings drawn by a magnet, then settle again as the cursor moves away.
Characteristics: Small regular dots on a dark or very light background, Halo of bigger, coloured dots around the cursor, Effect fading with distance, Smooth return to rest, Drawn on canvas for thousands of dots.
Palette: #0B0D12, #2A2F3A, #7C5CFF, #22D3EE, #FFFFFF.
Typography: headings in Inter, body text in Inter (Google Fonts or equivalents).
Mood: futuristic, subtle, clean.
Motion: easing interpolazione 0.15 verso la dimensione di destinazione, typical duration continua; 400–800 ms per tornare a riposo; techniques: canvas 2D con requestAnimationFrame, distanza euclidea dal puntatore, radial-gradient CSS con mask e custom properties, WebGL per griglie molto dense.
With prefers-reduced-motion: The grid stays still; at most a static glow follows the cursor.
References: Landing page di prodotti tech (2020–2025), Canvas API, Esempi su CodePen.

Relations

Similar to: Spotlight cursorSpotlight cursorSimilar to: ParticlesParticlesSimilar to: Custom CursorCustom CursorContrasts with: Film grain overlayFilm grain overlayReactive dot grid
Similar toContrasts withSee in the graph →

References

  • Landing page di prodotti tech (2020–2025)
  • Canvas API
  • Esempi su CodePen