03.06 · Page Transitions

Zoom Transition

The pages zoom as they swap, as if moving in depth. Best for opening details.

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.

Zoom style

Zoom in feels like arriving, zoom out like leaving.

Speed

How long the zoom takes.

More optionsFewer options

Feel

Springy grows a little past full size, then settles.

Copy the prompt

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

Add a zoom transition to [the pages or views you want to move between]. When the page changes, scale the old and the new page while one fades out and the other fades in, so the change seems to move through depth rather than across the screen. Zooming in, where the new page grows into place, feels like going deeper; zooming out feels like stepping back; a pull-through, where the new page rushes in from larger, feels like traveling forward. Scale with transforms only, and keep the fade so no hard edge shows. If the visitor has reduced motion turned on, swap pages without scaling. 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

  • Opening details
  • Galleries
  • Lightboxes

Avoid on

  • Step-by-step flows