03.07 · Page Transitions

Flash / Light Leak Transition

A burst of light hides the moment the page changes. Best for bold, lively 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.

Flash color

White looks like a camera flash; colors, a light leak.

Speed

How fast the flash rises and fades.

More optionsFewer options

Flash strength

Below full, the page change shows through.

Softens the flash's edges into a glow.

Copy the prompt

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

Add a flash transition to [the pages or scenes you want to switch between]. Cover the content with a full-size colored layer that rises to its peak, swap the page while it is covered, then fade the layer away to reveal the new page, like a burst of light hiding a cut in a film. At full strength the change is completely hidden. Let the fade-out take a little longer than the rise. Keep flashes rare, never several in one second, to protect people who are sensitive to flashing light. If the visitor has reduced motion turned on, switch pages with no flash. 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

  • Product launches
  • Music and fashion
  • Photo stories

Avoid on

  • Frequent page changes
  • Calm sites