Skip to content
animorio
IT
Back to the library

Title rising from a line

Transitions, Text, ImagesGSAPMediumCompressed weight: Demo 5.3 KBGSAP 28 KBFreeDownload the zip

A small window flips through ten racing photos like a projector, then bursts to full screen while the title, squashed until it looks like a line, stands up to its full height.

Rebuilt from scratch studying lemansclassic.richardmille.com by Magnetism: 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>
<!--
  "Title rising from a line" 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 title that rises from a line</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="apertura" aria-label="Off track, a story told in pictures">
    <!-- la finestrella: all'inizio un rettangolo al centro dove i fotogrammi (dieci foto vere CC0, in bianco e nero col CSS) scorrono come in un proiettore -->
    <div class="finestra" aria-hidden="true">
      <div class="fotogramma"><img src="tribuna.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="fotogramma"><img src="gomma.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="fotogramma"><img src="casco.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="fotogramma"><img src="curva.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="fotogramma"><img src="notte.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="fotogramma"><img src="pioggia.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="fotogramma"><img src="volante.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="fotogramma"><img src="semaforo.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="fotogramma"><img src="bandiera.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="fotogramma"><img src="faro.webp" alt="" decoding="async" width="1024" height="683"></div>
      <div class="velo"></div>
    </div>

    <!-- le didascalie: prima accanto alla finestrella, poi si separano e incorniciano il titolo -->
    <p class="didascalia didascalia--su didascalia--sx"><span>A story told in pictures</span></p>
    <p class="didascalia didascalia--giu didascalia--sx"><span>of all that happens off the track</span></p>
    <p class="didascalia didascalia--su didascalia--dx"><span>Twenty-four hours of racing</span></p>
    <p class="didascalia didascalia--giu didascalia--dx"><span>seen from the pit wall</span></p>

    <h1 class="titolo"><span class="titolo__dentro"><span class="titolo__riga">Off</span> <span class="titolo__riga">track</span></span></h1>

    <button type="button" class="rivedi" hidden>Replay the opening</button>
  </main>

  <div class="grana" aria-hidden="true"></div>

  <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.

18 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 “Title rising from a line” 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 load the screen is dark and there is only a small window in the middle. Inside it ten black and white photos drop one after another, each covering the previous one, like slides in a projector: the empty grandstand above the kerb, a worn tyre, a rider among sparks, a motorbike leaning between the kerbs, the grandstand at night with a car passing as a streak, the wet road, the steering wheel behind the roll cage, the red light, the chequered flag and a round headlight; four captions rise at the sides. The last photo grows past the edges of the screen while the window itself opens, so the picture grows inside a frame that widens. Then a yellow line appears: it is the squashed title, which stands up to its full height while the captions move apart to frame it above and below. A quick burst of frames behind the letters closes it.

How it works

The photos

The frames are ten real CC0 photos, img elements with object-fit: cover inside each box, so the same photo fills the small window and then the whole screen. They are in colour: filter grayscale(1) and a touch of contrast turn them black and white, and the yellow of the title stays the only colour. The sequence starts only when they are all decoded (img.decode() together with document.fonts.ready).

The projector

The frames are stacked in the middle, all with clip-path inset(0 0 100% 0). A single tween takes them to inset(0) with a stagger equal to the duration: when one has finished dropping, the next one starts. In the stagger's onComplete callback the one underneath is hidden, so only one image is ever lit.

The window that opens

Everything sits in a full-screen container cut with clip-path. The last frame animates width and height up to 120% of the screen (expo.inOut) and, 0.3 seconds later, the container's cut goes to inset(0) (circ.inOut). Two movements at once: the image grows inside a frame that is opening.

The title from the line

The title fills the width: the script measures it at 100px and scales it. It starts at scaleY 0.012, so it looks like a line, and goes to 1 in half a second with circ.inOut. The captions are anchored to the midline and move by calc(var(--apri) * var(--meta)): --meta is half the title in pixels, --apri goes from 0 to 1 together with the title.

The burst

At the end every frame goes full screen and they light up one at a time with visibility sets 0.12 seconds apart, under a dark veil that lowers the contrast. Then the last one stays, dimmed, behind the title.

Values to change

NameFileDefaultWhat it changes
SCATTOscript.js0.3Seconds between one frame and the next in the small window.
INGRANDIMENTOscript.js1.2How far the last frame grows past the screen when it bursts.
LAMPOscript.js0.12Seconds per frame in the final burst. With 0 there is no burst.
VELOscript.js0.5How much the photo under the title darkens, from 0 to 1.
ALTEZZA_MAXscript.js0.62The title never exceeds this fraction of the screen height, even if the width would allow it.

Try them in the Playground

When to use it

For the entrance of a site made of photographs: a reportage, an event, a collection. On the first visit only: the second time the title already in place is enough.

On phones

The small window shrinks, the title goes onto two lines and the captions get narrower; everything else is the same.

With reduced motion

No projector and no burst: the final scene appears straight away, with the title in place and the headlight photo dimmed.

Pitfalls

  • Wait for the photos to be decoded before starting the projector: each one is lit for 0.3 seconds and one that arrives late leaves a black frame.
  • A clip-path written with calc() does not animate well: compute the starting cut in pixels, then take it to inset(0px 0px 0px 0px).
  • Measure the title only after document.fonts.ready: with the fallback font the width is different and the title overflows the screen.
  • The burst is light changing ten times a second: keep it short, under a dark veil, and never with reduced motion.
  • At the end switch the sizes back to vw and vh: the pixels computed at the start do not follow the window when it is resized.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 9 November 2026

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

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