Skip to content
animorio
IT
Back to the library

Photo circle transition

Transitions, ImagesGSAPAdvancedCompressed weight: Demo 8.4 KBGSAP 28 KBFreeDownload the zip

The page change of a photographer’s site, in the style of product components: from Work, with one big photograph in the middle, to Index, where twelve thumbnails turn slowly on a circle: twelve real landscapes, from the salt flat to the lake in the mist. The big photo shrinks into its place while the others fly in from the edges on curved paths; click a thumbnail and the circle opens, it flies back to the middle and the title and year rise in.

The code

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 circle transition" 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>Aldermoor, photographs</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>
  <!-- the site of an invented photographer with two pages: Work (one big photograph) and Index (twelve thumbnails
       on a slowly turning circle). Going to Index the big photo shrinks into its place on the circle while the
       others fly in on curves; clicking a thumbnail opens the circle and flies it back to the middle -->
  <main class="palco" data-palco>
    <header class="testa">
      <a class="marchio" href="#" data-marchio>Aldermoor</a>
      <nav class="nav" aria-label="Pages">
        <span class="nav__pillola" data-pillola aria-hidden="true"></span>
        <button class="nav__voce" type="button" data-vai="work" aria-current="page">Work</button>
        <button class="nav__voce" type="button" data-vai="index">Index</button>
      </nav>
    </header>

    <section class="pagina pagina--work" data-work aria-label="Work">
      <div class="cornice" data-cornice aria-hidden="true"></div>
      <div class="didascalia" data-didascalia>
        <h1 class="didascalia__titolo"><span class="riga"><span class="riga__in" data-titolo>Salt Flats</span></span></h1>
        <p class="didascalia__sotto"><span class="riga"><span class="riga__in" data-sotto>Series, 2024</span></span></p>
      </div>
      <button class="avanti" type="button" data-avanti>
        <span>Next series</span>
        <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9M8.5 4.5 12 8l-3.5 3.5" /></svg>
      </button>
    </section>

    <section class="pagina pagina--index" data-index aria-label="Index" hidden>
      <div class="centro" data-centro>
        <p class="centro__occhiello">Index</p>
        <p class="centro__nome" data-centro-nome>Twelve series</p>
        <p class="centro__anno" data-centro-anno>2019 to 2026</p>
      </div>
    </section>

    <div class="foto-strato" data-strato></div>

    <svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true">
      <path d="M5 3.5v15.2l4.1-3.9 2.7 6.2 2.6-1.1-2.7-6.1 5.7-.3z" />
    </svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

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.

22 values to change

Or ask your AI assistant for it

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 circle transition” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a cream background is the site of an invented photographer, Aldermoor, with two pages and at the top a pill with Work and Index, where a dark pill slides under the active page with a small bounce. Work has one big photograph in the middle, a real landscape (the salt flat under the sky, low tide at sunset, the chalk cliff, blue ridges in the fog, the glasshouse, the dune, the harbour in the fog, the orchard in blossom, the red earth, the moorland, the lake, trees covered in frost), below it the series name and the year, and bottom right «Next series». Next series brings the new photo up from the bottom, uncovering it, while the old one steps back slightly and the title changes, sliding. Going to Index the big photo shrinks into its place on a circle, while the other eleven fly in from outside the screen on curved paths, nearest first, turning a little; once landed each one settles by a pixel and the circle starts turning slowly. In the middle «Index» and «Twelve series». Hovering a thumbnail makes it grow on a spring, the others fade and its name and year appear in the middle. Click it and the circle opens: the others fly away to the edges, it grows and flies back to the middle until it becomes the big photo, then title and year rise from below a line and the photo settles. A drawn pointer takes the tour by itself: the next series, Index, two thumbnails looked at, one chosen.

How it works

One layer for the photos

The twelve photos are not inside the pages but in a layer above, shared by both: each photo is an element placed with x, y, width and height. Work and Index are just two ways of placing them: one big in the middle, or twelve small on the circle. That is why a photo can travel from one page to the other.

The places on the circle

A thumbnail’s place is an angle: the circle’s rotation plus its twelfth of a turn. Radius and thumbnail size are computed together from the window, so everything fits even on a phone; a GSAP ticker moves the rotation forward while nobody is choosing.

Curved paths

Every flight is a quadratic Bézier curve: from the start to the end point, with the middle point pushed sideways (CURVA). A tween takes a variable from 0 to 1 and every frame the photo sits on the curve, changing width and height at the same time.

Who arrives first

Going to Index the thumbnails start outside the screen, in the direction of their place, and arrive in order of distance from the big photo: the circle closes around it. Going back to Work they do the opposite, the farthest leaving first.

The title under the line

Title and year sit inside a line with hidden overflow: they leave upwards and come back from below with power4.out. The new photo of Next series is uncovered with clip-path, from inset(100% 0 0 0) to inset(0), while it shrinks from 1.06 to 1.

Real photos

Each series is a real CC0 photograph in webp, in the demo folder, set as the background of its photo with background-size cover: the same image fills the tall big frame and the thumbnail without stretching. The photos are landscape and the frame is 4 by 5: where the subject is off centre (the moorland tree, the lake pines, the cliff) the series has its own point, which becomes background-position. A hairline of light on the edge keeps the pale photos apart from the cream background.

Values to change

NameFileDefaultWhat it changes
VOLOscript.js0.95How long a photo’s flight between the two pages lasts, in seconds.
SFALSAscript.js0.045The delay between one thumbnail and the next arriving or leaving, in seconds.
CURVAscript.js0.42How much the paths bend (0 = straight).
GIROscript.js48How many seconds the circle takes for a full turn.
RAGGIOscript.js0.94How wide the circle is compared to the space available.
SOSTAscript.js2.2How long the automatic tour stops on each page, in seconds.

Try them in the Playground

When to use it

For the portfolio of a photographer, an illustrator or a studio, for an art gallery or a picture magazine: the passage between the page of one work and the index of all works, which shows where each photo sits among the others.

On phones

The same animation with adapted sizes: the big photo and the circle are measured on the height too, the radius shrinks until the thumbnails fit in the box, and tapping a thumbnail goes straight back to Work.

With reduced motion

No flights and no rotation: the two pages swap with a cross fade, the circle stays still and Next series changes the photo with a fade.

Pitfalls

  • The photos must live in a layer shared by both pages: inside a page hidden with display none they can be neither measured nor flown.
  • While a transition runs the circle does not turn, or the landing places would run away; and a window resize halfway through is redone at the end (daRifare).
  • Radius and thumbnails are computed together: R times (1 plus half a thumbnail) must fit in half the space, or the top and bottom thumbnails leave the phone box.
  • The automatic tour uses gsap.delayedCall and GSAP tweens, never setTimeout, so the preview bench can drive it.
  • The photos are backgrounds of flying elements, not img: with background-size cover the crop follows the size every frame. Hidden photos sit at opacity 0, not display none, so the browser has already downloaded them when they leave.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.4 KB; the libraries: GSAP 28 KB.

Testing

Tested on 9 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All animations