
Blinds over images
Images, Scroll
Scroll inside the preview
A minimal image animation on scroll: a single real photo, blue ridges over still water at sunset, arrives soft and slightly too big, like a lens that is not set yet. Scrolling down turns the focus: the photo breathes back to its size and sharpens plane by plane, the water in front first, then the near hill and the ridges, the sky last. Underneath, a thin distance scale slides under an orange index to the right 5 metres; there it goes one pixel past and settles, the four corner marks close in and take the accent, and only then does the caption rise.
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>
<!--
"Focus pull 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 comes into focus on scroll</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>
<!-- one photograph and a long scroll: the stage stays still while the page scrolls under it, and the scroll turns
the focus of the lens. The same real photo is laid four times, each copy cut to one band (the sky, the far
ridges, the near hill, the water in front); every band has its own distance, so they sharpen one after the
other, the nearest first -->
<main class="corsa" data-run>
<div class="palco" data-stage>
<figure class="foto">
<div class="cornice" data-frame>
<div class="lente" data-lens role="img" aria-label="Layers of blue ridges over still water under a golden evening sky">
<img class="piano" data-plane="sky" src="ridge.webp" width="960" height="720" alt="" decoding="async">
<img class="piano" data-plane="far" src="ridge.webp" width="960" height="720" alt="" decoding="async">
<img class="piano" data-plane="mid" src="ridge.webp" width="960" height="720" alt="" decoding="async">
<img class="piano" data-plane="near" src="ridge.webp" width="960" height="720" alt="" decoding="async">
</div>
<!-- the four thin corner marks of the focus frame: they close in a pixel and take the accent when it is sharp -->
<span class="angolo angolo--a" data-corner></span>
<span class="angolo angolo--b" data-corner></span>
<span class="angolo angolo--c" data-corner></span>
<span class="angolo angolo--d" data-corner></span>
</div>
<!-- the distance scale of the lens: it slides under a fixed index until the right number -->
<div class="scala" data-scale aria-hidden="true">
<div class="scala__nastro" data-tape></div>
<span class="scala__indice" data-index></span>
</div>
<figcaption class="dida" data-caption>
<span class="dida__riga"><span class="dida__testo" data-cap-line>Third ridge, the last light</span></span>
<span class="dida__riga"><span class="dida__meta" data-cap-line data-cap-meta>5 m, f/8, 1/250 s</span></span>
</figcaption>
</figure>
<p class="nota" data-hint>Scroll to focus</p>
</div>
</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>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.
17 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 “Focus pull photo” from Animorio and fit it into my siteThe real photo is laid four times on top of itself, and each copy is cut to its band by a CSS mask: the whole sky at the back, the far ridges, the near hill, the water in front. Each band has its own distance, and its blur comes from how far it is from the focus (in 1/d, as in a real lens) minus a depth of field that keeps them all sharp once focused: so they sharpen one after the other with no hand-made timing.
On a lens barrel near numbers are wide apart and far ones close: here each number sits at the logarithm of its distance, and the focus travels from start to target in log too, so the tape slides evenly under the index.
The section is over three screens tall and the stage inside is sticky at 100lvh; a single ScrollTrigger gives the progress and Lenis softens it. The settling knock fires when you reach the end and resets below 98.5%.
The four copies of the photo are 12% bigger than the frame and the whole sky sits behind them all: with CSS blur the edges never fade into the background.
| Name | File | Default | What it changes |
|---|---|---|---|
TARGET | script.js | 5 | The distance the photo is sharp at, in metres: the scale stops there. |
START | script.js | 0.5 | The distance the lens starts from. |
BLUR | script.js | 0.03 | How soft it starts, compared with its width. |
START_SCALE | script.js | 1.06 | How much bigger it starts. |
FOCUS_END | script.js | 0.78 | How far down the page the focus is done. |
STAGGER | script.js | true | The planes sharpen one after the other, the nearest first. |
OVERSHOOT | script.js | 2 | How many pixels the scale goes past before settling. |
CAPTION | script.js | Third ridge, the last light | The caption that rises once it is sharp. |
SMOOTH | script.js | 0.09 | How soft the scroll is. |
For the opening photo of a photography portfolio, a long-form article or a travel page: a single picture that asks you to scroll to see it properly.
The same animation with adapted sizes: the photo is as large as the box allows, in width and height, and a tap makes the lens hunt again.
The photo appears already sharp with the scale on 5, orange corners and the caption, in a fade; scrolling moves nothing.
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.1 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.
Tested on 8 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.