Skip to content
animorio
IT
Back to the library

Cabin listing card

Images, HoverGSAPMediumCompressed weight: Demo 6.8 KBGSAP 28 KBFreeDownload the zip

The listing card of Fernhollow, a made-up A-frame in the woods, with four real photos in one frame: the black cabin among the ferns, the loft under the skylights, the kitchen with the bay window, the table with the lanterns. Moving the pointer across the photo flips through them without clicking, one per zone: the new photo opens from the side you come from and settles from slightly too large while the old one slips away; the thin segment at the bottom fills on a spring and the caption rises. The card lifts and a soft light follows the pointer; the heart saves the stay with a ring and a few sparks. On the phone you drag a finger across the photo.

The code

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>
<!--
  "Cabin listing card" 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 cabin listing card with photos that scrub under the pointer</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/geist@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the listing card of Fernhollow, a made-up stay in the woods: four real photos of the cabin under one frame.
       Moving the pointer across the photo scrubs through them, one zone each: the new photo opens from the side
       you came from and settles from a hair too large, the thin segments at the bottom follow, the caption changes.
       The heart saves the stay with a ring and a little burst; on touch you drag across the photo. -->
  <main class="palco" data-palco>
    <article class="card" data-card>
      <div class="foto" data-foto aria-roledescription="carousel" aria-label="Photos of the cabin">
        <div class="foto__pila">
          <figure class="lastra" data-lastra><img src="capanna.webp" width="960" height="640" alt="A black A-frame cabin with string lights among tall ferns and firs"></figure>
          <figure class="lastra" data-lastra><img src="camera.webp" width="1024" height="768" alt="A bright loft bedroom under two skylights"></figure>
          <figure class="lastra" data-lastra><img src="cucina.webp" width="960" height="640" alt="A white farmhouse kitchen with a deep sink under a bay window"></figure>
          <figure class="lastra" data-lastra><img src="lanterne.webp" width="960" height="640" alt="A wooden table on the deck lit by lanterns at dusk"></figure>
        </div>
        <span class="foto__velo" aria-hidden="true"></span>
        <span class="foto__luce" data-luce aria-hidden="true"></span>

        <p class="distintivo">
          <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8l1.7 3.6 3.9.5-2.9 2.7.8 3.9L8 10.6l-3.5 1.9.8-3.9L2.4 5.9l3.9-.5z" /></svg>
          Guest favourite
        </p>

        <button class="cuore" type="button" data-cuore aria-pressed="false" aria-label="Save this stay">
          <span class="cuore__anello" data-anello aria-hidden="true"></span>
          <svg class="cuore__segno" viewBox="0 0 24 24" aria-hidden="true"><path data-cuore-forma d="M12 20.2s-7.4-4.5-7.4-10a4.2 4.2 0 0 1 7.4-2.7 4.2 4.2 0 0 1 7.4 2.7c0 5.5-7.4 10-7.4 10z" /></svg>
          <span class="cuore__schegge" data-schegge aria-hidden="true"></span>
        </button>

        <p class="didascalia" aria-live="polite"><span data-didascalia>The A-frame</span><em data-conta>1 / 4</em></p>

        <div class="tacche" aria-hidden="true">
          <span class="tacca"><i data-tacca></i></span>
          <span class="tacca"><i data-tacca></i></span>
          <span class="tacca"><i data-tacca></i></span>
          <span class="tacca"><i data-tacca></i></span>
        </div>
      </div>

      <div class="testo">
        <div class="testo__riga">
          <h1 class="titolo">Fernhollow A-frame</h1>
          <p class="voto">
            <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8l1.7 3.6 3.9.5-2.9 2.7.8 3.9L8 10.6l-3.5 1.9.8-3.9L2.4 5.9l3.9-.5z" /></svg>
            4.97
          </p>
        </div>
        <p class="sotto">Cabin in the ferns · Whistle Creek</p>
        <p class="sotto">2 guests · 1 loft bedroom · wood stove</p>
        <p class="prezzo"><strong>$184</strong> night <span>· $552 for 3 nights</span></p>
      </div>
    </article>

    <svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3l13.5 8.2-6.1 1.3 3.4 6.6-2.6 1.3-3.4-6.6L5 18.4z" /></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>

Playground

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.

24 values to change

Or ask your AI assistant for it

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 “Cabin listing card” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a warm white ground sits the listing card of Fernhollow, a made-up cabin in the woods: on top the photo with the «Guest favourite» badge and the heart, below the name, the star rating, two lines about the place and the price per night. The photo is split into four invisible zones, one per photo: moving the pointer from left to right goes from the cabin to the bedroom, the kitchen and the table on the deck. The new photo opens from the side the pointer comes from and settles from slightly too large; the old one slips a little the other way. At the bottom four thin segments: the photo's own fills on a spring, the previous one empties towards where you are going; the caption changes as it rises. Pressed, the heart squashes and comes back with a bounce, red, with a ring opening and seven sparks.

How it works

Four photos in one frame

The photos are four figures stacked in a 4/3 frame with rounded corners and hidden overflow. The visible one has the highest z-index; the others are hidden. The card is sized on height too (the min of 25rem, 86vw and the height left after the text), so it fits the phone box.

The zones under the pointer

On every move the pointer's place across the photo is worked out, from 0 to 1, and multiplied by the number of photos: the whole part is the zone. When the zone changes, the new photo goes on top with an inset clip-path closed on the side you come from and opens in REVEAL_TIME on an expo.out curve; the image inside starts from SETTLE and 3% to the side and settles, while the old one slips DRIFT pixels the other way.

Segments, caption and light

Each segment is a 2-pixel line holding a scaleX bar: the new one fills with back.out, the old one empties towards the direction of travel. The caption leaves upwards and comes back from below with a small bounce, the counter with it. A soft-light radial gradient follows the pointer through two CSS variables, at strength SHEEN, and the card rises LIFT pixels.

The heart

Pressed, the heart squashes to 0.72 and comes back on an elastic spring as it fills with the accent colour; a ring starts at half size and widens as it fades, and SPARKS sparks fly out in a ring. Without a mouse you drag a finger across the photo and the zone follows it; the arrow keys flip through when the photo has focus.

Values to change

NameFileDefaultWhat it changes
REVEAL_TIMEscript.js0.55Seconds for the new photo to open from the side the pointer comes from.
SETTLEscript.js1.06How large the new photo starts before it settles (1 = no settle).
DRIFTscript.js10How many pixels the old photo slips away while the new one opens.
LIFTscript.js4How many pixels the card rises with the pointer on it.
SHEENscript.js1How much light follows the pointer on the photo (0 = none).
SPARKSscript.js7How many sparks fly out of the heart when the stay is saved.
AUTOPLAYscript.jstrueLeft alone, a drawn pointer flips through the photos and saves the stay.

Try them in the Playground

When to use it

For listing cards of holiday homes, hotels and rentals, for shop product cards with several photos, for a restaurant showing its dishes: wherever a card holds several photos and you want to flip through them without opening anything, just by passing over. Swap the photos in the HTML and the caption names in NOMI in the script.

On phones

The same animations at adapted sizes: the card is sized on height too, and on the phone you drag a finger across the photo to flip through; the light and the lift follow the finger while it stays down. On short screens the second line about the place hides.

With reduced motion

No movement: the photos change with a cross-fade instead of opening from the side, the segments and caption change without bounces, the card does not lift and the heart turns red without squashing or sparks.

Pitfalls

  • The card lifts with GSAP: the deeper shadow lives in an ::after that only changes opacity, because a CSS transform on the card would wipe GSAP's.
  • The clip-path animates as an inset string with four percentages in the same form at start and end, otherwise GSAP cannot interpolate it.
  • Hide the old photo only once the new one has opened: hiding it at once shows the grey ground for a moment.

Libraries

GSAP 3.15.0, Geist (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.8 KB; the libraries: GSAP 28 KB.

Testing

Tested on 14 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All animations