Skip to content
animorio
IT
Back to the library

Turning photo print

Hover, ImagesGSAP, CSS onlyMediumCompressed weight: Demo 7.9 KBGSAP 28 KBFreeDownload the zip

A real photographic print, a beach at low tide at dawn, lying on the table of a made-up print shop, in the clean style of today’s products: hover and it lifts like real paper, bowing slightly, with the raking light from the window sliding across its glossy surface and the soft shadow underneath growing and moving away. Click and it turns over on a spring to show the back: the watermark of the paper, the lab stamp and a pencil note that writes itself.

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>
<!--
  "Turning photo print" 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>Ashby &amp; Co. Print Room, Low Tide at Harlow Bay</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/caveat@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- a photographic print lying on a table in a made-up print shop. Hover and it lifts like real paper, bowing a
       little, with the raking light sliding across its glossy surface and the soft shadow underneath growing; click and
       it turns over to show the back, with the lab stamp and a note in pencil. -->
  <main class="stage">
    <p class="bottega"><span>Ashby &amp; Co.</span> Print Room</p>

    <div class="tavolo" data-tavolo>
      <div class="ombra ombra--morbida" data-ombra-morbida></div>
      <div class="ombra ombra--contatto" data-ombra-contatto></div>
      <div class="stampa" data-stampa tabindex="0" role="button" aria-label="Low Tide at Harlow Bay. Turn the print over" aria-pressed="false">
        <div class="carta" data-carta>
          <div class="fronte" data-fronte></div>
          <div class="retro" data-retro>
            <svg class="retro__carta" viewBox="0 0 500 400" preserveAspectRatio="none" aria-hidden="true">
              <defs>
                <filter id="fibre" x="0" y="0" width="100%" height="100%">
                  <feTurbulence type="fractalNoise" baseFrequency=".9 .06" numOctaves="2" seed="7" />
                  <feColorMatrix values="0 0 0 0 .42  0 0 0 0 .38  0 0 0 0 .32  0 0 0 .09 0" />
                </filter>
                <filter id="inchiostro" x="-10%" y="-10%" width="120%" height="120%">
                  <feTurbulence type="fractalNoise" baseFrequency="1.4" numOctaves="2" seed="3" result="n" />
                  <feColorMatrix in="n" values="0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 -2.2 1.55" result="buchi" />
                  <feComposite in="SourceGraphic" in2="buchi" operator="in" />
                </filter>
                <path id="giroTimbro" d="M 0 -38 A 38 38 0 1 1 -0.1 -38" />
              </defs>
              <rect width="500" height="400" fill="#f6f2ea" />
              <rect width="500" height="400" filter="url(#fibre)" />
              <!-- the printed watermark of the photo paper, very faint, like the back of a real baryta print -->
              <g class="filigrana" font-size="9" letter-spacing="3" fill="#a59d90" fill-opacity=".15" transform="rotate(-18 250 200)">
                <text x="-60" y="40">ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA</text>
                <text x="-20" y="120">ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA</text>
                <text x="-90" y="200">ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA</text>
                <text x="-40" y="280">ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA</text>
                <text x="-100" y="360">ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA</text>
                <text x="-60" y="440">ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA · ASHBY BARYTA</text>
              </g>
              <!-- the lab stamp, pressed a little crooked, with the ink thinner in places -->
              <g class="timbro" data-timbro transform="translate(372 118) rotate(-9)" filter="url(#inchiostro)">
                <circle r="47" fill="none" stroke="#35557a" stroke-width="2.4" />
                <circle r="30" fill="none" stroke="#35557a" stroke-width="1" />
                <text font-size="8.8" letter-spacing="1.2" fill="#35557a" font-weight="600">
                  <textPath href="#giroTimbro" textLength="226" lengthAdjust="spacing">ASHBY &amp; CO · PRINT ROOM · LONDON ·</textPath>
                </text>
                <text y="-4" text-anchor="middle" font-size="8" letter-spacing="1.5" fill="#35557a" font-weight="600">EDITION</text>
                <text y="12" text-anchor="middle" font-size="15" fill="#35557a" font-weight="700">7/25</text>
              </g>
            </svg>
            <div class="nota" data-nota>
              <p class="nota__riga" data-riga>Harlow Bay, low tide, 6:40 am.</p>
              <p class="nota__riga" data-riga>For the window, not the drawer.</p>
              <p class="nota__firma" data-riga>M.A.</p>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="didascalia">
      <p class="didascalia__titolo">Low Tide at Harlow Bay</p>
      <p class="didascalia__dati">Giclée on baryta paper · 40 × 30 cm · <span class="prezzo">£85</span></p>
      <p class="didascalia__aiuto" aria-hidden="true">Hover to lift, click to turn over</p>
    </div>

    <svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true">
      <path d="M5 3.2v15.6l4.1-3.9 2.7 6.2 2.6-1.1-2.7-6.1 5.7-.3z" fill="#18181b" stroke="#fff" stroke-width="1.4" stroke-linejoin="round" />
    </svg>
  </main>

  <!-- the photograph itself: a real photo of a beach at low tide, laid on the paper once and cut into strips so the
       paper can bow -->
  <img class="sorgente" data-foto src="bassa-marea.webp" width="960" height="640" alt="" aria-hidden="true">

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

31 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 “Turning photo print” 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 light table, with the light of a window coming from the left, lies a print by Ashby & Co., a made-up print shop: «Low Tide at Harlow Bay», a real photograph of a beach at low tide at dawn: the pink and violet sky with its clouds lit from below, the low line of the hills on the horizon, the dark wet sand with a trickle of water running across it, the pools left by the tide holding the pink of the sky and the black stones scattered around, with a light vignette; around it the white border of the paper, wider at the bottom. Below are the title, the paper, the size and the price. Hover and the print comes off the table: it rises a few dozen pixels, the side near the pointer lifts more and the paper bows slightly, its edges coming towards you like a real glossy print. Each strip of the photo takes its light from the window according to how it is turned, so the curve reads as paper and not as a flat card, and a glare slides across the glossy part with the pointer. Underneath, the tight shadow where the paper touched the table disappears and the soft shadow grows, blurs and moves away from the window. Take the pointer away and the print comes back down on a spring, settling by one pixel. Click and it turns over: it rises higher while it turns, the paper flexes, edge-on its shadow becomes a thin line, and it lands face down with a small bounce. On the back there is the raw paper with its fibres, the faint printed watermark «ASHBY BARYTA», the round blue lab stamp, a little crooked and with the ink lighter in places, with the edition 7/25, and a pencil note that writes itself line by line the first time. Another click turns it back. If nobody touches it, a drawn pointer plays with it by itself.

How it works

One photo, twenty-two strips

The photo is a real webp file. The front is made of 22 vertical strips with overflow: hidden: each has the white of the paper as its background and inside it the same photo, as big as the image of the print and moved left by as much as the strip is far from the edge, so together they make one print and the paper can bow without WebGL.

The bow of the paper

Each strip sits on a parabola: translateZ grows with the square of the distance from the centre and rotateY follows the slope of the curve. As the print rises the curve deepens, as it lands it goes flat again.

Light for every strip

For each strip the normal is computed (the tilt of the print plus that of the strip) and its dot product with the direction of the window: strips turned to the light get brighter, the others darker, and the glossy glare is a power of the dot product with the vector halfway between light and eye.

Springs and shadows

Height, tilts and bow follow the pointer with a spring written in the GSAP ticker, with a hint of overshoot. The contact shadow disappears in the first pixels, the soft one moves, blurs and widens with the height, and while the print turns it narrows with the cosine of the angle.

Values to change

NameFileDefaultWhat it changes
LIFTscript.js26How many pixels the print rises on hover.
TILTscript.js7The degrees the side near the pointer rises.
BENDscript.js1How much the paper bows when it lifts; 0 keeps it flat.
GLOSSscript.js0.7How strong the glossy glare on the photo is.
FLIP_TIMEscript.js1.15The seconds the print takes to turn over.
SPRINGscript.js180The stiffness of the height and tilt spring: higher is snappier.

Try them in the Playground

When to use it

For a photographer’s or print shop’s online store, the page of a limited-edition print, a landscape photographer’s portfolio, an art gallery or a stationery shop: whenever a photo should feel like an object to hold and not an image on a screen.

On phones

The same animation with adapted sizes: the print is sized on the width and height of the screen; with a finger it lifts where you touch and a tap turns it over.

With reduced motion

No lift, bow or rotation: on hover the shadow darkens slightly, and on click the back fades in in place of the front, with the note already written.

Pitfalls

  • Do not compose the print on a canvas and then turn it into an image: in the viewer the demo runs in a separate origin and toBlob fails («tainted canvas»). Better the same photo in CSS inside each strip, moved in pixels.
  • The strips overlap by almost a pixel, otherwise with the bow a thread of the background shows between them.
  • Front and back need backface-visibility: hidden on every strip, not just on the container, because each strip is a 3D plane of its own.
  • The strip sizes and the position of the photo inside each one are in pixels: they are recalculated on resize, or the photo goes out of step. The photo is also in a hidden img in the HTML, so it arrives with the page load and the print does not start blank.

Libraries

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

Compressed with gzip, the three demo files weigh 7.9 KB; the libraries: GSAP 28 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