Skip to content
animorio
IT
Back to the library

The title that rises from a line

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

Transitions, Text, ImagesGSAPMediumLifetime

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN.

The code for this animation is part of lifetime access.

The preview stays open: watch it, slow it down, try it on your phone.

Lifetime access

What it does

On load the screen is dark and there is only a small window in the middle. Inside it frames drop one after another, each covering the previous one, like slides in a projector; four captions rise at the sides. The last frame 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 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.

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

Pitfalls

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

Weight: 21 KB of our own files.

Testing

Tested on 27 September 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