Skip to content
animorio
IT
Back to the library

Shape train gallery

Images, TransitionsGSAP, CanvasMediumCompressed weight: Demo 9.1 KBGSAP 28 KBFreeDownload the zip

The opening of Slowform Retreat, a made-up three day retreat for people who draw typefaces and interfaces: three photo frames on a staircase and a hairline bar that fills in six seconds. When it is full a train of five colour blocks crosses every frame on its diagonal, from the bottom right corner to the top left, and the last car is the next photo; the captions change under a sliding orange block. Inspired by the Chande Bootcamp 2026 site.

Rebuilt from scratch studying chandebootcamp.com by Lumen Studio, Kaixa: the idea is theirs; code, copy and images are ours. Read how it’s made

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>
<!--
  "Shape train 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>Slowform Retreat, the shape train gallery</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/index.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the opening of Slowform Retreat, a made-up three day retreat for people who draw typefaces and interfaces, in a
       made-up valley. Three photo frames stand on a staircase; a hairline bar fills in six seconds and, when it is full,
       a train of five colour blocks crosses every frame on its diagonal, from the bottom right corner to the top left,
       and the last car of the train is the next photo. The frames change from the lowest to the highest, the captions
       change under a sliding colour block, then the bar draws back. Hover a frame to hold the bar, click or press the
       right arrow to move on -->
  <main class="palco" data-palco>
    <header class="testa">
      <p class="marca" data-entra>
        <svg viewBox="0 0 20 20" aria-hidden="true"><rect x="2.5" y="3" width="15" height="6" rx="3" /><rect x="2.5" y="11" width="9" height="6" rx="3" /></svg>
        <span>Slowform Retreat</span>
      </p>
      <p class="luogo" data-entra><span>Orsa Valley</span><span class="luogo__date">14&#8211;16 May</span></p>
    </header>

    <section class="scala" data-scala aria-label="Moments from the retreat" aria-live="polite">
      <figure class="riquadro" data-riquadro>
        <div class="riquadro__su" data-su>
          <div class="riquadro__foto" data-foto>
            <img src="lago.webp" alt="A bench on a wooden dock over a misty lake at sunrise" width="900" height="600" draggable="false">
            <span class="riquadro__grana" aria-hidden="true"></span>
          </div>
          <figcaption class="didascalia" data-didascalia>
            <span class="didascalia__testo" data-testo><span class="didascalia__nome">The lake at six</span><span class="didascalia__ora">06:10</span></span>
            <span class="didascalia__blocco" aria-hidden="true" data-blocco></span>
          </figcaption>
        </div>
      </figure>
      <figure class="riquadro" data-riquadro>
        <div class="riquadro__su" data-su>
          <div class="riquadro__foto" data-foto>
            <img src="caratteri.webp" alt="Wooden letterpress type piled in a tray" width="900" height="600" draggable="false">
            <span class="riquadro__grana" aria-hidden="true"></span>
          </div>
          <figcaption class="didascalia" data-didascalia>
            <span class="didascalia__testo" data-testo><span class="didascalia__nome">Type lab</span><span class="didascalia__ora">10:30</span></span>
            <span class="didascalia__blocco" aria-hidden="true" data-blocco></span>
          </figcaption>
        </div>
      </figure>
      <figure class="riquadro" data-riquadro>
        <div class="riquadro__su" data-su>
          <div class="riquadro__foto" data-foto>
            <img src="argilla.webp" alt="Hands shaping clay on a pottery wheel" width="900" height="600" draggable="false">
            <span class="riquadro__grana" aria-hidden="true"></span>
          </div>
          <figcaption class="didascalia" data-didascalia>
            <span class="didascalia__testo" data-testo><span class="didascalia__nome">Clay hour</span><span class="didascalia__ora">16:00</span></span>
            <span class="didascalia__blocco" aria-hidden="true" data-blocco></span>
          </figcaption>
        </div>
      </figure>
    </section>

    <footer class="piede" data-entra>
      <p class="giorno" data-didascalia><span class="giorno__testo" data-testo>Day one</span><span class="didascalia__blocco" aria-hidden="true" data-blocco></span></p>
      <div class="barra" role="progressbar" aria-label="Time to the next photos" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" data-barra>
        <span class="barra__pieno" data-pieno></span>
      </div>
      <button class="avanti" type="button" aria-label="Next photos" data-avanti>
        <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.2" /><path d="M8.6 4.2 12.4 8l-3.8 3.8" /></svg>
      </button>
    </footer>
  </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.

26 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Shape train gallery” 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

The opening of Slowform Retreat, a made-up three day retreat in the Orsa Valley, from 14 to 16 May, for people who draw typefaces and interfaces. At the top the two pill mark and the place with the dates; in the middle three 4:5 photo frames on a staircase, each half a frame lower than the one before, with a light caption under each with the name of the moment and its time («The lake at six» 06:10, «Type lab» 10:30, «Clay hour» 16:00). Below, the day («Day one»), a thin sand coloured bar and the round button to move on. On arrival the photos open from below and the captions from the left. The bar fills with orange in six seconds; when it is full the photos change from the lowest frame to the highest, 240 milliseconds apart: five blocks, orange, paper, stone, sand and ink, cross the frame on its diagonal like a train, each one stuck to the far corner, and the last car is the new photo, growing from the corner to its full size. When the first block covers the photo, the caption changes under an orange block that comes in from the left, rests a moment and leaves on the right; the day does the same. Then the bar draws back to the right and starts again: three days, nine real photos (the lake at dawn, the wooden type, the pottery wheel, the cabin, the sketchbook, the coffee, the path of leaves, the ridge, the type cases), then it begins again. Over the photos a light film with moving grain; over a frame the frame lifts, its shadow grows and the bar holds; a click, the round button or the right arrow move on at once.

How it works

Frames measured on both sides

A frame’s width is one variable, min(26vw, 24vh): so the staircase of three 4:5 frames, two frames tall plus the caption, fits a computer screen, the Playground and the phone box. The second frame drops half a frame, the third a whole one.

The bar and the round

A GSAP tween takes the bar from scaleX 0 to 1 in CYCLE milliseconds, linear; at the end the change starts, and when the change is done the bar draws back to the right in RETRACT milliseconds with cubic-bezier(0.76, 0, 0.24, 1) and starts again. With the pointer over a frame the bar tween pauses.

The shape train

For each frame a canvas lies over the photo. The head of the train runs from −1 to 1 + 0.5 on one power3.inOut curve; car k sits at head − 0.1·k, and the new photo is the last. The duration is CAR_DURATION / TRAIN_SPEED times (1 + tail) / 2: 790 / 0.4 · 1.5 / 2 ≈ 1481 milliseconds. The direction is the frame’s diagonal, from bottom right to top left.

Corner blocks

Every car is a rectangle that stays stuck to the far corner and stretches only the near one: so between two layers no gap ever opens at the opposite corners. The new photo is drawn inside the part already open, scaled to cover it, and arrives at scale 1: when the canvas goes, the real photo is identical and nothing jumps.

Captions under the block

When the first car covers the frame, an orange block grows from the left in 320 milliseconds, stays 90 while the words change, and leaves on the right in 380, with cubic-bezier(0.86, 0, 0.07, 1). The caption is a grid with minmax(0, 1fr): a longer label never widens the cell.

The film and the details

Photo and canvas share the same light filter (contrast, saturation, a touch of sepia); above them a 128 pixel grain moves twelve times a second, with a light hairline on the edge and three soft shadows; the frame lifts 4 pixels on hover. All the time runs through GSAP, so the preview bench can stop and resume it.

Values to change

NameFileDefaultWhat it changes
CYCLEscript.js6000The milliseconds the bar takes to fill before the change (the site uses 6000).
STAGGERscript.js240The milliseconds between one frame and the next, from the lowest to the highest (the site uses 240).
RETRACTscript.js750The milliseconds the bar takes to draw back after the change (the site uses 750).
CAR_DURATIONscript.js790The milliseconds of one car of the train before the speed (the site uses 790).
TRAIN_SPEEDscript.js0.4The speed of the train: with five cars, 790 / 0.4 gives a crossing of about 1481 milliseconds (the site uses 0.4).
CAR_GAPscript.js0.1The gap between two cars, as a share of the path of one car (the site uses 0.1).
CAPTION_INscript.js320The milliseconds the colour block takes to cover a caption (the site uses 320).
CAPTION_HOLDscript.js90The milliseconds the block stays while the words change (the site uses 90).
CAPTION_OUTscript.js380The milliseconds the block takes to leave on the right (the site uses 380).
GRAINscript.js0.12The strength of the film grain over the photos.

Try them in the Playground

When to use it

For the opening of an event, a retreat, a workshop or a school, for the page of a place or a studio: when there are many photos to show without showing them all at once, and the change itself should feel part of the brand.

On phones

On a phone the three frames stay on their staircase, smaller: their size is taken from the shorter of width and height, so the whole staircase, with captions, day and bar, fits the box. The train is the same, with its timing; the bar does not hold on touch (a tap moves on), only under a computer pointer.

With reduced motion

No train and no entrance: the photos are already in place and every six seconds they pass to the next ones with a 0.6 second fade, the captions and the day with a fade; the bar stays still and the grain does not move.

Pitfalls

  • The train is one curve: splitting the run and the tail makes the cars stop halfway, as the site’s code warns.
  • A car sliding whole along the diagonal leaves two gaps at the opposite corners: each car must stay stuck to the far corner and stretch only the near one.
  • The new photo must arrive at scale 1 with the same cover as the real image, or removing the canvas shows a jump.
  • The canvas is measured on every frame: if the window changes mid train, the canvas is rebuilt at the new size.
  • The caption is nowrap: with a minmax(0, 1fr) grid a long label cannot widen the cell and move the centre.
  • Never setTimeout for the timing: with GSAP the whole round stops and resumes with the preview bench.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.

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

Testing

Tested on 30 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