Skip to content
animorio
IT
All components

File app menu

Menus, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 9.4 KBGSAP 28 KBFreeDownload the zip

The places drawer menu of Quire, a made-up file app, built as a folder. Closed it is a graphite pocket with the place you are in, its item count and a thin storage line; above it the edges of six sheets peek out, the current one with a blue edge. Pressed, the front of the folder tips forward for an instant, the back grows upward with its tab and the places rise out of the pocket one after the other as sheets, each on its own spring, straightening as they come. Point at a sheet and it slides a little out of the stack while its neighbours feel it; choose it and it ticks, the sheets sink back into the pocket from the bottom up, the chosen one last, and the pocket rolls to the new name and numbers.

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>
<!--
  "File app menu" 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 file app menu with the places rising out of the folder</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 places menu of Quire, an invented file app, made as a folder: closed it is a graphite pocket with the
         sheets peeking out; opened, the back of the folder grows and every place rises out of the pocket as a sheet -->
    <div class="folder" data-folder>
      <div class="folder__back" data-back aria-hidden="true">
        <span class="folder__tab" data-tab>
          <svg class="folder__tab-shape" viewBox="0 0 120 26" preserveAspectRatio="none"><path d="M0 26V8.5C0 3.8 3.8 0 8.5 0h70c3.4 0 5.8 1.6 7.6 4.4l9.2 14.4c2.6 4.4 5.6 7.2 11.4 7.2H120z"/></svg>
          <span class="folder__tab-label">Places</span>
        </span>
        <span class="folder__hint" data-hint>Go to</span>
        <span class="folder__keys" data-keys><kbd>G</kbd></span>
      </div>

      <ul class="sheets" role="menu" id="places" aria-label="Places" data-sheets></ul>

      <button class="pocket" type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="places" data-pocket data-autoclic>
        <span class="pocket__shade" aria-hidden="true"></span>
        <span class="pocket__icon" aria-hidden="true" data-pocket-icon></span>
        <span class="pocket__text">
          <span class="pocket__roll" data-roll><span class="pocket__name" data-name>All files</span></span>
          <span class="pocket__meta"><span data-count>1,284</span> items · 18.4 of 50 GB</span>
        </span>
        <span class="pocket__toggle" aria-hidden="true">
          <svg viewBox="0 0 20 20" data-chev><path d="M6 12.2 10 8.2l4 4"/></svg>
        </span>
        <span class="pocket__meter" aria-hidden="true"><span class="pocket__fill" data-fill></span></span>
      </button>
    </div>

    <svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z"/></svg>
    <p class="sr" aria-live="polite" data-live></p>
  </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.

25 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 “File app menu” 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

A single folder in the middle on white. The front is a graphite pocket that works as the button: on the left the blue tile with the icon of the place you are in, the name, the item count and gigabytes, and a thin line for the space it uses; on the right the chevron in a circle. Above the pocket the edges of six sheets peek out, a little crooked as in a real folder. Hover the pocket and the sheets peek out a bit more. Pressed, the pocket tips forward and comes back with a bounce, the fine grained paper back grows upward with the Places tab and the Go to line with the G key, and the sheets rise out of the pocket one after the other to their row, a pixel past it and settling; icon, name and count come last. Under the pointer a sheet slides sideways out of the stack, its label widens, its icon turns a little and both neighbours move a hair. Pick a place and its tick draws, the sheets sink back into the pocket from the bottom up, the chosen one last with its blue edge, the pocket gives a pixel when it lands, and name, icon, numbers and storage line roll to the new place.

How it works

The folder in three layers

The paper back (with the SVG tab as a child), the sheets and the front pocket are three absolutely positioned layers in the same box. The pocket sits above the sheets and casts an upward shadow, so closed sheets only show their edge and look inside.

Measures from the window

Width, row step, pocket height and total height are worked out in pixels from the window (the step up to 9.6% of the height), handed to CSS as variables and measured again on resize, putting everything back for the current state. Closed, the folder is shifted up by half the difference, so it is centred both closed and open.

Sheets rising

Every sheet has a closed y (its own peek and lean) and an open y (its row). On opening a GSAP timeline tips the pocket TIP degrees with rotationX and brings it back with elastic.out, grows the back and sends the sheets to their rows with back.out(SPRING), STAGGER seconds apart, straightening them; icon, name and count arrive halfway.

Sinking from the bottom up

On closing the order is reversed and the chosen sheet moved to the end: sheets drop with power3.in in SINK seconds, the back shortens and the pocket gives 1.5 pixels and springs back when the last one lands.

The pocket rolling

The new name and icon come in from below while the old ones leave upward, in a window with hidden overflow; item count and gigabytes run with a tween on an object and the storage line stretches with scaleX.

The pilot

A drawn pointer goes over the pocket, opens it, browses the places, picks Shared with me, then opens again and goes back to All files. At the first real mouse move, tap or key it stops.

Values to change

NameFileDefaultWhat it changes
RISEscript.js0.62Seconds for a sheet to rise out of the pocket to its row.
STAGGERscript.js0.05Seconds between one sheet and the next.
SPRINGscript.js1.25How far a sheet overshoots its row before settling (0 none).
TIPscript.js11Degrees the front of the folder tips forward when it opens.
SINKscript.js0.3Seconds for a sheet to sink back into the pocket.
PEEKscript.js4Extra pixels the sheets peek out when you point at the closed folder.
SPEEDscript.js1Pilot speed.
LOOPscript.jstrueThe pilot starts over.

Try them in the Playground

When to use it

As the places menu of a file app, a document archive, a drive or a project manager: the button says where you are and the folders come out of it without leaving the page. It also works as the drawer menu of a dashboard, at the bottom of a phone screen or at the foot of a sidebar.

On phones

The same animation with adapted sizes: the folder is 88% of the screen wide up to 320 pixels, the row step and the pocket also follow the window height, so it fits the phone box when open. The finger opens and picks just like the mouse; the extra peek on hover is mouse only.

With reduced motion

Nothing moves: the sheets fade in and out already in place, the back and the chevron change at once, the pocket does not tip and the name changes without rolling; the pilot's pointer is hidden.

Pitfalls

  • The pocket tips with GSAP rotationX: a CSS class with a transform for the press wiped it out, so the press of the pocket and its spring are done by GSAP, and the sheets' press sits on the button inside the sheet, not on the sheet GSAP moves.
  • Closed and open sheet positions change with the window height, which in the viewer changes even while you watch: on resize the tweens stop and everything is put back in place for the current state.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 9 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 components