
Stacking certificates
Hover, Images
The room picker of a small made-up hotel, in a premium minimal style with real photos: four tall cards side by side; hover one and it widens on a spring while the others narrow, the photo drifts a little like a parallax, a warm afternoon light slides across it and the name, size, view and nightly price rise from below. Click «Check availability» and the button opens into a small calendar of the next free nights.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React tab holds the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Sunlit room cards" 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>Casa Lumea, choose your room</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 rooms of a small made-up hotel, Casa Lumea, as tall cards side by side. Hover one and it widens on a
spring while the others narrow; the photo drifts a little, a warm afternoon light slides across it and the
name, size, view and price rise from below. Check availability turns into a small calendar of free nights -->
<main class="stage" data-stage>
<div class="wrap">
<header class="head">
<div class="brand">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M4.5 19.5h15"/><path d="M6.5 19.5v-6a5.5 5.5 0 0 1 11 0v6"/><path d="M12 5.2V3.5M5.4 8.4 4.2 7.2M18.6 8.4l1.2-1.2"/></svg>
<span data-hotel>Casa Lumea</span>
</div>
<p class="head__note">Four rooms, one garden</p>
</header>
<div class="row" data-row role="list" aria-label="Rooms"></div>
</div>
<svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z"/></svg>
</main>
<template data-card>
<article class="card" role="listitem" tabindex="0">
<div class="card__photo"><img data-img alt="" draggable="false"></div>
<div class="card__light" aria-hidden="true"><span class="card__sweep" data-sweep></span><span class="card__glow" data-glow></span></div>
<div class="card__shade" aria-hidden="true"></div>
<span class="card__spine" data-spine></span>
<div class="info" data-info>
<p class="info__line info__kind"><span data-kind></span></p>
<h2 class="info__line info__name"><span data-name></span></h2>
<p class="info__line info__meta"><span data-meta></span></p>
<div class="info__line info__foot">
<span class="info__price"><strong data-price></strong> / night</span>
</div>
<div class="book" data-book>
<button class="book__btn" type="button" data-open>
<span>Check availability</span>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12h13M13 7l5 5-5 5"/></svg>
</button>
<div class="cal" data-cal aria-hidden="true">
<div class="cal__top">
<span class="cal__title" data-month></span>
<button class="cal__x" type="button" aria-label="Close calendar" data-close>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 7l10 10M17 7 7 17"/></svg>
</button>
</div>
<div class="cal__days" data-days></div>
<div class="cal__grid" data-grid><span class="cal__range" data-range></span></div>
<p class="cal__sum"><span data-nights>2 nights</span><strong data-total></strong></p>
</div>
</div>
</div>
</article>
</template>
<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.
14 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 “Sunlit room cards” from Animorio and fit it into my siteThe four cards sit in a flex row, all with flex-grow 1. Widening one means raising its flex-grow to 3.2 with GSAP and back.out: the others narrow by themselves, always touching, and the spring goes slightly past and comes back.
The block with name, size and price has the width of the open card, computed by the script and again on resize: while the card widens the text does not wrap differently, it is only revealed. Each line rises from below out of its own overflow hidden window.
Over the photo sits a soft-light layer with a warm, slanted gradient band that GSAP slides from one side to the other, and an amber radial gradient in the corner that stays on. The photo is a little larger than the card and follows the pointer with quickTo.
The pill and the calendar share one container: on click the label fades, the container grows to the calendar's height and the corners go from pill to 14 pixels, then the days come in staggered. The selection is a single pill under the numbers, moved and stretched with offsetLeft and offsetWidth.
| Name | File | Default | What it changes |
|---|---|---|---|
HOTEL | script.js | Casa Lumea | The made-up hotel’s name, written at the top. |
GROW | script.js | 3.2 | How much the chosen card widens compared with the others. |
SPRING | script.js | 0.9 | The seconds of the spring that resizes the cards. |
PARALLAX | script.js | 18 | How many pixels the photo moves with the pointer: 0 no parallax. |
LIGHT | script.js | 1.5 | The seconds of the afternoon light sliding across the photo. |
ACCENT | script.js | #c9733a | The accent colour. |
HOLD | script.js | 2.2 | The seconds the calendar stays open before the drawn pointer closes it. |
For the rooms page of a hotel, a B&B or a holiday home: every room is visible at once, you look closely at one without leaving the page and check the free nights right from the card.
The same four cards in the same row, with the open card wider (weight 4) so text and calendar fit; tap a card to open it.
No spring, parallax or sliding light: the cards change width at once, and text, glow and calendar simply fade in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.7 KB; the libraries: GSAP 28 KB.
Tested on 12 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.