
The inchworm menu
Menus, Hover, Transitions
The dark sidebar of a made up work app, Fennick, that collapses down to its icons. Pressing the button on its edge every name reels into its icon like the tape of a tape measure: the letters speed up to the left and vanish one after the other at the icon’s edge, which recoils a pixel as the tape snaps in, while the bar narrows on a spring. The logo folds into its monogram, the group titles turn into thin rules and the counter moves to a corner of its icon. Collapsed, an icon pointed at shows its name with its keyboard shortcut; opening it again, the names run back out staggered and settle.
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>
<!--
"Tape measure sidebar" 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 sidebar with names that reel into their icons like a tape measure</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/geist@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the sidebar of a work app: the button on its edge narrows it to its icons on a spring, and every name reels
into its icon letter by letter like the tape of a tape measure; the logo folds into its monogram, the group
titles become thin rules, and folded, an icon pointed at shows its name and its keyboard shortcut -->
<div class="fit" data-fit>
<div class="sb-wrap" data-wrap>
<nav class="sb" aria-label="Main" data-nav>
<div class="sb__head">
<a class="sb__brand" href="#" aria-label="Fennick home">
<span class="sb__tile" aria-hidden="true">
<svg viewBox="0 0 32 32" data-mark>
<line data-m="a" x1="9" y1="10" x2="23" y2="10"/>
<line data-m="b" x1="9" y1="16" x2="23" y2="16"/>
<line data-m="c" x1="9" y1="22" x2="17" y2="22"/>
</svg>
</span>
<span class="reel reel--brand" data-reel>Fennick</span>
</a>
</div>
<div class="sb__body" data-body>
<span class="sb__pill" aria-hidden="true" data-pill></span>
<div class="sb__group">
<div class="sb__title" aria-hidden="true"><span class="reel reel--title" data-reel>Workspace</span><span class="sb__rule" data-rule></span></div>
<ul class="sb__list">
<li><a class="sb__item" href="#" aria-current="page" data-item data-keys="G I">
<span class="sb__ico"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 13.5 6.2 6.3A2 2 0 0 1 8.1 5h7.8a2 2 0 0 1 1.9 1.3L20 13.5V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2Z"/><path d="M4 13.5h4.2l1.3 2.2h5l1.3-2.2H20"/></svg></span>
<span class="reel" data-reel>Inbox</span>
<span class="sb__badge" data-badge>12<span class="sr"> unread</span></span></a></li>
<li><a class="sb__item" href="#" data-item data-keys="G P">
<span class="sb__ico"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3.5 7.5A2 2 0 0 1 5.5 5.5H9.5L11.5 7.5H18.5A2 2 0 0 1 20.5 9.5V17.5A2 2 0 0 1 18.5 19.5H5.5A2 2 0 0 1 3.5 17.5Z"/><path d="M3.5 10.5H20.5"/></svg></span>
<span class="reel" data-reel>Projects</span></a></li>
<li><a class="sb__item" href="#" data-item data-keys="G C">
<span class="sb__ico"><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3.5" y="5" width="17" height="15.5" rx="2.5"/><path d="M3.5 9.5H20.5M8 3V6.5M16 3V6.5"/></svg></span>
<span class="reel" data-reel>Calendar</span></a></li>
<li><a class="sb__item" href="#" data-item data-keys="G D">
<span class="sb__ico"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 3.5h7l4 4V19a1.5 1.5 0 0 1-1.5 1.5h-9.5A1.5 1.5 0 0 1 5.5 19V5A1.5 1.5 0 0 1 7 3.5Z"/><path d="M14 3.5V8h4"/><path d="M8.5 12.5h7M8.5 16h5"/></svg></span>
<span class="reel" data-reel>Docs</span></a></li>
</ul>
</div>
<div class="sb__group">
<div class="sb__title" aria-hidden="true"><span class="reel reel--title" data-reel>Team</span><span class="sb__rule" data-rule></span></div>
<ul class="sb__list">
<li><a class="sb__item" href="#" data-item data-keys="G M">
<span class="sb__ico"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="9" cy="8.5" r="3"/><path d="M3.5 19c.6-3.2 2.8-5 5.5-5s4.9 1.8 5.5 5"/><path d="M15.5 5.8a3 3 0 0 1 0 5.6"/><path d="M17.5 14.4c1.7.6 2.7 2.2 3 4.6"/></svg></span>
<span class="reel" data-reel>Members</span></a></li>
<li><a class="sb__item" href="#" data-item data-keys="G R">
<span class="sb__ico"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 20H20"/><path d="M7 16.5V11M12 16.5V6.5M17 16.5V13.5"/></svg></span>
<span class="reel" data-reel>Reports</span></a></li>
<li><a class="sb__item" href="#" data-item data-keys="G S">
<span class="sb__ico"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 7h8.5M17.5 7H20M4 17h2.5M11.5 17H20"/><circle cx="15" cy="7" r="2.2"/><circle cx="9" cy="17" r="2.2"/></svg></span>
<span class="reel" data-reel>Settings</span></a></li>
</ul>
</div>
</div>
<div class="sb__foot">
<a class="sb__user" href="#" data-item data-keys="G A" data-noactive>
<span class="sb__avatar" aria-hidden="true">IV</span>
<span class="sb__who">
<span class="reel reel--name" data-reel>Ines Varga</span>
<span class="reel reel--role" data-reel>Design lead</span>
</span>
</a>
</div>
</nav>
<button class="sb__toggle" type="button" aria-expanded="true" aria-label="Collapse sidebar" aria-keyshortcuts="[" data-toggle>
<svg viewBox="0 0 16 16" aria-hidden="true"><path class="sb__chev" d="M9.5 4.5 6 8l3.5 3.5"/></svg>
</button>
<!-- folded: the name of the icon pointed at and its shortcut -->
<div class="sb__tip" role="tooltip" data-tip>
<span class="sb__tipin" data-tipin></span>
</div>
</div>
</div>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
</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.
34 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 “Tape measure sidebar” from Animorio and fit it into my siteEvery name is split into letters and sits in a box that starts at the icon’s right edge, clipped with clip-path on the left only (an inset of -600 pixels on the other sides). Collapsing, the letters slide left by the length of the word with power2.in and a 14 millisecond stagger from the first: the icon’s edge eats them one at a time, like the tape reeling back into the tape measure.
When the last letter is in, the icon moves back KICK pixels in 70 milliseconds and returns with elastic.out, while a CSS variable lights a glow under it. Opening, the opposite happens: the letters go back to x 0 with back.out starting from the last one, so the word comes out a little stretched and closes up.
The bar’s width, the pill under the chosen page and the tooltip are three springs integrated in steps of 1/120 of a second in a single requestAnimationFrame, which stops when they are all at rest. The damping comes from BAR_BOUNCE; the pill stretches with its speed, and the button on the edge follows the bar’s width every frame.
The tile has three SVG lines: GSAP moves their ends through the attributes and the three strokes become the monogram’s F. The group titles reel in without an icon and in their place a 24 pixel rule opens from the centre; the counter moves from the end of the row to the icon’s corner and shrinks.
The tooltip measures the new text, changes width on a spring and the text rolls up or down with the direction. The [ key collapses and opens, G followed by a letter picks the page; every row is a real link with aria-current and aria-label. A drawn pointer does the round by itself and stops at the first real touch, starting again after six quiet seconds.
| Name | File | Default | What it changes |
|---|---|---|---|
OPEN_WIDTH | script.js | 248 | Width in pixels of the open bar. |
BAR_STIFFNESS | script.js | 230 | Stiffness of the spring that narrows and widens the bar. |
BAR_BOUNCE | script.js | 0.36 | How far the bar goes past and comes back (0 no bounce). |
REEL | script.js | 0.38 | Seconds for a name to reel into its icon. |
LETTER_STAGGER | script.js | 0.014 | Delay in seconds between one letter and the next. |
ROW_STAGGER | script.js | 0.02 | Delay in seconds between one row and the one below. |
KICK | script.js | 1.8 | How many pixels the icon recoils as the name snaps in. |
PILL_STIFFNESS | script.js | 320 | Stiffness of the spring of the pill that follows the chosen page. |
PILL_STRETCH | script.js | 0.5 | How much the pill stretches as it runs (0 rigid). |
ACCENT | script.js | #c8f25a | The accent colour: the logo, the chosen icon and the counter. |
For the sidebar of a work app, a dashboard, a back office or an admin panel: wherever people want more room for the content without losing the navigation, and want to reach the pages from the keyboard.
The same animation: the whole bar scales down to fit the screen, worked out again on every resize. Tapping an icon while collapsed picks the page and shows the tag for a second and a half.
Nothing moves: the names fade out and back in, the bar takes its width at once, the pill jumps to the chosen page, the tag appears without sliding; the pilot’s pointer is hidden.
GSAP 3.15.0, Geist (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.4 KB; the libraries: GSAP 28 KB.
Tested on 11 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.