
The inchworm menu
Menus, Hover, Transitions
The navigation menu of the Orrin Museum of Art, a made-up museum, on white: closed it is a plaster coloured bar with the name and a Menu button; on a tap the bar rises, widens and becomes a gallery wall. On the left the entries Exhibitions, Collection, Visit and Shop rise out of their masks; on the right a real public domain painting hangs from the picture rail on two wires, under a brass picture light that flickers on. Moving onto an entry, four brass corners frame it on a spring, the word widens on the wdth axis and the frame takes the new work: it grows or narrows to the painting's proportions, sways on its wires like a real frame and settles, the new painting comes in behind a soft curtain with a band of warm light, and the wall label under it rolls to the artist, title and year.
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>
<!--
"Museum 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 museum menu with the hanging artwork that changes in its frame</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz-italic.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the navigation of the Orrin Museum of Art, a made-up museum. Closed, it is a plaster bar with the name and a
Menu button; open, the bar rises and grows into a gallery wall. On the left the entries, framed by four thin
brass corners that follow the one under the pointer; on the right a real public domain painting hangs from
the picture rail on two wires, under a brass picture light. Every entry hangs a different work: the frame
grows or narrows to its proportions on a spring and sways on its wires, the new painting slides in behind a
soft curtain, and the wall label beside it rolls to the new artist, title and year -->
<div class="orrin" data-orrin>
<div class="wall" data-wall>
<span class="wall__grain" aria-hidden="true"></span>
<div class="wall__body" data-body aria-hidden="true">
<nav class="nav" id="orrin-menu" aria-label="Orrin Museum of Art">
<ul class="nav__list" data-list>
<li class="entry" data-entry="0">
<a class="entry__link" href="#" data-link>
<span class="entry__mask"><span class="entry__in" data-in><span class="entry__word">Exhibitions</span></span></span>
<span class="entry__note" data-note>The Quiet Room, until March</span>
</a>
</li>
<li class="entry" data-entry="1">
<a class="entry__link" href="#" data-link>
<span class="entry__mask"><span class="entry__in" data-in><span class="entry__word">Collection</span></span></span>
<span class="entry__note" data-note>Six centuries of painting</span>
</a>
</li>
<li class="entry" data-entry="2">
<a class="entry__link" href="#" data-link>
<span class="entry__mask"><span class="entry__in" data-in><span class="entry__word">Visit</span></span></span>
<span class="entry__note" data-note>Open daily, ten to six</span>
</a>
</li>
<li class="entry" data-entry="3">
<a class="entry__link" href="#" data-link>
<span class="entry__mask"><span class="entry__in" data-in><span class="entry__word">Shop</span></span></span>
<span class="entry__note" data-note>Prints of the collection</span>
</a>
</li>
</ul>
<!-- four brass corners that frame the entry under the pointer -->
<span class="marker" data-marker aria-hidden="true"><i></i><i></i><i></i><i></i></span>
<p class="nav__foot" data-foot>Free on Thursdays after five <span class="nav__sep">·</span> Members first</p>
</nav>
<section class="hang" data-hang aria-label="Featured work">
<span class="hang__rail" data-rail aria-hidden="true"></span>
<span class="hang__pool" data-pool aria-hidden="true"></span>
<svg class="hang__wires" data-wires aria-hidden="true">
<path class="hang__wire" data-wire d="M0 0"/>
<rect class="hang__hook" data-hook x="-3" y="-2" width="6" height="7" rx="1.5"/>
</svg>
<div class="frame" data-frame>
<span class="frame__shadow" aria-hidden="true"></span>
<div class="frame__mold">
<div class="frame__mat">
<div class="frame__art" data-art>
<img data-img src="lattaia.webp" width="912" height="1024" alt="The Milkmaid by Johannes Vermeer: a maid pours milk by a window">
<img data-img src="autoritratto.webp" width="754" height="1024" alt="A portrait in a straw hat by Vincent van Gogh, on a blue green ground">
<img data-img src="covoni.webp" width="1024" height="710" alt="Grainstacks in white frost at sunrise by Claude Monet">
<img data-img src="onda.webp" width="1024" height="708" alt="The great wave off Kanagawa, a woodblock print by Katsushika Hokusai">
<span class="frame__sheen" data-sheen aria-hidden="true"></span>
</div>
</div>
</div>
<!-- the brass picture light on the top of the frame and the warm light it pours -->
<span class="lamp" data-lamp aria-hidden="true"><span class="lamp__arm"></span><span class="lamp__hood"></span></span>
<span class="frame__glow" data-glow aria-hidden="true"></span>
</div>
<div class="label" data-label>
<span class="label__line"><span class="label__roll" data-l1>Johannes Vermeer</span></span>
<span class="label__line label__line--title"><span class="label__roll" data-l2><em>The Milkmaid</em>, c. 1660</span></span>
<span class="label__line label__line--small"><span class="label__roll" data-l3>Oil on canvas · East Wing</span></span>
</div>
</section>
</div>
<header class="bar" data-bar>
<span class="brand"><span class="brand__name">Orrin</span><span class="brand__sub">Museum of Art</span></span>
<button class="toggle" type="button" aria-expanded="false" aria-controls="orrin-menu" data-toggle>
<span class="toggle__face" data-face>
<span class="toggle__words" aria-hidden="true"><span class="toggle__roll" data-roll><span>Menu</span><span>Close</span></span></span>
<svg class="toggle__icon" viewBox="0 0 20 20" aria-hidden="true">
<path data-la d="M4 7.5h12"/>
<path data-lb d="M4 12.5h12"/>
</svg>
</span>
<span class="sr" data-toggle-label>Open the menu</span>
</button>
</header>
</div>
</div>
<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>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.
40 values to change
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 “Museum menu” from Animorio and fit it into my siteThe wall is one element whose left, top, width, height and border-radius the script rewrites every frame: two values from 0 to 1, rise (it goes up and widens, power3.inOut) and grow (the bottom edge drops, back.out passing the mark by a few pixels). The menu body inside the wall always has the size of the whole frame and is moved the other way with translate, so the entries and the painting never reflow while the wall grows, and the wall keeps its shadow (a clip-path would have cut it).
The frame's width and height chase their target, worked out from the painting's proportions and the free space, on a spring (stiffness 150, damping 0.62 of critical); the angle is a lightly damped pendulum around the hook, pushed by a kick when the work changes and by the speed at which the frame widens; another spring sinks the frame by a pixel on the hook. All in one GSAP ticker, three steps per frame with the step capped at 1/30 s; the transform-origin is the hook, above the frame.
The two wires are an SVG path from the back of the frame to the hook, turned by hand with the sine and cosine of the same angle; the pool of light on the wall is a radial gradient in soft-light placed under the turned lamp. The label is measured at every change, centred under the new frame and slides there with expo.out; its three lines leave upwards and come back from below out of their masks.
Every painting has a gradient mask-image with a 22% feathered edge that depends on a CSS variable --a: GSAP takes it from -2% to 122% and the new painting appears from the left over the old one, with a band of light in soft-light running at the same speed and a zoom from 1.07 that settles. When the curtain is done, the paintings under it are switched off and their mask goes back.
The active word changes the font-stretch and font-weight of Mona Sans with a CSS transition that overshoots; four brass corners made of 1.5 px borders chase the live rectangle of the word on a spring, read again every frame, so they follow the word as it widens.
| Name | File | Default | What it changes |
|---|---|---|---|
OPEN_TIME | script.js | 1.2 | The seconds the bar takes to become the wall. |
STAGGER | script.js | 0.08 | The seconds between one entry and the next as they rise. |
SWAY | script.js | 1 | How much the frame swings on its wires when the work changes (0 = still). |
STIFFNESS | script.js | 150 | How stiff the spring that resizes the frame is. |
WIPE | script.js | 0.95 | The seconds of the soft curtain that brings the new painting. |
LIGHT | script.js | 1 | How strong the picture light is on the painting and the wall. |
WEIGHT | script.js | 640 | The weight the entry under the pointer takes, on the wght axis. |
HOLD | script.js | 1.9 | The seconds the pilot stays on each entry. |
LOOP | script.js | true | The pilot opens and closes the menu again and again. |
For the site of a museum, an art gallery, a foundation, an auction house or a framing studio: the menu, on phone and desktop, that already shows the works, one per section, with a real wall label under it.
The same animation with adapted sizes: below 600 pixels wide the hanging painting sits at the top and takes the room left, the entries go under it two per row without the small lines, and a finger taps an entry to change the work.
Nothing moves: the wall fades in already open, the entries, the painting, the light and the label fade in, the frame changes size with no spring and no swing, the new painting fades in and the active entry only takes weight, width and colour.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Newsreader (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.
Tested on 6 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.