
The inchworm menu
Menus, Hover, Transitions
The nav bar of an online outdoor clothing store, in smoked glass on a near black page with two soft lights behind it, like a Dribbble shot. Its one pixel edge catches a light that follows the pointer, and under the links a glass pill goes from page to page on a precise spring, stretching a little as it runs. The magnifier opens the search in place of the links, with the results in a glass panel under the bar; adding a product flies its swatch into the bag and the badge number rolls up.
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>
<!--
"Store nav with search" 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 store nav bar with the search that opens</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">
<!-- the nav bar of an online store for outdoor clothing, in smoked glass over two soft lights. Its 1px edge catches
a light that follows the pointer (or the page you are on); a glass pill moves under the links on a spring.
The search button opens a field in place of the links, with the results in a glass panel under the bar, and
adding a result flies it into the bag, whose count rolls up -->
<div class="wrap" data-wrap>
<nav class="bar" data-bar aria-label="Store">
<span class="bar__edge" aria-hidden="true"></span>
<span class="bar__sheen" aria-hidden="true"></span>
<a class="brand" href="#" aria-label="Norrow, home">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 18.5L9.2 7.5l3.4 6 2.2-3.6L21 18.5z"/>
</svg>
<span class="brand__name">Norrow</span>
</a>
<div class="mid" data-mid>
<div class="links" data-links>
<span class="pill" data-pill aria-hidden="true"><span class="pill__glass"></span></span>
<span class="ghost" data-ghost aria-hidden="true"></span>
<a class="link" href="#" data-link aria-current="page"><span class="link__in">Shop</span></a>
<a class="link" href="#" data-link><span class="link__in">Gear</span></a>
<a class="link" href="#" data-link><span class="link__in">Journal</span></a>
</div>
<div class="field" data-field>
<svg class="field__icon" viewBox="0 0 20 20" aria-hidden="true"><circle cx="8.6" cy="8.6" r="5.4"/><path d="M12.6 12.6l4.2 4.2"/></svg>
<label class="sr" for="q">Search products</label>
<input class="field__input" id="q" data-input type="search" autocomplete="off" spellcheck="false"
placeholder="Search 2,400 products" role="combobox" aria-expanded="false" aria-controls="results" aria-autocomplete="list">
<span class="field__caret" data-caret aria-hidden="true"></span>
<kbd class="field__key" aria-hidden="true">esc</kbd>
</div>
</div>
<div class="acts">
<button class="act act--search" type="button" data-search aria-expanded="false" aria-label="Search">
<span class="act__in">
<svg class="act__icon act__icon--find" data-find viewBox="0 0 20 20" aria-hidden="true"><circle cx="8.6" cy="8.6" r="5.4"/><path d="M12.6 12.6l4.2 4.2"/></svg>
<svg class="act__icon act__icon--close" data-close viewBox="0 0 20 20" aria-hidden="true"><path d="M5.5 5.5l9 9M14.5 5.5l-9 9"/></svg>
</span>
</button>
<button class="act act--bag" type="button" data-bag aria-label="Bag, 2 items">
<span class="act__in" data-bag-in>
<svg class="act__icon" viewBox="0 0 20 20" aria-hidden="true">
<path class="bag__body" d="M4.4 7.2h11.2l-.9 9.1a1.4 1.4 0 0 1-1.4 1.3H6.7a1.4 1.4 0 0 1-1.4-1.3z"/>
<path class="bag__handle" data-handle d="M7.3 7.2V6a2.7 2.7 0 0 1 5.4 0v1.2"/>
</svg>
</span>
<span class="badge" data-badge aria-hidden="true"><span class="badge__roll" data-roll><span class="badge__n" data-n>2</span></span></span>
</button>
</div>
</nav>
<div class="panel" data-panel id="results" role="listbox" aria-label="Products">
<span class="panel__edge" aria-hidden="true"></span>
<div class="panel__head"><span>Products</span><span class="panel__count" data-count></span></div>
<span class="hilite" data-hilite aria-hidden="true"></span>
<div class="rows" data-rows></div>
<p class="panel__none" data-none>Nothing yet for that. Try <b>rain</b> or <b>fleece</b>.</p>
</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.
53 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 “Store nav with search” from Animorio and fit it into my siteThe bar is smoked glass with backdrop-filter over two blurred radial gradients, which give it something to blur. The edge is a layer of its own with 1 pixel of padding and a two layer mask (content-box in xor), so only the line is left; its fill has two radial gradients anchored at --lx, the warm light at the top and the ember one at the bottom.
A single requestAnimationFrame loop moves four springs (the pill’s position and width, the result highlight, the edge light) with four sub-steps per frame and the step capped at 1/30 s; when they are all still the loop stops. The pill stretches by |v| times STRETCH and stays centred, so it looks like a drop of glass running.
Links and field share one area: the links leave with a stagger of x, opacity and blur, the field comes in with an inset clip-path that opens from the right, the magnifier turns into a cross with a back.out. The panel drops with a clip-path from the top, and when the number of results changes its height goes from the old one to the new one, with clearProps at the end.
The swatch leaves a copy that follows a quadratic Bézier curve from the result to the bag (the control point sits above both), shrinking and rounding; on arrival the bag squashes and comes back on an elastic, the handle jumps, the edge flares over the bag and the badge number rolls with two digits taking turns.
A GSAP timeline made only of calls starts from the load event: it changes page, opens the search, types QUERY letter by letter with a drawn blinking caret, picks and adds a result, closes, and at the end brings the badge back to its starting number. At the first real touch (pointerdown, key, wheel) the timeline stops.
| Name | File | Default | What it changes |
|---|---|---|---|
STIFFNESS | script.js | 420 | The spring that carries the pill and the result highlight: higher is quicker. |
DAMPING | script.js | 29 | Lower lets the pill pass its link by a pixel or two before it comes back. |
STRETCH | script.js | 0.018 | How much the pill stretches with its speed, like a drop of glass. |
LIGHT_STIFFNESS | script.js | 120 | The softer spring of the light on the edge, which trails behind the pill. |
QUERY | script.js | rain | What the demo types into the search on its own. |
TYPE_SPEED | script.js | 9 | Letters a second while it types. |
START_COUNT | script.js | 2 | How many items are in the bag at the start. |
PRODUCTS | script.js | 6 prodotti | The catalogue the search looks through: name, line under it, price and swatch colour. |
AUTO | script.js | true | The bar goes round by itself until someone touches it. |
For the header of an online store, a clothing brand or a catalogue: the links to the sections, the search with its suggestions close at hand and the bag that answers when you add a product. The pill and the light on the edge also work alone for the bar of a SaaS site or an app.
Below 440 pixels the store name steps aside and the mark stays, the links get tighter and the line under each result’s name goes away; the bar is as wide as the screen minus the margins. There is no hover: the edge light follows the current page and the rest works the same on touch.
Nothing moves: the pill, the light and the result highlight are at once in place, links, field, panel and icons swap with a fade, the swatch does not fly and the badge number changes in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.
Tested on 3 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.