Skip to content
animorio
IT
Back to the library

Pastry shop morning

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

Scroll inside the preview

The “Our morning” page of Pâtisserie Odile, a made-up pastry shop, told by the clock: as you scroll, a typographic clock rolls minute by minute from 4:00 to 8:00 like an odometer and four real photos (the dough on the floured bench, the oven, the croissants just baked, the full shop window) take turns in a frame that changes shape, from the tall arched door of the bakehouse to the wide window of the shop. Each photo slides up under a thread of warm light, steam rises only where something is hot, and at eight “Open at 8.” and the “Order for pick up” button arrive.

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>
<!--
  "Pastry shop morning" 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>Our morning, from the oven to the window</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 "Our morning" page of Pâtisserie Odile, a made-up pastry shop. Scrolling down, the stage stays still and the
       morning is told by the clock: it rolls from four to eight while four real photos take turns in a frame that
       changes shape, from the tall door of the bakehouse to the wide shop window. At eight the shop opens. -->
  <header class="barra">
    <p class="marchio">
      <svg class="marchio__segno" viewBox="0 0 24 24" aria-hidden="true"><path d="M6.5 21V10.5a5.5 5.5 0 0 1 11 0V21" /><path d="M4 21h16" /></svg>
      Pâtisserie Odile
    </p>
    <nav class="barra__voci" aria-label="Main">
      <a href="#">Menu</a>
      <a href="#" aria-current="page">Our morning</a>
      <a href="#">Visit</a>
    </nav>
  </header>

  <main>
    <section class="apertura">
      <p class="piccolo">Pâtisserie Odile, baking since 1987</p>
      <h1 class="titolo">Our morning, <em>before you wake.</em></h1>
      <p class="piccolo piccolo--tenue">
        Scroll from four o'clock
        <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">
          <!-- the frame: one box as large as it can be, clipped by the script into the shape of the hour -->
          <figure class="cornice" data-cornice>
            <div class="cornice__ombra" data-ombra>
              <div class="cornice__forma" data-forma>
                <div class="scatto" data-scatto data-ora="240" data-vapore="0"><img src="impasto.webp" alt="Hands shaping a ball of dough on a floured bench" width="960" height="1440" decoding="async"></div>
                <div class="scatto" data-scatto data-ora="315" data-vapore="0.45"><img src="forno.webp" alt="A baker loading the deck oven, golden loaves in front" width="1024" height="681" decoding="async"></div>
                <div class="scatto" data-scatto data-ora="400" data-vapore="1"><img src="croissant.webp" alt="A basket of croissants just out of the oven" width="1024" height="575" decoding="async"></div>
                <div class="scatto" data-scatto data-ora="470" data-vapore="0"><img src="vetrina.webp" alt="The shop counter full of bread and pastries, two bakers behind it" width="1024" height="705" decoding="async"></div>
                <div class="vapore" data-vapore-velo aria-hidden="true"><i></i><i></i><i></i><i></i></div>
                <i class="filo" data-filo aria-hidden="true"></i>
              </div>
            </div>
          </figure>

          <div class="testo">
            <p class="etichetta">Our morning</p>
            <p class="ora" aria-hidden="true">
              <span class="rullo"><span class="striscia" data-striscia="ore"></span></span><span class="ora__punti">:</span><span class="rullo"><span class="striscia" data-striscia="decine"></span></span><span class="rullo"><span class="striscia" data-striscia="unita"></span></span><span class="ora__am">am</span>
            </p>
            <div class="scala" aria-hidden="true">
              <i class="scala__vuota"></i>
              <i class="scala__piena" data-scala></i>
              <i class="scala__punta" data-punta></i>
              <span data-tacca>4</span><span data-tacca>5</span><span data-tacca>6</span><span data-tacca>7</span><span data-tacca>8</span>
            </div>
            <div class="frasi">
              <p class="frase" data-frase><span class="nascosto">4:00. </span><b>The bench.</b> The dough rested all night under linen.</p>
              <p class="frase" data-frase><span class="nascosto">5:15. </span><b>The ovens.</b> Two decks at 230 degrees, the first loaves go in.</p>
              <p class="frase" data-frase><span class="nascosto">6:40. </span><b>The first tray.</b> Croissants out, still crackling as they cool.</p>
              <p class="frase" data-frase><span class="nascosto">7:50. </span><b>The window.</b> Filled one tray at a time, the lights come on.</p>
              <div class="fine" data-fine>
                <p class="fine__titolo">Open at 8.</p>
                <a class="pulsante" href="#" data-pulsante><span class="pulsante__fondo" aria-hidden="true"></span><span class="pulsante__testo">Order for pick up</span><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4" /></svg></a>
              </div>
            </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.

44 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 “Pastry shop morning” 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 Pâtisserie Odile, a made-up pastry shop, the title “Our morning, before you wake.” invites you to scroll “from four o'clock”. Then the stage stops: a frame of photos on the left, a large clock with “am” on the right, under it a thin scale of the hours from 4 to 8 and a sentence (on a phone the clock and the sentence sit under the frame, side by side). Scrolling, the frame draws up from the bottom in the shape of a tall door with an arch on top, and inside is the first photo: hands working the dough on the floured bench, at 4:00. The clock rolls like an odometer: each minute stays still and then clicks on to the next with a small bounce, and the tens and the hour only turn when the digits below go from 9 to 0; while it runs fast it is slightly blurred. A caramel tip runs along the scale and the hours gone turn dark. At every moment the frame widens a little and the arch lowers, until the bakehouse door becomes the wide shop window; the new photo slides up from below with a thread of warm light on its edge and a zoom that settles, while the one before darkens and draws closer. The photos are real: the dough at 4:00, the baker loading the deck oven at 5:15 with golden loaves in front, the basket of croissants just out of the oven at 6:40, the counter full of bread and pastries with two people behind it at 7:50. Over the oven and the croissants a light steam rises, made of four CSS plumes; over the dough and the window it does not. The sentence of each moment rises word by word, with the name of the moment in caramel (The bench, The ovens, The first tray, The window). At 8:00 the sentence leaves and “Open at 8.” arrives with the dark “Order for pick up” button and its arrow, rising on a spring; on hover the button's background swells, the label widens and the arrow steps forward.

How it works

A still stage and some numbers

The section is 620vh tall and inside it a 100lvh sticky stage stays still. Lenis smooths the scroll and updates ScrollTrigger on each of its steps; a GSAP timeline tied to the scroll with scrub SCRUB does not move elements but numbers: the door opening, the shape of the frame, each photo coming in, the minutes on the clock, each sentence coming in and leaving, and the end. On every update a single function rewrites everything from those numbers.

The frame that changes shape

The frame is a box as large as it can be, and its shape comes from an inset clip-path with rounded corners. The width-to-height ratio grows evenly (geometrically) from DOOR to WINDOW across the four photos: when it is narrow the frame takes the full height, when it is wide the full width. The top corners start at half the width, an arch, and come down to 10 pixels (ARCH). All in pixels measured on the box and recomputed on resize.

Photos rising under the light

Each photo is an img with object-fit cover in a layer that covers the box. The new photo is uncovered from below by its own inset clip-path (the edge in pixels inside the frame's shape) and a zoom from SLIDE to 1 with expo.out; a one-pixel thread of warm light with two glows rides its edge and fades as it reaches the top. The photo before loses light and colour and comes 5% closer. Each img also drifts a few points vertically as you scroll, for a bit of depth.

The clock as an odometer

Hours, tens and units are three strips of digits in 1em windows (4-8, 0-5 plus 0, 0-9 plus 0, so they turn forward without going back). From the minutes of the timeline each minute stays still and clicks on to the next only in its last part TICK, with back.out; the tens move only when the units go from 9 to 0, the hour only from :59. When the strips run fast they take a blur, which a check on the ticker removes as soon as they stop.

Steam only where it is hot

The steam is four ovals with a light radial gradient, blurred and in screen mode, rising, widening and fading with an infinite, staggered CSS animation. Each photo has data-vapore in the HTML (0 the dough and the window, 0.45 the oven, 1 the croissants): the script adds up how much each photo is showing times its heat and multiplies it by STEAM, so the steam comes and goes with the photos.

The sentences and the end

Each word of the sentence sits in an overflow hidden window and rises with power3.out, staggered, and leaves upwards with power2.in; the name of the moment is in caramel bold, and for screen readers the whole sentence is written once, hidden. At 8:00 “Open at 8.” rises and the button arrives with back.out; its background is a separate element that swells with a bounce on hover while the label widens on Mona Sans' wdth axis.

Values to change

NameFileDefaultWhat it changes
DOORscript.js0.62The shape of the frame at four: width over height, a tall door.
WINDOWscript.js1.62The shape at eight: a wide shop window.
ARCHscript.js1How round the top of the door is (0 = square).
SLIDEscript.js1.1How zoomed in each photo is as it slides up into the frame.
STEAMscript.js0.85How much steam rises over the hot trays.
TICKscript.js0.3How much of every minute the clock spends rolling to the next.
SCRUBscript.js0.6How many seconds the morning takes to catch up with the scroll.

Try them in the Playground

When to use it

For the “Our day” or “About us” page of a pastry shop, a bakery, a cafe or a restaurant: when the work before opening is the story, and the story ends with an order to pick up. It also suits a dairy, a coffee roaster or a winery. Swap the photos in the four img tags of the HTML (the webp files in the folder), with the time in data-ora and the heat in data-vapore; the colours are in :root.

On phones

The same animations at adapted sizes: the frame sits on top, measured on width and height, and under it are the clock with the scale of the hours and, beside them, the sentence; the end with the button takes the sentence's place.

With reduced motion

No movement: the frame keeps one shape, halfway between the door and the window, Lenis is off and there is no steam; the photos cross-fade from one to the next, the time, the sentence and the end change with a fade.

Pitfalls

  • The clip-path cuts the shadows too: the shadow and the hairline edge are a drop-shadow on the frame's parent, which follows the child's clipped shape, arch included.
  • With a percentage clip-path the new photo would rise from below the whole box, not from below the frame: its edge is computed in pixels inside the shape of the moment.
  • If the clock followed the minutes continuously the units would always sit between two digits: each minute stays still and only clicks over in its last part, and the tens only turn when the units go from 9 to 0.
  • The counter photo had the light bottom of a lamp at its top edge, which looked like a notch in the wide window: the photo was trimmed at the top.

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 10 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

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