
Stacking certificates
Hover, Images
A hover effect for an image gallery, in the minimal style: four square prints in stone tones. When the pointer comes into a photo, its colour take slides in from the very side the pointer came from, on a short spring that goes one pixel past and settles, and pushes the plain print a little ahead of it; when the pointer leaves, the take slides out through the side it leaves by and the plain print follows it back. Crossing the grid, the photos take their colour one after another in the direction of the gesture.
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>
<!--
"Pointer-side gallery" 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 prints that slide in from the pointer's side</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">
<!-- four square prints; the script draws them and slides the colour take in from the side the pointer comes from -->
<div class="griglia" data-grid aria-label="Fenwick Prints, four colour studies"></div>
<!-- the small caption under the prints -->
<p class="didascalia">
<span>Fenwick Prints</span>
<span data-caption>Four colour studies</span>
</p>
</div>
</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.
21 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 “Pointer-side gallery” from Animorio and fit it into my siteFor every photo the script compares the pointer’s previous point with the centre of the cell, divided by half its width and half its height: the longer axis wins and its sign gives the side. On the way out the same sum with the current point gives the side it leaves by.
The colour take keeps its position in shares of the photo: 0 is in place, 1 is one photo away. A spring (stiffness 360, damping 33) chases it in four small steps per frame; every draw multiplies the share by the cell width, so it holds up on resize too.
While the colour take comes in, the plain print moves a quarter ahead in the same direction. If the take leaves while it covers everything, the plain print hides on the side opposite the way out, so it follows the take into place instead of going back the way it came.
The arrow on the title is turned only once, when the take comes in from outside; the width (Mona Sans wdth) and the weight follow the square of how much of the photo is covered, so they widen mostly at the end, while it settles.
The mouse, the finger and the invisible pointer all go through the same function, which finds the photo under the point. The invisible pointer is a point in shares of the grid that a GSAP timeline walks around; the real mouse stops it and it comes back a few seconds after the mouse leaves the grid.
| Name | File | Default | What it changes |
|---|---|---|---|
STIFFNESS | script.js | 360 | How hard the spring pulls the colour take into place. |
DAMPING | script.js | 33 | How quickly it calms down: lower bounces more, 33 is one pixel past and back. |
PUSH | script.js | 0.24 | How far the plain print is pushed ahead, as a share of the photo. |
PRESS | script.js | 0.965 | How much a pressed photo sinks (1 = not at all). |
SPEED | script.js | 1 | The speed of the invisible pointer: 2 = twice as fast, 0.5 = half. |
AUTOPLAY | script.js | true | When nobody touches, an invisible pointer crosses the photos. |
IDLE | script.js | 2.6 | Seconds without the real pointer before the invisible one comes back. |
For the gallery of a portfolio, a design studio or a print shop, for product previews in a shop with a colour version or a second photo, for the rooms of a hotel: whenever a photo has another face to show on hover.
The same animation with adapted sizes: the four photos are as big as the box allows, in width and height. With a finger, the photo you tap takes its colour from the side nearest the finger, and dragging moves the colour from photo to photo; tapping outside the grid turns it plain again.
No sliding: the colour take appears and disappears with a fade, and the photos arrive with a fade only.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.7 KB; the libraries: GSAP 28 KB.
Tested on 31 October 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.