03.08 · Page Transitions

Blur Transition

The old page blurs away and the new one comes into focus. Best for photo sites.

Click it

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

Try it

Change a setting, then try it again or press Show me.

How blurry it gets

Heavy blur is costly for the browser to draw.

Speed

How long each half, blurring and sharpening, takes.

More optionsFewer options

Fading as well hides the moment the pages swap.

The new page sharpens while the old one still blurs.

Feel

Gentle feels like a camera pulling focus.

Copy the prompt

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

Add a blur transition to [the pages or views you want to switch between]. When the page changes, blur the old page until it is out of focus, bring in the new page just as blurred, then sharpen it into focus, like a camera pulling focus from one subject to another. Fading while blurring hides the moment of the swap. Blur is costly for the browser to draw, so use it only on changes the visitor starts, never on anything that repeats by itself, and remove the blur completely when it ends. If the visitor has reduced motion turned on, switch pages without blurring. 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 sites
  • Film and editorial
  • Portfolios

Avoid on

  • Self-playing slideshows
  • Low-end phones