
Column shutter
Transitions
NewFree
A minimal click page change: the top half of the page lifts off a thin crease and falls towards you like a flap on a departures board. On the back of the flap is the bottom half of the new page, which lands with a small knock; the crease fades and the text rises.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The split-flap transition</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the first page: its headline sits right across the crease, so the fold runs through its letters -->
<section class="page page--a is-on" data-page="a" aria-label="Rooms">
<header class="bar">
<span class="brand">Saltmoor</span>
<nav class="nav" aria-label="Pages">
<a href="#rooms" aria-current="page">Rooms</a>
<a href="#garden" data-go="b">Garden</a>
</nav>
</header>
<div class="hero">
<h1 class="headline" data-headline>Rooms</h1>
<div class="below">
<p class="lede">Eleven rooms above the harbour, each with a window on the boats.</p>
<a class="go go--next" href="#garden" data-go="b" data-autoclic>
<span class="go__text">See the garden</span>
<svg class="go__arrow" viewBox="0 0 22 12" aria-hidden="true"><path d="M1 6h19M15 1.5 20 6l-5 4.5"/></svg>
</a>
</div>
</div>
<footer class="foot">
<span>A small hotel by the sea</span>
<span>Harbour Road</span>
</footer>
</section>
<!-- the second page, dark: it is printed on the back of the flap and under it -->
<section class="page page--b" data-page="b" aria-label="Garden" aria-hidden="true">
<header class="bar">
<span class="brand">Saltmoor</span>
<nav class="nav" aria-label="Pages">
<a href="#rooms" data-go="a">Rooms</a>
<a href="#garden" aria-current="page">Garden</a>
</nav>
</header>
<div class="hero">
<h2 class="headline" data-headline>Garden</h2>
<div class="below">
<p class="lede">Breakfast under the fig tree, from eight until the bread runs out.</p>
<a class="go go--back" href="#rooms" data-go="a" data-autoclic>
<svg class="go__arrow" viewBox="0 0 22 12" aria-hidden="true"><path d="M21 6H2M7 1.5 2 6l5 4.5"/></svg>
<span class="go__text">Back to the rooms</span>
</a>
</div>
</div>
<footer class="foot">
<span>A small hotel by the sea</span>
<span>Harbour Road</span>
</footer>
</section>
<!-- the fold, built by the script: the half of the old page that stays, the flap, and the crease -->
<div class="fold" data-fold aria-hidden="true"></div>
<div class="crease" data-crease aria-hidden="true"></div>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.
29 values to change
With the Animorio connector, Claude Code takes it from here, guide included, and fits it into your project. Paste this request:
Take “The split-flap transition” from Animorio and fit it into my siteThe real pages are never cut. For each change the script makes whole copies of the two pages and clips them in half with clip-path, on the --cut variable: underneath is the real new page, above it the old page's bottom half (the one that will be covered), and on top of everything the flap. In the copies data-go and data-autoclic are removed and the links leave the Tab order.
The flap is a div with transform-style: preserve-3d and transform-origin on the crease. Its front face is the old page's top half; its back is the new page's bottom half, already turned 180 degrees round the crease, with backface-visibility hidden. Turning the flap by −180 degrees (a negative rotateX brings the top edge towards the viewer) brings the back face back to zero, the right way up and in the right place.
Every piece has a black veil over it with its opacity worked out from the angle: the front face darkens as SHADE·(1 − cos θ), the back brightens as SHADE·(1 + cos θ), the half about to be covered darkens in the last 80 degrees, and on the new half just uncovered there is a soft shadow near the crease that goes as the flap comes down.
First a 14 degree lift with power2.out (the hesitation), then the fall to 180 with power3.in, speeding up like a weight. On landing the flap comes back up KNOCK degrees in 0.13 seconds, falls again, then a second bounce a fifth as big: two knocks dying away. Meanwhile the crease fades and the text rises with back.out.
Each change is one timeline with timeScale for SPEED; a click that comes while the page is turning waits in a queue. The measures (the crease at 47% of the height, the headline fitting the width) are taken again on every resize. With reduced motion the old page fades out and then the new one fades in, without the two showing through each other.
| Name | File | Default | What it changes |
|---|---|---|---|
FOLD | script.js | 0.95 | The seconds the flap takes to fall flat. |
LIFT | script.js | 0.18 | The seconds the flap hesitates just lifted off the crease, before it falls. |
KNOCK | script.js | 9 | How many degrees the flap bounces back when it lands: 0 = it just lands. |
SHADE | script.js | 0.42 | How dark the flap gets when it is edge-on (0 to 0.8). |
DEPTH | script.js | 1500 | The perspective in pixels: smaller, and the flap comes further out of the page. |
SPEED | script.js | 1 | The speed of everything: 2 is twice as fast, 0.5 half as fast. |
To move from one page to another on a quiet site with a big headline in the middle: a hotel, a bed and breakfast, a station or a journey, a restaurant with its menu of the day, a portfolio with one project per page. It works well with a light and a dark page taking turns.
The same transition with the sizes adapted: the headline shrinks to fit the screen, the crease stays a little above the middle and the text wraps underneath. A tap on the link turns it.
Nothing turns: the old page fades out and then the new one fades in.
GSAP 3.15.0, Newsreader (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.9 KB; the libraries: GSAP 28 KB.
Tested on 19 October 2026
Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.