03.16 · Page Transitions
Cube Transition
The pages sit on a cube that turns to show the next. Best for photo stories.
Click it
Click Work or About at the top of the box, or press Show me.
Inside, the map shows the cube from above: the pages are two of its sides, and it turns around its middle, half a page behind the screen. Click Work or About, or press Show me.
Switches at once simply changes page; Cube turns swings the old page away as the next one swings in, two sides of one cube. Click Work or About, or press Show me.
Try it
Change a setting, then try it again or press Show me.
Turn direction
Going back to an earlier page turns the other way.
Speed
How long the cube takes to turn.
Depth
Deep brings the cube's edge closer as it turns.
Copy the prompt
Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.
Add a cube transition to [the pages or slides you want to switch between]. Treat the current page and the next one as two sides of a cube: when the visitor changes page, turn the cube a quarter turn around its middle, which sits half a page behind the screen, so the old page swings away and the new one swings into place. Going back turns the cube the other way. Give the scene perspective, hide any side that faces away from the viewer and darken each side a little as it turns away. Animate only the turn itself so it stays smooth. If the visitor has reduced motion turned on, crossfade the pages instead. Match the settings listed below.
Your settings
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 GitHubWhat it is
The full explanation is in README.md.