Skip to content
animorio
IT
Back to the library

Inbox slit transition

Transitions, HoverGSAPMediumCompressed weight: Demo 11 KBGSAP + Flip 37 KBFreeDownload the zip

The inbox of Quillby, a made-up app: six clean emails with initials avatars, sender, subject, preview and time, the blue «New» pill on the unread ones. On click the list splits open like a slit right on that row: the rows above fold up into a stack of paper edges, the rows below fold down, and the message widens into the gap from the rectangle of the row; avatar, sender and subject fly to the head with Flip, the body comes in line by line and Reply, Forward and Archive arrive. Back is the same gesture in reverse; Archive throws the message out to the right, the tray takes it and the list closes on a spring, with Undo to bring it back. On warm white, a single blue.

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>
<!--
  "Inbox slit 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>The inbox that opens like a slit</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- the inbox of a made-up mail app, Quillby. A click on a row splits the list open on that row like a slit:
         the rows above fold up into a thin stack of paper edges, the rows below fold down, and the message opens in
         the gap; avatar, sender and subject fly to the head (Flip). Archive throws the message out and the list
         closes on a spring; Undo brings it back -->
    <section class="app" data-app aria-label="Quillby inbox">
      <span class="app__rim" aria-hidden="true"></span>

      <header class="bar">
        <span class="brand">
          <svg class="brand__mark" viewBox="0 0 22 22" aria-hidden="true">
            <rect x="0.75" y="0.75" width="20.5" height="20.5" rx="6.5"/>
            <path d="M5.6 8.2 11 12.1l5.4-3.9"/>
            <path d="M5.6 7.4v7.4h10.8V7.4"/>
          </svg>
          <span class="brand__name">Quillby</span>
        </span>
        <span class="bar__title">Inbox</span>
        <span class="bar__right">
          <span class="count" aria-live="off"><span class="count__win"><span class="count__n" data-count>3</span></span><span class="count__w">new</span></span>
          <span class="tray" data-tray aria-label="Archive">
            <svg viewBox="0 0 20 20" aria-hidden="true"><rect x="2.6" y="3.4" width="14.8" height="3.8" rx="1.2"/><path d="M4 7.2v7.6a1.6 1.6 0 0 0 1.6 1.6h8.8a1.6 1.6 0 0 0 1.6-1.6V7.2M8 10.4h4"/></svg>
            <span class="tray__n" data-tray-n>0</span>
          </span>
        </span>
      </header>

      <div class="list" data-list role="list">
        <span class="sheet-shadow" data-shadow aria-hidden="true"></span>
        <article class="sheet" data-sheet aria-hidden="true">
          <div class="sheet__top" data-s-top>
            <button class="back" type="button" data-back>
              <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M9.8 3.4 5.2 8l4.6 4.6"/></svg>
              <span>Inbox</span>
            </button>
            <span class="sheet__when" data-s-when></span>
          </div>
          <div class="sheet__from">
            <span class="avatar avatar--big" data-s-avatar><span data-s-initials></span></span>
            <span class="from">
              <span class="sender sender--big" data-s-sender></span>
              <span class="addr" data-s-addr></span>
            </span>
          </div>
          <h2 class="subject subject--big" data-s-subject></h2>
          <div class="sheet__body" data-s-body></div>
          <div class="actions" data-s-actions>
            <button class="act act--main" type="button" data-reply>
              <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6.4 4 2.8 7.4l3.6 3.4"/><path d="M3.2 7.4h5.6c2.6 0 4.4 1.6 4.4 4.4"/></svg>
              <span class="act__t">Reply</span>
            </button>
            <button class="act" type="button" data-forward>
              <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M9.6 4l3.6 3.4-3.6 3.4"/><path d="M12.8 7.4H7.2c-2.6 0-4.4 1.6-4.4 4.4"/></svg>
              <span class="act__t">Forward</span>
            </button>
            <button class="act" type="button" data-archive>
              <svg viewBox="0 0 16 16" aria-hidden="true"><rect x="2" y="2.8" width="12" height="3" rx="1"/><path d="M3.2 5.8v6.4a1.3 1.3 0 0 0 1.3 1.3h7a1.3 1.3 0 0 0 1.3-1.3V5.8M6.5 8.4h3"/></svg>
              <span class="act__t">Archive</span>
            </button>
          </div>
        </article>
      </div>

      <div class="toast" data-toast role="status">
        <span class="toast__t">Conversation archived</span>
        <button class="toast__undo" type="button" data-undo>Undo</button>
      </div>
    </section>

    <svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 2.8v16.4l4.2-4 2.8 6.2 2.9-1.3-2.8-6.1h5.9Z"/></svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/Flip.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.

33 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 “Inbox slit 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 a warm white page sits the window of Quillby, a made-up mail app: at the top the mark, «Inbox», the blue «3 new» pill and the archive tray. Below, six emails in rows: a round avatar with initials on a soft tint, the sender, the time on the right, the subject and one line of preview in grey; the unread ones have a heavier sender and the «New» pill. Under the pointer the row brightens, the time steps aside and a thin chevron appears. On click the preview and the time fade and the list splits open like a slit right on that row: the rows above fold up into a stack of five pixel paper edges, the rows below fold down, nearest first, while the message is uncovered from the rectangle of the row until it fills the gap, its corners rounding and a soft shadow underneath. Avatar, sender and subject fly to their place at the head and grow, the subject becomes the title; then come Inbox with its chevron and the date, the address, the body line by line and at the bottom Reply in blue, Forward and Archive, with a small bounce. The «New» pill goes and the counter rolls down. Back plays the gesture in reverse: the message becomes a row again, the rows open back and each goes one pixel past its place before settling. Archive lifts the message and throws it out to the right with a turn, the tray at the top jumps and takes a 1, the list closes on a spring and the black «Conversation archived» toast arrives with Undo, which opens the place again and slides the row back in from the right. Over Reply, Forward and Archive the label widens and the icon moves. Left alone, a pointer opens a message, goes back, opens another one, archives it and brings it back with Undo.

How it works

Rows placed by GSAP

The rows are absolute in the list and each sits at y = slot x row height, measured from the CSS (clamp(48px, 11vh, 66px)). So opening, closing, archiving and undoing are only tweens of y, and the button inside the row stays free for the CSS states (hover, press).

The slit

Opening row k, each row above goes to y = (slot + 1) x 5 - height, stacked with the z-index reversed, so only its last five pixels show; the rows below go to y = list height - (rows - slot) x 5. The further they are the more they narrow (scaleX) and fade, and their words go out: paper edges remain.

The message already in place

The page of the message is placed at once at its final size, between the two stacks, and uncovered by an inset clip-path that starts from the rectangle of the row and opens in 0.8 s (expo.out), with a separate shadow following it (the clip would cut its own). Since the page does not move, the pieces inside can fly without moving twice.

Sender and subject with Flip

Avatar, sender and subject of the page are laid over those of the row with Flip.fit(piece, rowPiece, { scale: true }) and then go back to x, y 0 and scale 1. They are as wide as their text (width: max-content), so the scale is the same in width and height and the letters do not squash. Back uses Flip.fit with a duration, towards the row.

Body, actions and closing

The address and the lines of the body rise 8 px, 0.07 s apart, the actions arrive on back.out(1.8). On closing, every row goes back to its place, one pixel past it, and settles; the preview of the row comes back only once the page is gone.

Archive and Undo

Archive takes the row out of the order, shrinks the page to 0.975 and throws it right with a 4 degree turn (power3.in); meanwhile the remaining rows go to their new places on back.out(1.6), the spring, and the tray jumps on elastic.out. Undo puts the row back in the order, moves the ones below down and slides it in from the right. The pointer that plays by itself is a GSAP timeline calling the same functions.

Values to change

NameFileDefaultWhat it changes
OPEN_TIMEscript.js0.8Seconds the slit takes to open and the message to fill the gap.
CLOSE_TIMEscript.js0.7Seconds the message takes to fold back into its row.
SLIVERscript.js5Pixels of each folded row left showing above and below the message.
ROW_STAGGERscript.js0.035Seconds between one folding row and the next, nearest first.
LINE_STAGGERscript.js0.07Seconds between one line of the body and the next.
SPRINGscript.js1.6How far the list overshoots closing after Archive (0 for no spring).
FLY_TIMEscript.js0.55Seconds the archived message takes to fly out.
IDLEscript.js5Seconds after the last touch before the pointer starts again by itself.
LOOPscript.jstrueLeft alone, it opens, goes back, opens another one and archives it, again and again.

Try them in the Playground

When to use it

For any app with a list and a detail page: mail, messages, support tickets, notifications, orders, bookings, notes. The slit keeps in sight where you were in the list, and Archive with Undo is the gentle way to remove something.

On phones

The same animation with adapted sizes: the window is measured on width and height (min(460px, 94vw), min(560px, 92vh)), the rows with clamp in vh, the words in vmin; at every resize rows, page and clip go back to their place. A finger taps a row, Back, Archive and Undo.

With reduced motion

No moving rows and no flying pieces: the message fades in and out over the list, Archive and Undo fade the list and bring it back already in order. No pointer on its own.

Pitfalls

  • If the page of the message grew by moving (top and height), the pieces flown with Flip inside it would move twice: here the page is already in place and is uncovered by the clip-path.
  • The clip-path also cuts the element’s box-shadow: the shadow is a separate element behind, following the same numbers as the clip.
  • With width: 100% the sender and the subject would have boxes of different proportions in the row and in the page, and Flip with scale would squash the letters: the boxes are as wide as their text.
  • In the folded stacks each row covers the next: above, the top one must be in front (reversed z-index), below, the bottom one, or a single edge would show.
  • Before the page takes the place of the row, the preview and time of the row fade: otherwise they would vanish at once under the white of the page.
  • Setting the opacity of the row chevron back to 1 with GSAP would leave it lit outside the hover: the opacities are removed with clearProps.

Libraries

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

Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP + Flip 37 KB.

Testing

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