Skip to content
animorio
IT
Back to the library

Fabric window transition

Transitions, TextGSAP, CSS onlyMediumCompressed weight: Demo 7.3 KBGSAP 28 KBFreeDownload the zip

The ivory home page of a made-up studio, Ondine Atelier, that turns dresses into objects: a big sentence in Bodoni Moda, upright capitals alternating with lowercase italics, «WHERE the DRESS becomes a FORM.». On a link click the two halves of the sentence step aside by half the hole on a measured spring with one pixel too many, and in between a window with the proportions of the screen opens on a real photo of pleated white silk that breathes; then the window takes the whole screen in 0.7 seconds and you land on the study page. «Back» does the gesture in reverse.

Rebuilt from scratch studying verostudio.com by Rodéo studio, plutot.cool: 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>
<!--
  "Fabric window 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>Ondine Atelier, where the dress becomes form</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/bodoni-moda@5.3.0/opsz.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/bodoni-moda@5.3.0/opsz-italic.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/instrument-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- a made-up studio, Ondine Atelier, that turns old dresses into objects. A click on a link opens a window
         in the middle of the sentence: the two halves step aside, the photo of the fabric breathes inside the window,
         then the window grows to the whole screen and the second page is there. Back does the gesture in reverse -->

    <header class="head" data-head>
      <a class="brand" href="#top" aria-label="Ondine Atelier">
        <svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
          <path d="M4 15c3-6 5-6 8 0s5 6 8 0"/>
          <path d="M4 9.5c3-6 5-6 8 0s5 6 8 0" class="brand__thin"/>
        </svg>
        <span class="brand__name">Ondine Atelier</span>
      </a>
      <nav class="nav" aria-label="Pages">
        <a href="#study" data-open>Studies</a>
        <a href="#study" data-open>Process</a>
        <a href="#study" data-open>Contact</a>
      </nav>
    </header>

    <h1 class="phrase" aria-label="Where the dress becomes form">
      <span class="half half--top" data-half="top">
        <span class="line" data-line><span class="up">Where</span> <em>the</em></span>
        <span class="line" data-line data-near><span class="up">Dress</span></span>
      </span>
      <span class="half half--bottom" data-half="bottom">
        <span class="line" data-line data-near><em>becomes</em></span>
        <span class="line" data-line><em>a</em> <span class="up">Form.</span></span>
      </span>
    </h1>

    <div class="win" data-win aria-hidden="true">
      <div class="win__photo" data-photo><img src="pieghe.webp" alt="" draggable="false"></div>
      <div class="win__shade"></div>
    </div>
    <div class="frame" data-frame aria-hidden="true"><i class="frame__glint" data-glint></i></div>
    <p class="caption" data-caption aria-hidden="true">
      <span class="caption__row"><span data-cap>Silk organza</span></span>
      <span class="caption__row caption__row--dim"><span data-cap>pleated by hand</span></span>
    </p>

    <footer class="foot" data-foot>
      <a class="enter" href="#study" data-open data-autoclic>
        <span class="enter__text">Enter the study</span>
        <svg class="enter__arrow" viewBox="0 0 22 12" aria-hidden="true"><path d="M1 6h19M15 1.5 20 6l-5 4.5"/></svg>
      </a>
      <p class="foot__note">Garments into objects</p>
    </footer>

    <section class="study" id="study" data-study aria-label="The silk study" hidden>
      <button class="back" type="button" data-back>
        <svg class="back__arrow" viewBox="0 0 22 12" aria-hidden="true"><path d="M21 6H2M7 1.5 2 6l5 4.5"/></svg>
        <span>Back</span>
      </button>
      <div class="study__title">
        <p class="study__kicker"><span data-in>The silk study</span></p>
        <h2 class="study__name"><span data-in><span class="up">Fold</span> <em>held still</em></span></h2>
        <p class="study__line"><span data-in>A wedding dress, unpicked and set in resin.</span></p>
      </div>
    </section>
  </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.

32 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 “Fabric window 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 an ivory page with a soft light from the top, the Ondine Atelier mark (two waves, one black, one red) and three menu links; in the middle the sentence on four lines, which on arrival goes from light grey to black one line after the other. Clicking «Enter the study» or a menu link, the top half rises and the bottom half falls by half the hole in 1.4 seconds, overshoot by one pixel and settle; in between the window opens, 15.6% of the screen wide (34% on a phone) and tall in proportion, with a thin rule and a soft shadow. Inside, the silk photo starts close and slowly pulls back, a glint crosses the glass and a small caption rises by the corner. The letters of DRESS and becomes next to the hole lean back a little, a beat later. Then the sentence leaves up and down and the window grows to the whole screen; the glass Back button and the title «FOLD held still» arrive. Back shrinks the photo to the window, brings the sentence back and closes it, the two halves meeting one pixel past and settling.

How it works

A hole, not an image

The photo fills the screen behind the sentence and only shows inside a clip-path: inset(...) worked out in pixels. The window is HOLE_SIZE % of the screen wide and tall in proportion (screen height over width), so when it grows it becomes the screen without changing shape.

One object, one function

Opening, growing, splitting, leaning and leaving are numbers from 0 to 1 in one object animated by GSAP; draw() turns them into pixels on every frame. If the window changes size mid-gesture, the drawing stays right.

Halves of half a hole

The top half rises by half the window height, the bottom one falls by half plus GAP, minus the empty space above the lowercase. On top of the split in power4.inOut (the site's quint) sits nudge: one pixel in 0.16 s and back in 0.5 s, the settle.

The letters nearby lean

Words are split into letters; those of the two lines next to the hole rotate by BEND degrees on a bell of their distance from the middle, a beat after the window and a little past, then come back.

To the whole screen

After HOLD_TIME the sentence leaves by OUT_SHIFT % on power4.in and, 0.15 s later, the window goes full screen in FULL_TIME on power3.inOut (the site's quart). Back does it all in reverse.

Values to change

NameFileDefaultWhat it changes
HOLE_SIZEscript.js15.6Width of the window in the sentence, in % of the screen (the site uses 15.6 vw; 34% on a phone).
OPEN_TIMEscript.js1.4Seconds the window takes to open in the sentence (the site uses 1.4).
FULL_TIMEscript.js0.7Seconds the window takes to grow to the whole screen (the site uses 0.7).
HOLD_TIMEscript.js0.9Seconds the window stays open in the sentence before it grows.
GAPscript.js10Pixels between the window and the lower half of the sentence (the site uses 10).
BENDscript.js3Degrees the letters next to the window lean away from it.
ZOOMscript.js1.22How close the photo starts inside the window before its slow zoom out.
OUT_SHIFTscript.js25% of the screen the two halves travel as they leave (the site uses 25).
LOOPscript.jstrueLeft alone, it opens, waits and comes back again and again.

Try them in the Playground

When to use it

For the home page of an atelier, a design studio or a photographer, for a wedding or event page, for a landing page with a strong sentence: when going from the sentence to the picture is the story, and the page you land on is a full-bleed photo.

On phones

The same gesture: the window is 34% of the screen wide and never taller than 34% of its height, the sentence is measured on the height too (min(10vw, 9vh)), the menu keeps one link and the caption never leaves the side.

With reduced motion

No movement: the sentence fades out, the photo fades in already full screen and Back does the same in reverse; no zoom, no lean, no glint.

Pitfalls

  • The hole is worked out in pixels and redrawn on resize, even mid-gesture: with clip-path percentages the window would lose the screen proportions when the box changes height.
  • The lower lines start with lowercase: with the geometric shift alone the space above the x-height looks bigger than the one under DRESS. 17% of the font size is taken back.
  • The leaning letters are inline-block with the transform origin on the side of the hole; measure them with offsetLeft (which ignores transforms), not getBoundingClientRect.

Libraries

GSAP 3.15.0, Bodoni Moda (font variabile) 5.3.0, Instrument Sans (font variabile) 5.3.0.

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

Testing

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