
Stacking certificates
Hover, Images
The focal point panel in the image library of an invented CMS, dark and premium like a Dribbble shot: over a real photo of dunes at sunset a reticle marks what matters in the picture. Dragged, it runs on a spring, the thirds appear and below it the three crops, square, 4:5 post and 3:1 banner, reframe themselves one after the other around the chosen point. Showing a crop, the photo darkens outside its window, which slides from one format to the next; Apply lights the three frames in turn.
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>
<!--
"Photo focal point" 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 focal point with the crops that follow it</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="stage">
<!-- the focal point panel of the media library of an invented CMS (Fieldnote). The photo, a real one: a
panorama of dunes at sunset. Drag the reticle to choose what matters in the photo: the three crops under it
(square, portrait, banner) reframe themselves around it, one after the other, each on its own spring -->
<div class="panel" data-panel>
<header class="panel__head">
<div class="panel__file">
<p class="panel__name">dune-crest.jpg</p>
<p class="panel__meta">5472 × 3078 <span class="panel__sep" aria-hidden="true"></span> 6.1 MB</p>
</div>
<span class="panel__chip">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 2.5v3M8 10.5v3M2.5 8h3M10.5 8h3"/><circle cx="8" cy="8" r="3.6"/></svg>
Focal point
</span>
</header>
<div class="view" data-view>
<img class="view__img" data-photo src="dune-crest.webp" alt="A panorama of sand dunes at sunset, with a low hazy sun over the horizon" decoding="async">
<span class="view__glow" data-glow aria-hidden="true"></span>
<span class="view__thirds" data-thirds aria-hidden="true"></span>
<span class="view__shade" data-shade aria-hidden="true"><span class="view__shade-tag" data-shadetag>1:1</span></span>
<span class="view__edge" aria-hidden="true"></span>
<span class="mark" data-mark role="slider" tabindex="0" aria-label="Focal point" aria-valuemin="0" aria-valuemax="100" aria-valuenow="50" aria-valuetext="50% across, 45% down">
<span class="mark__face" data-markface>
<svg viewBox="0 0 40 40" aria-hidden="true">
<circle class="mark__ring" cx="20" cy="20" r="11"/>
<path class="mark__ticks" d="M20 3.5v6M20 30.5v6M3.5 20h6M30.5 20h6"/>
<path class="mark__cross" d="M20 17.6v4.8M17.6 20h4.8"/>
</svg>
</span>
</span>
</div>
<div class="crops">
<figure class="crop" data-crop data-ratio="1" data-name="Square">
<div class="crop__frame"><img class="crop__img" data-img src="dune-crest.webp" alt=""></div>
<figcaption class="crop__cap"><span>Square</span><span class="crop__r">1:1</span></figcaption>
</figure>
<figure class="crop" data-crop data-ratio="0.8" data-name="Portrait">
<div class="crop__frame"><img class="crop__img" data-img src="dune-crest.webp" alt=""></div>
<figcaption class="crop__cap"><span>Post</span><span class="crop__r">4:5</span></figcaption>
</figure>
<figure class="crop crop--wide" data-crop data-ratio="3" data-name="Banner">
<div class="crop__frame"><img class="crop__img" data-img src="dune-crest.webp" alt=""></div>
<figcaption class="crop__cap"><span>Banner</span><span class="crop__r">3:1</span></figcaption>
</figure>
</div>
<footer class="panel__foot">
<p class="panel__pos">
<span class="panel__axis">X</span><span class="panel__num" data-x>50</span><span class="panel__pc">%</span>
<span class="panel__axis">Y</span><span class="panel__num" data-y>45</span><span class="panel__pc">%</span>
</p>
<button class="save" type="button" data-save>
<span class="save__face" data-face>
<svg class="save__icon" viewBox="0 0 16 16" aria-hidden="true">
<path class="save__check" data-check pathLength="1" d="M3.4 8.4l3 3 6.2-6.6"/>
</svg>
<span class="save__words" data-words>Apply to crops</span>
</span>
</button>
</footer>
</div>
<p class="sr" aria-live="polite" data-live></p>
</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.
35 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 “Photo focal point” from Animorio and fit it into my siteThe photo is a single file, dune-crest.webp, 1024 by 576 (16:9, the same shape as the view). In the view it is a full-frame image with object-fit: cover; in the three crops it is the same image, wide or tall enough to cover the frame and moved by hand with a transform. No canvas and no pixel read: the browser downloads it once and uses it four times, and the demo also works opened from the file.
Each crop is a frame with aspect-ratio holding the image just large enough to cover it (as tall as the frame if the format is narrower than the photo, as wide if it is wider). The offset puts the focal point in the middle and keeps it inside the edges: max(frame width minus image width, min(0, half the frame minus fx times the image width)).
The reticle chases the point on a spring integrated by hand (stiffness 210, damping 19, three steps per frame); each crop chases the reticle on a softer spring than the one before, multiplied by FOLLOW, so they reframe in a cascade. While it moves, a crop leans in a little around its focal point, in proportion to its speed.
The crop shown is a rectangle with a 1px white edge and a huge dark shadow all around it (a 200vmax box-shadow): outside darkens, inside stays lit. Its position and size have a spring of their own, so it slides from one format to the next passing the mark.
A looping GSAP timeline moves the point and calls hold, release, show and Apply. As soon as a hand touches the photo, a crop or the button, the timeline pauses and starts again after three quiet seconds, from where the hand left the reticle.
| Name | File | Default | What it changes |
|---|---|---|---|
STIFFNESS | script.js | 210 | The spring carrying the reticle: higher is quicker. |
DAMPING | script.js | 19 | Lower lets the reticle pass the mark and come back. |
FOLLOW | script.js | 0.62 | How much softer each crop is than the one before: 1 = all together. |
LEAN | script.js | 0.05 | How much a crop leans in while it moves. |
VEIL | script.js | 0.52 | How dark the photo gets outside the crop shown. |
GLOW | script.js | 1 | The soft light at the focal point. |
SPEED | script.js | 1 | 2 = the loop on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the loop. |
For the media manager of a CMS, a listings site or an online shop, for the photo editor of a social app or a portfolio: wherever a photo is uploaded once and the site has to crop it well in many formats.
The same animation with adapted sizes: the panel is as wide as the box allows and also shrinks with the height, the crops stay in one row and the reticle is dragged with a finger (the photo does not scroll the page while it is held).
No movement: the reticle fades out and back in at the new point, the crops are in place at once, the window on the photo and the button's label change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.1 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.