
Film slider
Transitions, Images, Hover
The “Where next?” screen of a made-up travel app, Tidewander: five destinations in cards with real photos on a carousel that loops. Drag it with a finger or the mouse and every card follows the hand: the one leaving the middle leans back in depth, shrinks and dims, while the photo inside slides the other way, like a window onto a landscape further off. Let go and the carousel keeps the speed of the hand and settles on the nearest card with a small overshoot; below, the place name rolls letter by letter, the flight time swaps and the fare rolls digit by digit.
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 carousel" 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>The destinations carousel with cards that tilt and photos that slide the other way</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/fraunces@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the "where next" screen of a made-up travel app, Tidewander. Five destination cards on a carousel you drag:
the cards lean back in depth as they leave the middle, the photo inside slides the other way, and the place
name, the flight time and the fare roll to the card that settles in the middle -->
<header class="top">
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
<path d="M2.5 13.2c2.4-2.6 4.6-2.6 7 0s4.6 2.6 7.5 0" />
<path d="M2.5 8.6c2.4-2.6 4.6-2.6 7 0s4.6 2.6 7.5 0" />
</svg>
<span class="brand__name">Tidewander</span>
</span>
<span class="from">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 14.5s4.8-4.4 4.8-8.1A4.8 4.8 0 0 0 3.2 6.4C3.2 10.1 8 14.5 8 14.5z"/><circle cx="8" cy="6.4" r="1.7"/></svg>
Flights from Lisbon
</span>
</header>
<h1 class="title"><span class="title__line">Where <em>next?</em></span></h1>
<section class="deck" data-deck aria-roledescription="carousel" aria-label="Destinations" tabindex="0">
<article class="card" data-card data-name="Alpstein" data-region="Switzerland" data-nights="4 nights" data-time="2h 25m direct" data-fare="148" data-temp="9°">
<div class="card__photo"><img src="lago.webp" width="768" height="1024" alt="A mountain lake under snowy peaks, with the ridge mirrored in the still water" draggable="false" style="--pos: 50% 40%"></div>
<span class="card__sheen" aria-hidden="true"></span>
<span class="card__temp">9°</span>
<div class="card__foot"><span class="card__region">Switzerland</span><span class="card__nights">4 nights</span></div>
</article>
<article class="card" data-card data-name="Fjordlands" data-region="Norway" data-nights="5 nights" data-time="4h 05m, 1 stop" data-fare="312" data-temp="6°">
<div class="card__photo"><img src="fiordo.webp" width="960" height="641" alt="A turquoise lake between dark mountain slopes under a heavy sky" draggable="false" style="--pos: 60% 50%"></div>
<span class="card__sheen" aria-hidden="true"></span>
<span class="card__temp">6°</span>
<div class="card__foot"><span class="card__region">Norway</span><span class="card__nights">5 nights</span></div>
</article>
<article class="card" data-card data-name="Sand Sea" data-region="Sahara" data-nights="3 nights" data-time="3h 10m direct" data-fare="274" data-temp="31°">
<div class="card__photo"><img src="dune.webp" width="1024" height="678" alt="Rolling sand dunes under a low orange sun" draggable="false" style="--pos: 40% 50%"></div>
<span class="card__sheen" aria-hidden="true"></span>
<span class="card__temp">31°</span>
<div class="card__foot"><span class="card__region">Sahara</span><span class="card__nights">3 nights</span></div>
</article>
<article class="card" data-card data-name="Blue Bay" data-region="Ionian coast" data-nights="6 nights" data-time="3h 35m direct" data-fare="186" data-temp="24°">
<div class="card__photo"><img src="baia.webp" width="960" height="640" alt="A white beach curving into bright turquoise water, seen from above" draggable="false" style="--pos: 45% 50%"></div>
<span class="card__sheen" aria-hidden="true"></span>
<span class="card__temp">24°</span>
<div class="card__foot"><span class="card__region">Ionian coast</span><span class="card__nights">6 nights</span></div>
</article>
<article class="card" data-card data-name="Ubud" data-region="Bali" data-nights="9 nights" data-time="17h 40m, 1 stop" data-fare="529" data-temp="28°">
<div class="card__photo"><img src="risaie.webp" width="1024" height="683" alt="Green rice terraces under tall palm trees" draggable="false" style="--pos: 50% 50%"></div>
<span class="card__sheen" aria-hidden="true"></span>
<span class="card__temp">28°</span>
<div class="card__foot"><span class="card__region">Bali</span><span class="card__nights">9 nights</span></div>
</article>
</section>
<section class="info" aria-live="polite">
<div class="info__left">
<span class="info__name" data-name-box><span class="info__word" data-word>Alpstein</span></span>
<span class="info__time">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2 9.6l12-5.2-3.2 9.2-2.6-4-6.2 0z"/></svg>
<span data-time-text>2h 25m direct</span>
</span>
</div>
<div class="info__right">
<span class="info__from">from</span>
<span class="fare" data-fare-box aria-label="148 euros"><span class="fare__cur">€</span></span>
</div>
</section>
<div class="pager" aria-hidden="true"><span class="pager__thumb" data-thumb></span></div>
<svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z"/></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.
36 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 carousel” from Animorio and fit it into my siteThe whole carousel hangs on state.pos, a decimal number: 0 is the first card in the middle, 1 the second. Each frame every card works out its distance from the middle along the loop (wrap brings the difference between -N/2 and N/2, so the cards go round) and takes x, depth, rotation, scale, brightness and stacking order from it.
The container has perspective: 1100px; each card gets rotationY = -distance × TILT and z = -distance × DEPTH, capped just under two steps so the far cards stay readable. The same number dims the card with filter: brightness.
The photo is 44% wider than the card and moves with xPercent opposite to the card, PARALLAX per step: as the card goes left the landscape inside goes right, and looks further away than the card. A soft soft-light sheen slides along and fades on the side cards.
While dragging, pos follows the hand in proportion to the card width; the speed of the last moves, times FLING, decides up to two extra cards. On release a tween takes pos to the nearest whole number with back.out(1.25) in SETTLE seconds: the small overshoot is the settle. A gesture under 5 pixels is a tap and brings the tapped card to the middle.
When the card nearest the middle changes, the old name leaves letter by letter upwards and the new one rises from below with back.out(1.6), in the direction of travel. The fare is three strips of digits from 0 to 9, each moved with yPercent to its digit, slightly later from left to right.
| Name | File | Default | What it changes |
|---|---|---|---|
TILT | script.js | 24 | Degrees a card leans back for each step from the middle. |
DEPTH | script.js | 120 | Pixels a card moves back in depth for each step from the middle. |
PARALLAX | script.js | 0.16 | How far the photo slides the other way, as a share of the card width per step. |
SPACING | script.js | 0.8 | Distance between two cards, as a share of the card width. |
SETTLE | script.js | 0.9 | Seconds to settle on a card after letting go. |
FLING | script.js | 0.22 | How much the speed of the hand carries the carousel after letting go. |
ROLL | script.js | 0.6 | Seconds the name and the fare digits take to roll. |
AUTO_EVERY | script.js | 2.6 | Left alone, seconds between two moves of the drawn pointer. |
On the home page of a travel agency or app, on the offers page of a hotel group, in a tour operator's package picker: anywhere you choose between a few places worth looking at.
The same animation with adapted sizes: the cards take their size from the height of the screen and the side cards run half off the edges. You flip with a finger, and the vertical gesture stays free to scroll the page.
No tilting, no depth and no sliding photos: the cards sit in a flat row and jump to the new card; name, time and fare change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Fraunces (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.3 KB; the libraries: GSAP 28 KB.
Tested on 8 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.