03.17 · Page Transitions

Pixelate Transition

The page breaks into big pixels, then sharpens into the next. Best for galleries.

Click it

Click Work or About at the top of the box, or press Show me.

Try it

Change a setting, then click a page or press Show me.

Block size

How big the squares get mid-change.

Speed

How long the change takes.

How the blocks change

In steps looks like an old game console.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add a pixelate transition to [the pictures or views you switch between]. When the visitor moves to the next one, break the current picture into square blocks that grow larger, swap to the new picture while the blocks are at their largest, then shrink the blocks until the new picture is sharp again. Make each block one flat color by drawing the picture very small on a canvas and scaling it back up with smoothing turned off. Keep the page names and buttons outside the pixelated area so they stay readable, and draw only while a change runs. If the visitor has reduced motion turned on, use a short, plain fade instead. 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

  • Photo galleries
  • Game and retro sites
  • Slideshows

Avoid on

  • Everyday navigation
  • Text-heavy pages