
The card room
3D, Transitions, Images
A page transition in the style of product components: the pages of an app (Home, Projects, Settings) are big cards stacked in depth. Going to a page makes the current one recede and tilt back slightly, the new one rises from below in front of it and settles on a spring, and behind them stay the edges of the two previous pages, smaller and darker. Back drops the front page away; «Pages» opens all of them in a 3D fan, like the tabs on a phone.
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>
<!--
"Stacked page transition" from Animorio · https://animorio.com
License: free on your own sites and your clients’ sites, paid work included.
Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ferngrove</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the pages of an invented planning app are big rounded cards in a stack: going to a page pushes the current one
back in depth, tilting it a little, while the new one rises from below in front and settles on a spring; the
edges of the two pages behind stay visible, smaller and darker. Back drops the front page away. "Pages" opens
all of them in a 3D fan, like the tabs of a phone, and a tap goes back inside one -->
<main class="palco" data-palco>
<header class="testa">
<button type="button" class="tasto tasto--indietro" data-indietro aria-label="Back">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M10 3.5 5.5 8l4.5 4.5" /></svg>
<span>Back</span>
</button>
<span class="app"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 2.2c2.6 2.2 3.6 4.6 3 7.4-.4 2-1.6 3.4-3 4.2-1.4-.8-2.6-2.2-3-4.2-.6-2.8.4-5.2 3-7.4Z" /><path d="M8 5.2v8.4" /></svg>Ferngrove</span>
<button type="button" class="tasto tasto--pagine" data-pagine aria-pressed="false">
<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="3.5" y="5" width="9" height="8" rx="1.8" /><path d="M5 3h6" /></svg>
<span data-pagine-scritta>Pages</span>
</button>
</header>
<div class="pila-box">
<div class="pila" data-pila>
<section class="carta" data-carta="0" aria-label="Home">
<div class="carta-dentro">
<div class="carta-testa"><h2>Home</h2><span class="data">Sun, Oct 25</span></div>
<p class="saluto" data-entra>Good morning, Ines.<br><span>Four things need you today.</span></p>
<div class="numeri" data-entra>
<div><b>4</b><span>Due today</span></div>
<div><b>2</b><span>In review</span></div>
<div><b>11</b><span>Shipped</span></div>
</div>
<ul class="oggi">
<li data-entra><span class="ora">09:30</span><span class="voce">Review onboarding copy</span><span class="tag">Design</span></li>
<li data-entra><span class="ora">11:00</span><span class="voce">Pricing sync with Theo</span><span class="tag">Call</span></li>
<li data-entra><span class="ora">15:15</span><span class="voce">Ship release notes 3.2</span><span class="tag">Launch</span></li>
</ul>
</div>
<nav class="sotto-nav" aria-label="Pages"></nav>
<span class="velo" aria-hidden="true"></span>
</section>
<section class="carta" data-carta="1" aria-label="Projects">
<div class="carta-dentro">
<div class="carta-testa"><h2>Projects</h2><span class="data">6 active</span></div>
<div class="progetti">
<div class="progetto" data-entra><div class="mini" style="--a:#c9d8ff;--b:#7c8cf8"></div><b>Mobile app</b><span class="barra"><i style="width:72%"></i></span><span class="pc">72%</span></div>
<div class="progetto" data-entra><div class="mini" style="--a:#ffd9c2;--b:#f2895f"></div><b>Brand refresh</b><span class="barra"><i style="width:40%"></i></span><span class="pc">40%</span></div>
<div class="progetto" data-entra><div class="mini" style="--a:#cdeedd;--b:#4fae84"></div><b>Help centre</b><span class="barra"><i style="width:88%"></i></span><span class="pc">88%</span></div>
<div class="progetto" data-entra><div class="mini" style="--a:#efd6f5;--b:#b06cc6"></div><b>Q4 campaign</b><span class="barra"><i style="width:15%"></i></span><span class="pc">15%</span></div>
</div>
</div>
<nav class="sotto-nav" aria-label="Pages"></nav>
<span class="velo" aria-hidden="true"></span>
</section>
<section class="carta" data-carta="2" aria-label="Settings">
<div class="carta-dentro">
<div class="carta-testa"><h2>Settings</h2><span class="data">Workspace</span></div>
<div class="conto" data-entra><span class="avatar">IR</span><span><b>Ines Rocha</b><br>ines@ferngrove.app</span></div>
<ul class="opzioni">
<li data-entra><span><b>Notifications</b><br>Mentions and due dates</span><span class="interr acceso"><i></i></span></li>
<li data-entra><span><b>Dark mode</b><br>Follows the system</span><span class="interr"><i></i></span></li>
<li data-entra><span><b>Weekly digest</b><br>Every Monday at 8:00</span><span class="interr acceso"><i></i></span></li>
</ul>
</div>
<nav class="sotto-nav" aria-label="Pages"></nav>
<span class="velo" aria-hidden="true"></span>
</section>
</div>
</div>
<svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true">
<path d="M4 3l14 7.2-6.1 1.6L9.2 18z" />
</svg>
</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.
66 values to change
With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:
Take “Stacked page transition” from Animorio and fit it into my siteThe three cards sit on top of each other in a container with transform-style preserve-3d, inside a box with a 1300 pixel perspective seen from above. A card’s position depends only on how deep it is in the stack: d. It rises 18 pixels per step, moves back ARRETRA pixels in z, tilts INCLINA degrees in rotateX and shrinks by 6%: so the two behind show above the edge of the front one.
Each card has a dark veil on top, which GSAP sets to SCURO times d: the deeper it is, the darker. It is a separate element rather than a filter, so it does not weigh on the 3D.
Going to a page changes the order of the stack and the chosen page goes to the front. First it leaves its place at the back in 18 hundredths of a second, then it starts again from below the stack, tilted -8 degrees, and rises into place in DURATA seconds with back.out: that hair of bounce is the spring. Meanwhile the others move to their new depth with power3.out.
Back drops the front card downwards with power3.in and puts it back at the bottom of the stack with a fade, while the others step forward with back.out. The order stays the history of the pages: Back always goes to the previous page.
In «Pages» mode each card goes to its fixed place in the fan: shrunk to 60%, tilted VENTAGLIO degrees and spread in height and depth by its number. A click on a card brings it back to the front and the others return to the stack.
| Name | File | Default | What it changes |
|---|---|---|---|
DURATA | script.js | 0.9 | How long the new page takes to rise and settle, in seconds. |
ARRETRA | script.js | 90 | How far back in depth each page of the stack moves, in pixels. |
INCLINA | script.js | 6 | How many degrees each page of the stack tilts back. |
SCURO | script.js | 0.1 | How much darker each page of the stack gets. |
VENTAGLIO | script.js | 26 | How many degrees the cards are tilted in the fan. |
SOSTA | script.js | 2.2 | How long each page stays in the automatic tour, in seconds. |
For an app or web app with a few main pages (a dashboard, a team app, a back office): the page change tells you where you are going and where you came from, and the fan shows the open pages like on a phone.
The same transition: the stack fits the height of the box, the buttons on top show only their icons and the pages keep the rows that fit. A tap does what a click does.
No moving depth: the cards go straight to their place in the stack and the new page fades in; the fan opens without flying.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.7 KB; the libraries: GSAP 28 KB.
Tested on 25 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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
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.