Skip to content
animorio
IT
Back to the library

Curtain wipe gallery

Images, HoverGSAP, CSS onlyMediumCompressed weight: Demo 9.0 KBGSAP 28 KBFreeDownload the zip

The gallery of Kestrel Plains, a made-up collection of three safari lodges: one photo at a time, a Prev / Next pill that follows the pointer and changes with the half of the photo, and on click the new photo opening like a curtain from the right side, uncovered and never squeezed, while the zoom settles. Minimal style. From the big gallery on the home page of the Tengile MalaMala Collection site, Awwwards Site of the Day on 3/10/2026.

Rebuilt from scratch studying tengilemalamala.com by DashDigital Studio, HKLM: the idea is theirs; code, copy and images are ours. Read how it’s made

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>
<!--
  "Curtain wipe gallery" 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>Kestrel Plains, the reserve gallery</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.css">
  <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 gallery of Kestrel Plains, a made-up collection of three safari lodges. One photo at a time; a small pill
       with «Prev» and «Next» follows the pointer and changes with the half of the photo it is on. A click opens the
       new photo like a curtain from that side, while the old one slides a little away. Arrow keys and swipes work too;
       on a phone two small arrows sit beside the counter. -->
  <div class="page">
    <header class="bar">
      <p class="brand" data-in>Kestrel Plains</p>
      <p class="bar__right" data-in>Reserve gallery</p>
    </header>

    <main class="gallery" data-gallery aria-roledescription="carousel" aria-label="Kestrel Plains Reserve">
      <div class="frame" data-frame tabindex="0" aria-label="Photo gallery, use the arrow keys">
        <figure class="slide" data-slide>
          <div class="slide__in" data-slide-in><img src="river.webp" alt="A family of elephants walking along a river bank at first light" width="1024" height="570" style="--fx: 50%; --fy: 45%"></div>
        </figure>
        <figure class="slide" data-slide>
          <div class="slide__in" data-slide-in><img src="leopard.webp" alt="A leopard resting on a fallen branch, looking at the camera" width="960" height="640" style="--fx: 62%; --fy: 40%"></div>
        </figure>
        <figure class="slide" data-slide>
          <div class="slide__in" data-slide-in><img src="pool.webp" alt="A pool and a lounger on a stone terrace, the bush beyond" width="1024" height="683" style="--fx: 50%; --fy: 60%"></div>
        </figure>
        <figure class="slide" data-slide>
          <div class="slide__in" data-slide-in><img src="drive.webp" alt="A game drive vehicle crossing the plain in a cloud of dust" width="960" height="640" style="--fx: 40%; --fy: 55%"></div>
        </figure>
        <figure class="slide" data-slide>
          <div class="slide__in" data-slide-in><img src="zebra.webp" alt="A zebra standing in a dry sandy riverbed" width="960" height="640" style="--fx: 50%; --fy: 55%"></div>
        </figure>
        <figure class="slide" data-slide>
          <div class="slide__in" data-slide-in><img src="giraffe.webp" alt="A giraffe in silhouette against an orange sunset" width="960" height="652" style="--fx: 70%; --fy: 50%"></div>
        </figure>
        <span class="frame__hint" data-hint aria-hidden="true"></span>
        <span class="frame__line" aria-hidden="true"></span>
      </div>

      <div class="foot">
        <p class="cap" aria-live="polite">
          <span class="cap__place" data-place>River Fig Lodge</span>
          <span class="cap__time" data-time>6:40 am</span>
        </p>
        <div class="foot__right">
          <button class="arrow arrow--prev" type="button" data-prev aria-label="Previous photo"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M12.5 4.5 7 10l5.5 5.5"/></svg></button>
          <p class="count" aria-hidden="true"><span class="count__cur" data-cur><span class="count__d" data-digit>1</span></span><span class="count__sep">/</span><span class="count__all" data-all>6</span></p>
          <button class="arrow arrow--next" type="button" data-next aria-label="Next photo"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M7.5 4.5 13 10l-5.5 5.5"/></svg></button>
        </div>
      </div>

      <div class="track" data-track aria-hidden="true">
        <span class="track__base"></span>
        <span class="track__fill" data-fill></span>
        <span class="track__tick" data-tick></span>
        <span class="track__tick" data-tick></span>
        <span class="track__tick" data-tick></span>
        <span class="track__tick" data-tick></span>
        <span class="track__tick" data-tick></span>
        <span class="track__tick" data-tick></span>
      </div>
    </main>
  </div>

  <!-- the pill that follows the pointer: two rows, Prev above Next, that slide -->
  <span class="label" data-label aria-hidden="true"><span class="label__pill" data-pill><span class="label__rows" data-rows><span class="label__row">Prev</span><span class="label__row">Next</span></span></span></span>

  <!-- the drawn pointer of the tour that runs by itself -->
  <span class="ghost" data-ghost aria-hidden="true"><svg class="ghost__in" data-ghost-in viewBox="0 0 20 24"><path d="M2 1.5 L2 19 L6.6 14.8 L9.6 21.6 L12.6 20.3 L9.7 13.6 L16 13.4 Z" fill="#fff" stroke="#1d2010" stroke-width="1.2" stroke-linejoin="round"/></svg></span>

  <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.

25 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Curtain wipe gallery” 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

Six photos of the Kestrel Plains reserve: elephants at the river at dawn, the leopard on a branch, the terrace pool, the game drive in the dust, the zebra in a dry riverbed and the giraffe at sunset. On a computer a warm white pill sits by the pointer and says Prev on the left half and Next on the right; a light veil darkens the edge you are heading to. On click the new photo comes in like a curtain from that side, with a soft shadow and a thread of light on its edge, while the old one slides a few points away. Below, the place and the hour rise word by word, the counter rolls like a digit and a thin line with six ticks lights up in olive green. Arrow keys, swipes and, on a phone, two small arrows beside the counter.

How it works

Photos on top of each other

The six photos share one frame, each in a box with overflow hidden. The current one is 100% wide, the others have width 0. The frame is a container (container-type: size), so the photo inside each box can be 100cqw wide: always as wide as the frame, even while its box is narrow.

The curtain from the right side

For Next the new box is anchored right (right: 0), for Prev left (left: 0), on top of everything (z-index 3). GSAP takes it from width 0% to 100% in .8 s power4.inOut: the photo is uncovered, not squeezed. Meanwhile the image inside goes from scale 1.2 to 1 in .8 s power3.inOut.

Shadow, light and parallax

On the moving edge a double box-shadow: a 1 px thread of light and a soft shadow falling on the old photo, fading out in the last third. The old photo slides DRIFT per cent in the curtain's direction, so it looks pushed away.

The pill that follows the pointer

On every pointermove gsap.set puts the pill 15 px below and right of the pointer. Inside are two 23 px rows, Prev above Next: the is-next class moves the column by -23 px with transition .5s cubic-bezier(.165,.84,.44,1). The side comes from the half of the frame; a soft veil marks the edge you are heading to.

Caption, counter and ticks

Every caption word sits in its own mask: the old ones leave upwards, the new ones rise with expo.out and a touch of rotation. The counter makes a new digit that comes in from below (from above with Prev) while the old one leaves. The line fills with scaleX and the tick of the current photo grows with back.out.

Keys, swipes and the tour

Right and left arrow keys; on a phone a swipe of more than 36 px or a tap on one half, plus two SVG arrows beside the counter. When nobody touches the page, a drawn pointer does three Next and one Prev, over and over, and stops as soon as the real mouse moves.

Values to change

NameFileDefaultWhat it changes
OPENscript.js0.8Seconds the curtain takes to open (the site uses .8).
ZOOMscript.js1.2Scale the new photo starts from inside the curtain (the site uses 1.2).
ZOOM_TIMEscript.js0.8Seconds the photo takes to settle from ZOOM to 1 (the site uses .8).
DRIFTscript.js5How far the old photo slides away, in % of its width.
SHADEscript.js0.5How dark the shadow on the curtain's edge is, from 0 to 1.
OFFSETscript.js15Px between the pointer and the pill (the site uses 15).
RISEscript.js0.6Seconds the caption words take to rise.
AUTOscript.js1.1Seconds the tour rests on each photo.

Try them in the Playground

When to use it

For the site of a hotel, a lodge, a holiday home, a restaurant or a photography portfolio: a big gallery you leaf through without buttons, with the pointer telling you where you go.

On phones

On a phone there is no pointer: the pill does not show and two small SVG arrows appear beside the counter; you can also swipe or tap one half of the photo. The frame is measured on width and height together, so it fits in the box with its caption, which goes on two lines.

With reduced motion

No curtain, zoom or parallax: the new photo fades in over the old one, caption and counter fade, the line lights up at once; the pill changes its word without sliding.

Pitfalls

  • A 100% wide photo inside a growing box gets squeezed: it must be as wide as the frame (100cqw, or a pixel size measured again on resize), so the curtain uncovers it.
  • Anchor the box right for Next and left for Prev, or the curtain always opens from the same side.
  • A click during the curtain: here the change waits for the end and runs after, instead of piling two timelines.
  • On a phone a tap fires both pointerup and click: the type of the last pointerdown is kept so the photo does not change twice.

Libraries

GSAP 3.15.0, Fraunces (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 22 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