
The shattering frame
Images, Physics
The postcards of Casa Lumen, a made-up holiday house in Amalfi: five real photos (the sea, the lemons, the terrace, the steps, the sunset) printed with a white paper border, in a messy stack on a warm table. The top one is picked up with a finger or the mouse and flicked away: it flies with the speed of the gesture, spins with the push, slows down, bounces softly off the edges and slides back under the stack, while the card below lifts a hair and springs into first place. A tap turns it over: the stamp, the postmark landing and a line written in blue ink.
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>
<!--
"Travel postcard stack" 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>A stack of travel postcards to flick away</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/caveat@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the postcards of Casa Lumen, a made-up guest house in Amalfi: five real photos printed as postcards, in a messy
stack on a warm table. The top one is picked up with a finger or the mouse and flicked away: it flies with the
speed of the gesture, spins with the push, slows down, bounces softly off the edges and slides back under the
stack, while the card below lifts a hair and springs into first place. A tap turns it over: the stamp, the
postmark and a line written in blue ink -->
<header class="head">
<p class="brand">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true"><path class="brand__sun" d="M6 15a6 6 0 0 1 12 0z" /><path d="M3 15h18M6.5 18.5h11" /></svg>
<span class="brand__name">Casa Lumen</span>
<span class="brand__place">Amalfi</span>
</p>
<p class="head__note">Postcards from the house</p>
</header>
<svg class="defs" aria-hidden="true" width="0" height="0">
<defs>
<path id="arco-alto" d="M8 30a22 22 0 0 1 44 0" />
<path id="arco-basso" d="M10 31a20 20 0 0 0 40 0" />
</defs>
</svg>
<div class="table" data-table>
<article class="card" data-card data-name="The sea at nine" aria-label="Postcard: the sea at nine">
<i class="card__shade" data-shade></i>
<div class="card__flip" data-flip>
<div class="card__front">
<div class="card__photo"><img src="mare.webp" alt="Swimmers in clear turquoise water, seen from above" width="1000" height="506" decoding="async" draggable="false"><i class="card__sheen"></i></div>
<span class="card__label">Amalfi, the sea</span>
</div>
<div class="card__back">
<p class="back__printed">Post card</p>
<div class="back__left"><p class="back__note" data-ink><span>Swam before breakfast.</span><span>The water is glass.</span><span class="back__sign">Mila</span></p></div>
<div class="back__right">
<span class="stamp" data-stamp><img src="mare.webp" alt="" width="1000" height="506" draggable="false"><b>1,25</b></span>
<svg class="postmark" data-postmark viewBox="0 0 120 60" aria-hidden="true"><circle cx="30" cy="30" r="26" /><circle cx="30" cy="30" r="21.5" /><text><textPath href="#arco-alto" startOffset="50%">AMALFI</textPath></text><text x="30" y="33.5">09 AUG</text><text><textPath href="#arco-basso" startOffset="50%">2026</textPath></text><path d="M58 18c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 26c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 34c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 42c8-4 16 4 24 0s16-4 24 0 8 2 12 0" /></svg>
<p class="address"><span>Ada Weller</span><span>14 Linden Row</span><span>Bristol</span></p>
</div>
</div>
</div>
</article>
<article class="card" data-card data-name="Lemons by the gate" aria-label="Postcard: lemons by the gate">
<i class="card__shade" data-shade></i>
<div class="card__flip" data-flip>
<div class="card__front">
<div class="card__photo"><img src="limoni.webp" alt="Ripe lemons on a sunlit tree" width="1000" height="750" decoding="async" draggable="false"><i class="card__sheen"></i></div>
<span class="card__label">Amalfi, the lemons</span>
</div>
<div class="card__back">
<p class="back__printed">Post card</p>
<div class="back__left"><p class="back__note" data-ink><span>They pick the lemons at six.</span><span>We had them in everything.</span><span class="back__sign">Mila</span></p></div>
<div class="back__right">
<span class="stamp" data-stamp><img src="limoni.webp" alt="" width="1000" height="750" draggable="false"><b>1,25</b></span>
<svg class="postmark" data-postmark viewBox="0 0 120 60" aria-hidden="true"><circle cx="30" cy="30" r="26" /><circle cx="30" cy="30" r="21.5" /><text><textPath href="#arco-alto" startOffset="50%">AMALFI</textPath></text><text x="30" y="33.5">10 AUG</text><text><textPath href="#arco-basso" startOffset="50%">2026</textPath></text><path d="M58 18c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 26c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 34c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 42c8-4 16 4 24 0s16-4 24 0 8 2 12 0" /></svg>
<p class="address"><span>Ada Weller</span><span>14 Linden Row</span><span>Bristol</span></p>
</div>
</div>
</div>
</article>
<article class="card" data-card data-name="The terrace after lunch" aria-label="Postcard: the terrace after lunch">
<i class="card__shade" data-shade></i>
<div class="card__flip" data-flip>
<div class="card__front">
<div class="card__photo"><img src="terrazza.webp" alt="Two deck chairs on a white terrace above the sea, bougainvillea on the wall" width="1000" height="667" decoding="async" draggable="false"><i class="card__sheen"></i></div>
<span class="card__label">Amalfi, the terrace</span>
</div>
<div class="card__back">
<p class="back__printed">Post card</p>
<div class="back__left"><p class="back__note" data-ink><span>Lunch ran into dinner</span><span>on the terrace again.</span><span class="back__sign">Mila</span></p></div>
<div class="back__right">
<span class="stamp" data-stamp><img src="terrazza.webp" alt="" width="1000" height="667" draggable="false"><b>1,25</b></span>
<svg class="postmark" data-postmark viewBox="0 0 120 60" aria-hidden="true"><circle cx="30" cy="30" r="26" /><circle cx="30" cy="30" r="21.5" /><text><textPath href="#arco-alto" startOffset="50%">AMALFI</textPath></text><text x="30" y="33.5">12 AUG</text><text><textPath href="#arco-basso" startOffset="50%">2026</textPath></text><path d="M58 18c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 26c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 34c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 42c8-4 16 4 24 0s16-4 24 0 8 2 12 0" /></svg>
<p class="address"><span>Ada Weller</span><span>14 Linden Row</span><span>Bristol</span></p>
</div>
</div>
</div>
</article>
<article class="card" data-card data-name="The steps to the beach" aria-label="Postcard: the steps to the beach">
<i class="card__shade" data-shade></i>
<div class="card__flip" data-flip>
<div class="card__front">
<div class="card__photo"><img src="scalinata.webp" alt="Stone steps going down to the beach between the rocks" width="768" height="512" decoding="async" draggable="false"><i class="card__sheen"></i></div>
<span class="card__label">Amalfi, the steps</span>
</div>
<div class="card__back">
<p class="back__printed">Post card</p>
<div class="back__left"><p class="back__note" data-ink><span>Ninety-two steps down</span><span>to the beach. Worth it.</span><span class="back__sign">Mila</span></p></div>
<div class="back__right">
<span class="stamp" data-stamp><img src="scalinata.webp" alt="" width="768" height="512" draggable="false"><b>1,25</b></span>
<svg class="postmark" data-postmark viewBox="0 0 120 60" aria-hidden="true"><circle cx="30" cy="30" r="26" /><circle cx="30" cy="30" r="21.5" /><text><textPath href="#arco-alto" startOffset="50%">AMALFI</textPath></text><text x="30" y="33.5">14 AUG</text><text><textPath href="#arco-basso" startOffset="50%">2026</textPath></text><path d="M58 18c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 26c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 34c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 42c8-4 16 4 24 0s16-4 24 0 8 2 12 0" /></svg>
<p class="address"><span>Ada Weller</span><span>14 Linden Row</span><span>Bristol</span></p>
</div>
</div>
</div>
</article>
<article class="card" data-card data-name="Sunset from room four" aria-label="Postcard: sunset from room four">
<i class="card__shade" data-shade></i>
<div class="card__flip" data-flip>
<div class="card__front">
<div class="card__photo"><img src="tramonto.webp" alt="The sun setting behind the hills over the bay, a boat on the water" width="960" height="640" decoding="async" draggable="false"><i class="card__sheen"></i></div>
<span class="card__label">Amalfi, at dusk</span>
</div>
<div class="card__back">
<p class="back__printed">Post card</p>
<div class="back__left"><p class="back__note" data-ink><span>Room four, the last light.</span><span>Wish you were here.</span><span class="back__sign">Mila</span></p></div>
<div class="back__right">
<span class="stamp" data-stamp><img src="tramonto.webp" alt="" width="960" height="640" draggable="false"><b>1,25</b></span>
<svg class="postmark" data-postmark viewBox="0 0 120 60" aria-hidden="true"><circle cx="30" cy="30" r="26" /><circle cx="30" cy="30" r="21.5" /><text><textPath href="#arco-alto" startOffset="50%">AMALFI</textPath></text><text x="30" y="33.5">16 AUG</text><text><textPath href="#arco-basso" startOffset="50%">2026</textPath></text><path d="M58 18c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 26c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 34c8-4 16 4 24 0s16-4 24 0 8 2 12 0M58 42c8-4 16 4 24 0s16-4 24 0 8 2 12 0" /></svg>
<p class="address"><span>Ada Weller</span><span>14 Linden Row</span><span>Bristol</span></p>
</div>
</div>
</div>
</article>
</div>
<footer class="foot">
<p class="caption" data-caption aria-hidden="true"></p>
<p class="hint">
<span>Flick to send</span>
<i class="hint__rule" aria-hidden="true"></i>
<span>Tap to turn over</span>
</p>
</footer>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true">
<path d="M5 3.2 18.6 13l-6.1 1 3.4 6.4-2.6 1.4-3.4-6.5L5 19.2z" />
</svg>
<p class="sr" aria-live="polite" data-live></p>
</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.
83 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 “Travel postcard stack” from Animorio and fit it into my siteEvery postcard is a .card moved by the script (position, rotation, rotateX and rotateY lean, scale) with a .card__flip inside that turns over with rotateY: the two faces have backface-visibility hidden. The table has perspective: 1400px, so the lean and the turn are real CSS 3D, with no libraries. The shadow is a third, empty element, .card__shade: it does not turn with the card and narrows with the cosine of the turn.
A single loop on GSAP's ticker updates every postcard with hand-made springs (STIFFNESS and DAMPING) in two half steps per frame. While held, the card follows the hand on a stiff spring and turns around the point where it was grabbed: the rotation comes from the hand's speed crossed with that point. On release the speed of the last 100 ms decides: above 600 pixels per second, or pulled past 42% of its width, it flies.
In flight the speed loses a factor exp(-FRICTION·t) every moment and the rotation a little more; at the edges of the table it bounces with BOUNCE and picks up some extra spin from its sideways speed. Once slow it goes under the stack (lowest z-index) and back to its place on a softer spring, without unwinding the turns it made in the air.
The photos are img tags with object-fit cover inside a paper border: swap them in the HTML without touching the script. A 160-pixel grain painted once on a canvas lies on the table, the paper and the print; a soft gloss moves with the lean. The postmark lands with back.out and the pen line is written by opening a clip-path from the left with the --pen variable.
| Name | File | Default | What it changes |
|---|---|---|---|
THROW | script.js | 1 | How strongly a flick sends the card across the table. |
FRICTION | script.js | 2.6 | How quickly a flung card slows down on the table. |
BOUNCE | script.js | 0.42 | How much it bounces off the edges (0 = it stops dead). |
SPIN | script.js | 1 | How much the card turns with the push. |
TILT | script.js | 1 | How much it leans in 3D while held. |
STIFFNESS | script.js | 240 | The spring of the stack: higher settles quicker. |
DAMPING | script.js | 20 | Lower lets the cards pass their place and come back. |
GRAIN | script.js | 0.07 | How much grain lies on the table, the paper and the photos. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | The drawn pointer goes through the stack again and again. |
For the page of a hotel, a holiday home, a bed and breakfast or a travel agency: the photos of the place to leaf through with a finger like real postcards, with a message on the back. It also suits a travel photography portfolio or guest reviews written on the back. Swap the photos in the five img tags of the HTML (the webp files in the folder), the words on the back next to them, the colours in :root.
The same thing with a finger: the postcard is at most 84% of the screen wide and 66% of its height, so it fits the box even when it is short; dragging does not scroll the page (touch-action: none on the table) and the edges it bounces off are measured again at every resize.
No movement: the postcards stay still in the stack; the flick is a fade (the top one fades out and back in at the bottom) and turning over is a fade too.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Caveat (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 13 KB; the libraries: GSAP 28 KB.
Tested on 5 November 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.