07.11 · Ambient & Background
Grid / Dot Pattern Parallax
A dot grid shifts gently against your pointer for depth. Best for tech sites.
Watch it
It drifts by itself. Move your pointer over it, or drag a finger sideways across it, and the grid shifts the other way.
Inside, each ring marks where a grid point rests: the grid shifts against your pointer by a small share of its move, while the content stays still. Move your pointer or finger across it.
Stays put keeps the grid still; Shifts against you slides it the other way from your pointer, so it seems deeper, and the arrow shows how far. Move your pointer or finger across the box.
Try it
Change a setting and see the difference as it moves.
Pattern
The shape of the grid.
Strength
Under 10% of the pointer's move is felt, not seen.
Spacing
The distance between the dots or lines.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a dot grid parallax background to [the section you want a subtle sense of depth behind]. Tile a faint grid of dots or lines behind the content, a little larger than the section, and shift it slightly in the opposite direction to the pointer, so it seems to sit deeper than the content. Keep the shift to a few percent of the pointer's movement, so it is felt more than seen. On touch screens, let it follow a dragging finger the same way, and when nothing is over it, let it drift slowly by itself. If the visitor has reduced motion turned on, keep the grid still. Match the settings listed below.
Your settings
Replace the words in brackets with your own element. Your settings are added at the end.
Free and open source. If this helped, a star on GitHub helps other people find it.
Star on GitHubWhat it is
The full explanation is in README.md.