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.

Dot grid parallax
Move your pointer or finger across it
The grid shifts slightly against your pointer: depth you feel more than see.

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.

More optionsFewer options

Pattern color

The color of the dots and lines.

A sparser layer moves half as far, adding depth.

A faint glow follows your pointer.

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.

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 GitHub

What it is

The full explanation is in README.md.

Good for

  • Tech and developer sites
  • Hero sections
  • Dashboards
  • Portfolios

Avoid on

  • Photo backgrounds
  • Long reading pages