Skip to content
animorio
IT
Back to the library

Detail zoom scroll

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

Scroll inside the preview

The product page of the Field Satchel by Odell & Finch, a made-up leather workshop, with a real photo: as you scroll the camera moves into the photo and stops on three details, the saddle stitch, the brass buckle and the burnished edge, each with a ring on the point, a hairline drawing out and a small card; then it pulls back to the whole bag with the price and the pill. Minimal style.

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>
<!--
  "Detail zoom 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>Odell &amp; Finch, the Field Satchel</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 product page of a made-up leather workshop, Odell & Finch, for its Field Satchel. A sticky stage scrubbed by
       the scroll: the camera moves into the photo of the bag, stops on three details one after the other (the stitching,
       the brass buckle, the burnished edge) with a thin label drawn from the point, then pulls back to the whole bag
       with the price and the pill -->
  <section class="corsa" data-corsa>
    <div class="palco" data-palco>
      <div class="foto-col">
        <div class="cornice" data-cornice>
          <div class="immagine" data-immagine>
            <img src="borsa.webp" alt="A brown leather satchel with two buckled straps, resting on a granite block" width="1024" height="610">
          </div>
          <div class="vignetta" data-vignetta aria-hidden="true"></div>
          <div class="fuoco" data-fuoco aria-hidden="true"></div>
          <div class="grana" aria-hidden="true"></div>

          <div class="segni" data-segni>
            <div class="segno" data-segno="0">
              <span class="segno__punto" aria-hidden="true"></span>
              <span class="segno__filo" aria-hidden="true"></span>
              <span class="segno__etichetta">
                <b>Saddle stitch</b>
                <span>Hand-stitched, 8 per inch</span>
              </span>
            </div>
            <div class="segno" data-segno="1">
              <span class="segno__punto" aria-hidden="true"></span>
              <span class="segno__filo" aria-hidden="true"></span>
              <span class="segno__etichetta">
                <b>Brass buckle</b>
                <span>Solid, cast in Walsall</span>
              </span>
            </div>
            <div class="segno" data-segno="2">
              <span class="segno__punto" aria-hidden="true"></span>
              <span class="segno__filo" aria-hidden="true"></span>
              <span class="segno__etichetta">
                <b>Burnished edge</b>
                <span>Sanded, dyed, rubbed by hand</span>
              </span>
            </div>
          </div>
        </div>

        <nav class="dettagli" aria-label="Details">
          <span class="dettagli__pillola" data-pillola-nav aria-hidden="true"></span>
          <button type="button" class="dettaglio" data-vai="0">Stitch</button>
          <button type="button" class="dettaglio" data-vai="1">Buckle</button>
          <button type="button" class="dettaglio" data-vai="2">Edge</button>
        </nav>
      </div>

      <div class="info">
        <p class="marca">Odell &amp; Finch <span>Leatherworks</span></p>
        <h1 class="nome">Field Satchel</h1>
        <p class="riga">Full-grain vegetable-tanned leather, made by one pair of hands.</p>
        <div class="compra" data-compra>
          <span class="prezzo"><span class="prezzo__valuta">$</span>480</span>
          <button class="pillola" type="button" data-pillola>
            <span class="pillola__fondo" aria-hidden="true"></span>
            <span class="pillola__testo" data-pillola-testo>Add to bag</span>
            <svg class="pillola__spunta" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8.4 6.6 11.3 12.5 4.9" data-spunta/></svg>
          </button>
        </div>
        <p class="scorri" data-scorri>Scroll to look closer</p>
      </div>
    </div>
  </section>
  <footer class="fine">Odell &amp; Finch is a made-up workshop. The Field Satchel is not for sale.</footer>

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

32 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 “Detail zoom 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 warm paper, on the left the real photo of the Field Satchel, a brown leather satchel with two buckled straps resting on a granite block, in a rounded frame with a touch of grain; under it a bar with three names, Stitch, Buckle, Edge. On the right the Odell & Finch brand, the wide Field Satchel name, one line on the materials, the price and the black Add to bag pill. Scrolling, the camera moves into the photo onto the cross stitch of the left strap: a white ring lands on the point, a thin line draws out at an angle and a card arrives, Saddle stitch, Hand-stitched, 8 per inch; at the edges the photo darkens and blurs a little, like a close lens, and the light pill under the photo slides to Stitch. Then the camera moves to the brass buckle on the right (Brass buckle, Solid, cast in Walsall) and down to the burnished edge of the shoulder pad (Burnished edge, Sanded, dyed, rubbed by hand). At the end it pulls back to the whole bag, the vignette goes and the price with the pill gives a small bounce. With the mouse on the photo the camera moves a hair towards the pointer; a click on a name scrolls to that detail; the pill swells and on click says Added with a tick.

How it works

One fixed stage and one timeline

The section is 420vh tall with a sticky stage of 100lvh (at most 100vh). One GSAP timeline moves a camera made of three numbers (the scale and the point it looks at, as fractions of the photo) and how far each label is drawn; ScrollTrigger with scrub ties it to the scroll and Lenis makes the scroll smooth.

The camera inside the frame

The photo sits in a box with transform-origin at the top left: translate and scale are worked out on every update from the point looked at, x = W/2 − point × W × scale, kept between W − W × scale and 0 so the edge of the photo never shows. Sizes are read again on every resize.

Labels outside the scale

Ring, line and card sit over the photo and do not grow: their place is the point of the detail passed through the same transform. The line is a div as wide as the line, rotated and scaled from 0 to 1; the card goes to the side with more room and stays inside the frame.

Vignette and depth

A dark radial veil and a layer with backdrop-filter: blur masked in the middle take their opacity from how close the camera is: far away they do not show, on a detail the edges darken and blur.

The names and the end

The light pill under the photo slides to the name of the lit detail with back.out; a click on a name works out where that detail sits in the scroll and goes there with Lenis. At the end the camera goes back to scale 1 and the price with the pill gives a small bounce.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole page takes: 2 is twice as long.
SCRUBscript.js0.8Seconds the camera lags behind the scroll.
ZOOMscript.js1.7How close the camera gets on each detail (1 is the whole photo).
HOLDscript.js0.9How long each detail stays, compared with the move between them.
VIGNETTEscript.js0.85How dark the vignette gets when the camera is close (0 none).
DEPTH_BLURscript.js3Blur at the edges of the photo when the camera is close, in pixels.
PARALLAXscript.js2How much the pointer moves the camera, in percent of the photo.

Try them in the Playground

When to use it

For the page of a well-made product worth looking at closely: a bag, a watch, a hand-sewn shoe, a knife, a piece of furniture. When the details are the reason for the price and should be shown one at a time, without a gallery of ten photos.

On phones

The same animation with adapted sizes: the photo on top, almost as wide as the screen and measured on the height too, the name and the price below in two columns, the materials line hidden; shorter lines and smaller cards.

With reduced motion

No zoom: the photo stays whole and still, and as you scroll the three labels fade in one after another on their points.

Pitfalls

  • The labels must not sit inside the box that scales: they would grow with the photo. They sit on top and take the point position passed through the same transform.
  • Without limits on translate, getting close to a point near the edge shows the background behind the photo: x and y must be kept between W − W × scale and 0.
  • Free photos come about 1000 pixels wide: beyond 1.7 times, in a large frame, they look grainy. That is why the frame is medium sized and the default zoom is 1.7.
  • The blur backdrop-filter has to be masked in the middle (radial mask-image), or it also blurs the detail being looked at.

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

Testing

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