Skip to content
animorio
IT
Back to the library

Warm stone ritual

Scroll, ImagesGSAP, CSS onlyAdvancedCompressed weight: Demo 12 KBGSAP + ScrollTrigger 45 KBFreeDownload the zip

Scroll inside the preview

The warm stone ritual page of Lerra, a made-up bathhouse and spa, told on scroll in three moments: Arrival, Stones, Release. The stage stays still: on the left a real photo in a frame that changes its shape for every moment (wide, tall, almost square) while the framing slowly pushes in on the detail, the flowers on the towel, the stones on the back, the hands; the new photo rises inside the frame behind a line of warm light and the viewfinder marks follow it on a spring. On the right the booking card: the current moment lights up, its hairline and its part of the bar fill, the tick draws itself, the minutes roll up like an odometer to 90, then the price composes digit by digit and the Book the ritual button wakes up. Three real CC0 photos.

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>
<!--
  "Warm stone ritual" 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 warm stone ritual, the photo reframing as you scroll</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/full.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the Warm Stone Ritual of Lerra, a made-up bathhouse and spa, told in three moments as you scroll. The stage
       stays still: a real photo sits in a frame that changes its shape for every moment while the camera slowly
       pushes in on the detail, the next photo rises inside it, and the booking card beside it fills its moments,
       sums the minutes and composes the price, until the button to book the ritual arrives -->
  <header class="barra">
    <p class="marchio">
      <svg class="marchio__segno" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 15.5c2.6-2.2 5.4-2.2 8 0s5.4 2.2 8 0" /><path d="M7 10.5c1.7-1.4 3.3-1.4 5 0s3.3 1.4 5 0" /></svg>
      Lerra
    </p>
    <nav class="barra__voci" aria-label="Main">
      <a href="#" aria-current="page">Rituals</a>
      <a href="#">Baths</a>
      <a href="#">Visit</a>
    </nav>
  </header>

  <main>
    <section class="apertura">
      <p class="piccolo">Lerra bathhouse, signature ritual</p>
      <h1 class="titolo">The warm stone <em>ritual.</em></h1>
      <p class="piccolo piccolo--tenue">
        Scroll through its three moments
        <svg class="giu" viewBox="0 0 12 16" aria-hidden="true"><path d="M6 1v13M1.5 9.5 6 14l4.5-4.5" /></svg>
      </p>
    </section>

    <section class="racconto" data-racconto>
      <div class="palco">
        <div class="scena">

          <div class="finestra" data-finestra>
            <i class="cornice__ombra" data-ombra aria-hidden="true"></i>
            <div class="cornice" data-cornice>
              <div class="strato" data-strato data-fuoco="0.74 0.52" data-largo="1.5" data-spinta="1.42">
                <img src="arrivo.webp" alt="A folded warm towel with two white frangipani flowers, a candle glowing behind" width="1024" height="681" decoding="async">
              </div>
              <div class="strato strato--fresca" data-strato data-fuoco="0.52 0.42" data-largo="0.9" data-spinta="1.16">
                <img src="pietre.webp" alt="Three flat black basalt stones laid along a back" width="1024" height="768" decoding="async">
              </div>
              <div class="strato" data-strato data-fuoco="0.47 0.6" data-largo="1.16" data-spinta="1.34">
                <img src="mani.webp" alt="Two hands pressing warm stones along the back in soft amber light" width="1024" height="685" decoding="async">
              </div>
              <i class="cornice__grana" data-grana aria-hidden="true"></i>
              <i class="cornice__luce" data-luce aria-hidden="true"></i>
              <p class="vetrino" aria-hidden="true">
                <span class="vetrino__rullo"><span class="vetrino__striscia" data-vetrino>
                  <span>Linen, warmed to 40°</span>
                  <span>Basalt stones, 52°</span>
                  <span>Long strokes, then rest</span>
                </span></span>
              </p>
            </div>
            <i class="tacca tacca--a" data-tacca aria-hidden="true"></i>
            <i class="tacca tacca--b" data-tacca aria-hidden="true"></i>
            <i class="tacca tacca--c" data-tacca aria-hidden="true"></i>
            <i class="tacca tacca--d" data-tacca aria-hidden="true"></i>
          </div>

          <article class="scheda" aria-label="Warm stone ritual">
            <i class="scheda__bordo" aria-hidden="true"></i>
            <header class="scheda__testa">
              <p class="etichetta">Signature ritual</p>
              <h2 class="scheda__titolo">Warm stone</h2>
            </header>

            <ol class="momenti">
              <li class="momento" data-momento data-minuti="15">
                <span class="momento__nome">Arrival</span>
                <span class="momento__frase">Warm linen, one slow breath, the room goes quiet.</span>
                <span class="momento__min">15 min</span>
                <svg class="momento__fatto" viewBox="0 0 16 16" aria-hidden="true"><path data-spunta d="M3.5 8.4 6.6 11.4 12.6 4.8" /></svg>
                <i class="momento__filo" aria-hidden="true"><i data-filo></i></i>
              </li>
              <li class="momento" data-momento data-minuti="50">
                <span class="momento__nome">Stones</span>
                <span class="momento__frase">Basalt laid along the spine, heat sinking in.</span>
                <span class="momento__min">50 min</span>
                <svg class="momento__fatto" viewBox="0 0 16 16" aria-hidden="true"><path data-spunta d="M3.5 8.4 6.6 11.4 12.6 4.8" /></svg>
                <i class="momento__filo" aria-hidden="true"><i data-filo></i></i>
              </li>
              <li class="momento" data-momento data-minuti="25">
                <span class="momento__nome">Release</span>
                <span class="momento__frase">Long strokes with the last stone, then rest.</span>
                <span class="momento__min">25 min</span>
                <svg class="momento__fatto" viewBox="0 0 16 16" aria-hidden="true"><path data-spunta d="M3.5 8.4 6.6 11.4 12.6 4.8" /></svg>
                <i class="momento__filo" aria-hidden="true"><i data-filo></i></i>
              </li>
            </ol>

            <div class="barra-tempo" aria-hidden="true">
              <i class="barra-tempo__pezzo" data-pezzo><i></i></i>
              <i class="barra-tempo__pezzo" data-pezzo><i></i></i>
              <i class="barra-tempo__pezzo" data-pezzo><i></i></i>
            </div>

            <dl class="conti">
              <div class="conto">
                <dt>Duration</dt>
                <dd><span class="cifre" data-durata aria-hidden="true"></span><span class="unita">min</span><span class="nascosto">90 minutes</span></dd>
              </div>
              <div class="conto conto--prezzo" data-prezzo-riga>
                <dt>Price</dt>
                <dd><span class="valuta">€</span><span class="cifre" data-prezzo data-valore="145" aria-hidden="true"></span><span class="nascosto">145 euros</span></dd>
              </div>
            </dl>

            <button class="pulsante" type="button" data-prenota>
              <i class="pulsante__fondo" aria-hidden="true"></i>
              <i class="pulsante__lampo" aria-hidden="true"></i>
              <span class="pulsante__scritta" data-scritta>Book the ritual</span>
              <span class="pulsante__fatto" data-fatto aria-hidden="true">Held for Thursday, 6 pm</span>
              <svg class="pulsante__freccia" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4" /></svg>
            </button>
          </article>

        </div>
      </div>
    </section>

    <section class="coda">
      <p class="piccolo piccolo--tenue">Lerra bathhouse, open daily from 9 am</p>
    </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="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.

46 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 “Warm stone ritual” 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

At the top of the page of Lerra, a made-up bathhouse and spa, the heading “The warm stone ritual.” invites you down. Then the stage stops: on the left a real photo in a rounded frame with four viewfinder marks at its corners, on the right the ritual card (on a phone the card sits under the photo and the three moments are in a row). As you scroll every moment has its time: during Arrival the framing slowly pushes in on the two white flowers on the warm towel, with the candle left blurred behind. At the change the frame changes its shape on an expo curve, from wide to narrow and tall for Stones; the marks follow on a spring that goes one pixel too far and comes back; the photo of the basalt stones rises from the bottom inside the frame behind a thin line of warm light and settles from a slight zoom, while the one before keeps pushing in and darkens. The frosted glass note in the frame rolls to its new words, blurred while it runs. In the card the current moment goes from grey to ink, its thin hairline and its part of the minutes bar fill with amber, and when it ends its tick draws itself. The minutes roll up like an odometer: the units run and the tens turn only as the units pass nine, up to 90. After Release, with the hands and the stones in amber light, the price comes in and composes digit by digit with a little bounce, and the Book the ritual button wakes up: its ground turns dark, swells with a bounce, the arrow comes in and a flash of light crosses it. Under the pointer the label widens, the ground swells and the flash passes again; pressed it sinks, and on click the label leaves upwards and “Held for Thursday, 6 pm” arrives, then a moment later the button is back. Everything follows the scroll, backwards too.

How it works

A still stage and one number

The section is 560vh tall and a 100vh sticky stage (100lvh on Safari) stays still inside it. A single tween takes a number from 0 to 1 tied to the scroll with scrub SCRUB; one function rewrites everything from that number: each moment has a stretch where it is told and a stretch where it passes to the next, then the price and the button.

The frame as a window on the photo

Each photo covers the whole space of the frame at its largest, with pixel sizes recalculated on resize; the frame is a window moving over it. For each moment the frame has its own shape (data-largo, the ratio of width to height) fitted into the space with FILL, and at the change its sides pass from one to the other with RESHAPE. The photo moves so that its detail (data-fuoco) stays in the middle of the frame without ever showing its edge.

The framing pushing in

During its moment the photo slowly grows to data-spinta (multiplied by PUSH) on a sine.inOut curve, around its detail. The new photo rises with a clip-path inset from the bottom, followed by a one-pixel line of light with a glow, and settles from 1.06 to 1; the one before keeps growing a little and darkens. The four viewfinder marks follow the frame with MARKS, a back.inOut that takes them one pixel too far.

The odometer and the price

Each digit is a strip of numbers in a 1.05em window. The rounded minutes become the target and on the ticker the digits chase it softly: the units run, the tens turn only as the units pass nine. Past the last moment, a GSAP tween in time (not tied to the scroll) composes the price digit by digit with ROLL, staggered, with a blur that only lives while the strip runs, then wakes the button; scrolling back up plays it backwards.

The button waking up

The dark ground of the button goes from clear to full, the button grows on a back.out and a flash crosses it. Once awake, under the pointer the wdth axis of the label widens and the ground swells on a spring; pressed it sinks; on click the label leaves and the confirmation arrives, which a GSAP delayedCall puts back.

Values to change

NameFileDefaultWhat it changes
PUSHscript.js1How far the framing pushes in on the detail during a moment (0 = it stays still).
FILLscript.js0.94How much of its space the frame takes, at its largest.
RESHAPEscript.js'expo.inOut'The curve of the frame changing its shape.
MARKSscript.js'back.inOut(1.6)'The curve of the viewfinder marks following the frame.
ROLLscript.js'back.out(1.7)'The curve of the price digits landing on their drums.
GRAINscript.js0.08How much film grain lies on the photos.
SCRUBscript.js0.8How many seconds the ritual takes to catch up with the scroll.

Try them in the Playground

When to use it

For the page of a treatment at a spa, a wellness centre, a beauty salon or a hotel with a spa: when a service has stages and a length, and the visitor should reach the booking knowing what happens. It also suits a tasting menu or a three-part course. Swap the photos in the three img tags of the HTML, with their detail in data-fuoco and the frame shape in data-largo; the colours are in :root.

On phones

The same animations at adapted sizes: the photo sits on top, measured on width and height, the card under it with the three moments in a row, without the sentences, and the title beside the label.

With reduced motion

No movement: the frame keeps one shape and does not push in, the photos cross-fade from one to the next, the numbers and ticks change at once, the button lights up without growing.

Pitfalls

  • If the photo covered the frame with object-fit, every change of shape would resize it and it would jump: the photo covers the largest space and the frame moves over it, so the change of shape is a true change of framing.
  • Fraunces digits are old-style and drop below the line (4, 5, 9): on the drums they looked crooked. The numbers are set in Mona Sans.
  • The drum strips move by n times the height of a digit (1.05em), not n em: with 1em the tens drifted halfway after a few turns.
  • An odometer tied straight to the scroll stops on halfway values (89.6) and the poster shows two broken digits: the minutes are rounded and the digits chase them on the ticker, and the price and the button play in time as soon as the last moment is passed.
  • The clip-path of the rising photo would cut the frame's shadow: the shadow is a separate element following the frame.

Libraries

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

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

Testing

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