Skip to content
animorio
IT
Back to the library

Hotel shutters scroll

Scroll, ImagesGSAP, CSS onlyMediumCompressed weight: Demo 6.0 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The opening of a made-up seaside hotel, in the clean style of product interfaces: a window with two closed louvred shutters; as you scroll the slats turn and the light of the bay comes in through stripes, then the two shutters swing outwards with a small knock, the real photo of the white terrace over the sea comes a little closer and the hotel name rises under the window.

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>
<!--
  "Hotel shutters scroll" 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>Villa Ostrea, rooms over the bay</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 opening of a made-up seaside hotel, Villa Ostrea. The stage sticks while you scroll: a window with two
       louvred shutters, closed. Scrolling, the slats of the shutters turn and the light of the bay comes through in
       stripes; then the two shutters swing outwards, the photo of the terrace and the sea comes a little closer and
       the name of the hotel rises under the window with its line. -->
  <main>
    <section class="corsa" data-corsa>
      <div class="palco" data-palco>
        <div class="spazio" data-spazio>
          <div class="tavola" data-tavola>

            <div class="testata" data-testata>
              <span class="testata__marchio">
                <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3 12 C6 9 8 9 10 12 C12 15 14 15 17 12" /><path d="M3 7.5 C6 4.5 8 4.5 10 7.5 C12 10.5 14 10.5 17 7.5" /></svg>
                Villa Ostrea
              </span>
              <span class="testata__voce">Rooms over the bay</span>
            </div>

            <div class="finestra" data-finestra>
              <div class="finestra__vano">
                <div class="foto" data-foto>
                  <img src="terrazza.webp" alt="A white hotel terrace over the sea: olive trees in terracotta pots, wicker sofas and islands in the haze" width="1024" height="532" decoding="async">
                  <div class="foto__grana"></div>
                </div>
                <div class="strisce" data-strisce aria-hidden="true"></div>
              </div>
              <div class="ante" data-ante aria-hidden="true">
                <div class="anta anta--sx" data-anta="sx"><div class="anta__telaio" data-telaio></div></div>
                <div class="anta anta--dx" data-anta="dx"><div class="anta__telaio" data-telaio></div></div>
              </div>
              <div class="davanzale" aria-hidden="true"></div>
            </div>

            <div class="nome" data-nome>
              <h1 class="nome__titolo" data-titolo>Villa Ostrea</h1>
              <i class="nome__riga" data-riga></i>
              <p class="nome__sotto" data-sotto>Fourteen rooms over the bay, open from April to October</p>
            </div>

            <div class="invito" data-invito>
              <span>Scroll to open</span>
              <svg viewBox="0 0 12 16" aria-hidden="true"><path d="M6 2 V13 M2 9 L6 13 L10 9" /></svg>
            </div>
          </div>
        </div>
      </div>
    </section>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.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.

16 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 “Hotel shutters scroll” 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 background there is a window with two louvred shutters, painted green and closed, just above a sill; at the top the Villa Ostrea mark, underneath the words Scroll to open. As you scroll, the slats turn on their axis, the top ones a moment before the bottom ones, and catch the light: between them the photo shows, and their striped shadows fall across the terrace and the sea. Then the two shutters swing outwards on their hinges, in perspective, go a hair too far and come back with a small knock that barely shakes the window. The striped shadows fade, the photo brightens and comes a little closer as it settles: it is a real photo: a white terrace high above the sea, with two olive trees and other plants in terracotta pots, white wicker sofas and a low table, the blue sea and the islands in the haze under a sky of light clouds. Under the window the hotel name rises letter by letter, then its line draws itself and the sentence arrives. Scroll back up and everything closes again.

How it works

Slats that really turn

Each shutter has fifteen slats, one above the other, each with its own perspective: perspective(420px) rotateX. Closed they overlap by two pixels and cover everything; open they are almost edge-on and the photo shows between them. The top slats start a moment earlier, and as they turn they brighten like wood catching the sun.

The shutters on their hinges

The two shutters turn around their outer edge, with the window’s perspective: one to the left, the other to the right. They go to 103.5% of their swing and come back with back.out, while the window drops one pixel and returns with an elastic: it is the small knock of the shutter landing.

One state, one function

The scroll-driven timeline only moves an object with five numbers (slats, shutters, zoom, light, knock); a single function turns them into the transforms, the striped shadows on the photo and the brightness of the photo, so every part stays in step with the others.

A board that fits every box

Everything is drawn on a 640 by 420 pixel board, scaled to fit the stage on both width and height. The photo is a real image (webp, 1024 by 532) with object-fit: cover and object-position moved to the left, so the nearly square window keeps the olive trees, the sofas and the sea; the slats are remeasured on resize.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the opening takes: 2 is twice as long.
HOTELscript.jsVilla OstreaThe hotel name that rises under the window.
SLATSscript.js15How many slats each shutter has.
TILTscript.js68How many degrees the slats turn when they open.
SWINGscript.js112How many degrees the shutters swing out.
ZOOMscript.js1.1How close the photo starts before settling at 1.

Try them in the Playground

When to use it

For the opening of the site of a hotel, a holiday home, a farm stay or a restaurant with a view: the window opening onto the terrace and the sea is the first moment visitors see the place.

On phones

The same animation with adapted sizes: the whole board scales down to fit the screen, with the same window, shutters, photo and name.

With reduced motion

The shutters are already open, with the name under the window, and everything simply fades in, with no movement.

Pitfalls

  • Each slat has its own perspective inside its transform (perspective(420px) rotateX): with a single perspective on the parent the top and bottom slats would turn differently from the middle ones.
  • The slat sizes are in pixels: they are recomputed on resize, because the demo window changes size while you watch.
  • Never once: true on a timeline with a ScrollTrigger: opening the page already scrolled down would freeze everything.
  • The photo is much wider than the window: without object-position the cover crops it in the middle and the olive trees on the left are lost. The light changes with filter: brightness on the container, not on the image, so zoom and light stay on a single element for GSAP.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.0 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

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