Skip to content
animorio
IT
Back to the library

Blinds over images

Images open like window blinds: slats in the page colour pull back in a scattered order while the photo zooms out.

Images, ScrollGSAPEasyLifetime

Scroll inside the preview

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

When an image enters the screen, the slats covering it pull back upwards one at a time in a scattered order, while the image eases from close-up to normal. The slats are not all equal and their number depends on the image width, so a grid of photos never opens the same way twice.

How it works

Slats built by the script

For each frame the script adds a .persiane layer with two to five flex spans; the last has flex 2. The colour is the page colour, so each slat looks like a piece of the page moving away.

Scattered order

stagger with from: 'random' starts the slats in a different order every time.

The zoom underneath

In the same timeline the image goes from scale 1.3 to 1 with expo.out, a little slower than the slats: the eye sees the opening first, then the settling.

Replays when scrolling back

toggleActions 'play none none reset' closes it again when you scroll back above; to open it only once, use once: true.

Values to change

NameFileDefaultWhat it changes
STECCAscript.js170Approximate slat width: the number of slats comes from the photo width.
MIN / MAXscript.js2 / 5Minimum and maximum number of slats.
ZOOMscript.js1.3How close the image starts. 1 removes the zoom.
--sfondostyle.css#eef3efIt must match the page colour behind the images.

When to use it

Project grids, galleries, article covers. With many images in a row keep the delay between them short.

On phones

One column; narrower images get fewer slats, so the opening stays readable.

With reduced motion

No slats and no zoom: images are visible right away.

Pitfalls

  • The slat colour must match the real background, even in dark sections, or you see rectangles before the animation.
  • With images in position: absolute and object-fit: cover inside a box with aspect-ratio, Safari on iPhone does not distort them.
  • The margin-right: -1px on the slats covers the half-pixel gaps between them.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Mona Sans (font variabile) 5.3.0.

Weight: 6.2 KB of our own files.

Testing

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