
Title rising from a line
Transitions, Text, Images
A minimal image animation with one gesture: taking a photo. A real photograph, an orange sunset with a low sun over the hills, drifts slightly like a camera held by hand; press the shutter and the disc sinks and springs back, a thin tomato-red stroke runs around the ring, the photo gives a little kick and flashes white, and a copy of that very moment shrinks into the bottom corner on a spring, tilting, gaining a white edge and a soft shadow, still bright from the flash. Then it slides away, as if saved.
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>
<!--
"Snap-to-corner photo" 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 photo that snaps into the corner</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>
<main class="scena" data-stage>
<div class="palco" data-palco>
<!-- the live view: one real photo, a sunset over the hills, drifting a little like a camera held by hand -->
<div class="mirino" data-frame>
<div class="mirino-kick" data-kick>
<div class="foto" data-photo>
<img data-scene src="tramonto.webp" alt="A warm sunset: a full sun low over layers of dark hills" width="960" height="640" decoding="async">
</div>
<!-- the flash of the shutter -->
<span class="lampo" data-flash aria-hidden="true"></span>
</div>
</div>
<!-- the mode of the camera; when a photo lands it reads Saved for a moment -->
<p class="modo" aria-live="polite"><span class="modo-riga" data-mode>Photo</span><span class="modo-riga modo-salvata" data-saved>Saved</span></p>
<!-- the shutter: a thin ring and a disc; a stroke runs around the ring while the photo is taken -->
<button class="scatto" data-shutter data-autoclic type="button" aria-label="Take a photo">
<svg class="scatto-anello" viewBox="0 0 60 60" aria-hidden="true">
<circle class="anello-fondo" cx="30" cy="30" r="28.5"/>
<circle class="anello-giro" data-ring cx="30" cy="30" r="28.5"/>
</svg>
<span class="scatto-disco" data-disc></span>
</button>
</div>
<!-- the thumbnails are added here by the script -->
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>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.
18 values to change
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 “Snap-to-corner photo” from Animorio and fit it into my siteThe photo is a real image (tramonto.webp, 960 by 640) inside a 5 by 4 frame with overflow hidden, with object-fit cover and a little bigger than the frame, so the drift never shows its edge. A repeating GSAP tween runs a number from 0 to 1 in 15 seconds and every frame writes the image transform with gsap.set: xPercent and yPercent on a slow arc, a breathing scale and a one-pixel tremble made of two sines at different frequencies. On top, still, a film grain in SVG (feTurbulence) hides the banding of the sky.
On the shot the script clones the photo frame with cloneNode: since the movement lives in the transform written on the image, the copy is exactly that frame, grain included, with nothing redrawn. The copy loses its data-scene and its alt text, because it is a duplicate.
The copy starts on top of the photo, with sizes read from getBoundingClientRect, and goes to the corner animating left, top, width, height, padding and radius with a hand-written ease: a damped spring (ratio from 1 to 0.68 depending on BOUNCE) that passes the mark by a pixel. That way the white edge stays thin and is not blown up by a scale.
The flash is a white veil that rises in 45 milliseconds and falls in half a second; the photo shrinks to 0.986 and comes back with back.out; the shutter disc drops to 0.8; the stroke on the ring is a stroke-dashoffset going from 179 to 0. The copy starts at brightness 1.55 and comes back to 1 in a second, as if still dazzled. Right after the flash the live photo starts at brightness 0.86 and comes back to 1 in 0.9 seconds, like an eye adjusting.
A gsap.delayedCall shoots every 3.6 seconds; the thumbnail leaves after two seconds of rest with a step back and a slide to the left. A new shot sends the old thumbnail away at once; on resize the thumbnails go back to their corner.
| Name | File | Default | What it changes |
|---|---|---|---|
INTERVAL | script.js | 3.6 | Seconds between one shot and the next, when left alone. |
HOLD | script.js | 2 | Seconds the thumbnail rests in the corner. |
THUMB_SIZE | script.js | 0.27 | The width of the thumbnail, as a share of the photo. |
TILT | script.js | -2 | The tilt of the thumbnail, in degrees. |
FLASH | script.js | 0.85 | How white the flash gets, from 0 to 1. |
BOUNCE | script.js | 0.5 | How far the thumbnail passes the mark before it settles. |
DRIFT | script.js | 1 | How much the live photo drifts (0 = still). |
SPEED | script.js | 1 | 2 = twice as fast, 0.5 = half as fast. |
LOOP | script.js | true | Keep taking photos on its own. |
For a camera or photo editing app, for the page of a photographer or a studio, for an app’s screenshot tool, for a shop that saves a product photo or for a guest at an event taking a souvenir photo.
The same animation with adapted sizes: the photo is as big as the box allows, in width and height, and you shoot with a finger.
No flights, springs or drifting photo: on every shot a light flash and the thumbnail fading in already in its corner and fading out the same way.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.0 KB; the libraries: GSAP 28 KB.
Tested on 6 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.