
Logo loader
Transitions, SVG, Text
A full-screen photo and, in front of it, a window showing one of its details up close, with a second close-up photo. Every now and then the window blinks: it closes into an almond and then a line, the scene changes, and it reopens on another detail. The photos are real (CC0, from StockSnap).
Rebuilt from scratch studying readingstones.com by : the idea is theirs; code, copy and images are ours. Read how it’s made
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>
<!--
"Blinking window" 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="it">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>La finestra che sbatte le palpebre</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="scena" data-scena>
<!-- lo sfondo: una foto per strato, una sola visibile alla volta -->
<svg class="sfondo" data-sfondo viewBox="0 0 1600 1000" preserveAspectRatio="xMidYMid slice" aria-hidden="true" focusable="false"></svg>
<p class="nota" data-nota>Ogni tanto la finestra sbatte le palpebre e si riapre su un’altra scena. Premila per farlo subito.</p>
<!-- la finestra: un dettaglio della scena in una foto ravvicinata, dentro un’apertura a mandorla -->
<button class="finestra" type="button" data-finestra data-autoclic aria-label="Cambia scena">
<span class="finestra__occhio" data-occhio>
<svg class="finestra__vista" data-vista viewBox="0 0 160 90" preserveAspectRatio="xMidYMid slice" aria-hidden="true" focusable="false"><use data-uso href="#" /></svg>
</span>
<span class="finestra__fessura" aria-hidden="true"></span>
<span class="finestra__angoli" aria-hidden="true"></span>
<span class="finestra__didascalia">
<span data-dettaglio></span>
<span class="finestra__luogo" data-luogo></span>
</span>
</button>
</main>
<!-- le foto, messe una volta sola: le usano lo sfondo e la finestra -->
<svg class="nascosto" aria-hidden="true" focusable="false"><defs data-scene></defs></svg>
<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.
8 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 “Blinking window” from Animorio and fit it into my siteThe photos sit once inside a defs as SVG images: for each scene the large one (1600 by 1000, preserveAspectRatio xMidYMid slice) and the close-up (160 by 90). The background uses the large one with a full-screen use, the window uses the close-up with another use inside an SVG whose viewBox is a little tighter, so it has room to drift. The photos are swapped in the SCENE table, with the webp files in the folder.
The opening is a clip-path: ellipse(80% calc(var(--palpebra) × 82%) at 50% 50%). With the variable at 1 the ellipse covers the corners too; going down to 0 it narrows only in height, and the rectangle becomes first an almond and then a line. GSAP animates the CSS variable, and the same variable lights the line of light and slightly squashes the content.
A repeating timeline: 2.4 seconds open, 0.9 to close with power3.inOut, a callback that changes the scene, 0.25 in the dark, 1.1 to reopen. The scene behind fades over 0.7 seconds exactly while the window is closed, so the change is never seen with the eye open.
While the window is open, the viewBox drifts by 8% of its width, like a moving shot, and the scene behind goes from scale 1 to 1.05. Pressing the window makes the timeline jump to the blink label, but only if the eyelid is open: if it is already blinking, it finishes.
| Name | File | Default | What it changes |
|---|---|---|---|
SCENE | script.js | 4 scene | For each scene: the place, the detail’s name, the detail’s 16:9 box and the function that draws it (SVG in 1600 × 1000). |
APERTA, CHIUDE, BUIO, APRE | script.js | 2.4, 0.9, 0.25, 1.1 | The seconds of the blink: eye open, closing, in the dark, reopening. |
ellipse(80% … 82%) | style.css | 80%, 82% | The eyelid’s shape: narrower in width, rounder the almond. |
To tell a place or a product through details: the overall view behind, the thing to look at in front, and a gesture that suggests a gaze. The photos are swapped in the SCENE table.
The window takes almost the full width; the background, cropped to the centre, still shows the four details, which all sit in the middle part of the scene.
No blink, no drift and no zoom: the window stays open and, when pressed, scene and detail move to the next with a quarter-second fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 4.1 KB; the libraries: GSAP 28 KB.
Tested on 7 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.