
The inchworm menu
Menus, Hover, Transitions
The vehicle selector of a made-up car parts and accessories shop, Gearloft, in a white card: “Find parts for your vehicle” and three cascading fields, Make, Model and Year, unlocking one after the other with a glint. Each menu opens on a spring and the chosen item slides from the menu into the field; once the year is set, Shop parts lights up with a light running across it and below it the line “Fits your 2019 Arvel Sora” is born with a tick drawing itself and the compatible parts count rolling up to 1,284. Change empties everything in reverse, from year to make, and the car stays saved as a small pill in My garage that fills the three fields again. Minimal style.
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>
<!--
"Vehicle fitment selector" 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>Vehicle selector</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 vehicle selector of a made-up car parts shop, Gearloft: Make, Model and Year unlock one after the other,
Shop parts lights up, a "Fits your ..." line is born with a drawn tick and a rolling parts count,
Change clears everything in reverse, and the car stays saved as a pill in My garage -->
<section class="card" data-card aria-labelledby="fit-title">
<header class="top">
<span class="brand">
<svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="7.2"></circle><circle cx="10" cy="10" r="2.4"></circle><path d="M10 2.8v4.8M3.8 13.6l4.1-2.4M16.2 13.6l-4.1-2.4"></path></svg>
<span data-shop>Gearloft</span>
</span>
<span class="top__note">Free returns on parts</span>
</header>
<h2 class="title" id="fit-title">Find parts for your vehicle</h2>
<p class="sub">Pick your car once, see only what fits.</p>
<div class="fields" data-fields>
<div class="field" data-field="make">
<button class="field__btn" type="button" aria-haspopup="listbox" aria-expanded="false" data-btn>
<span class="field__label">Make</span>
<span class="field__value" data-value><span class="field__ph" data-ph>Select make</span></span>
<svg class="field__chev" viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.5L8 10l3.5-3.5"></path></svg>
<span class="field__sheen" aria-hidden="true"></span>
</button>
<div class="menu" role="listbox" aria-label="Make" data-menu></div>
</div>
<div class="field" data-field="model">
<button class="field__btn" type="button" aria-haspopup="listbox" aria-expanded="false" data-btn>
<span class="field__label">Model</span>
<span class="field__value" data-value><span class="field__ph" data-ph>Select model</span></span>
<svg class="field__chev" viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.5L8 10l3.5-3.5"></path></svg>
<span class="field__sheen" aria-hidden="true"></span>
</button>
<div class="menu" role="listbox" aria-label="Model" data-menu></div>
</div>
<div class="field" data-field="year">
<button class="field__btn" type="button" aria-haspopup="listbox" aria-expanded="false" data-btn>
<span class="field__label">Year</span>
<span class="field__value" data-value><span class="field__ph" data-ph>Select year</span></span>
<svg class="field__chev" viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.5L8 10l3.5-3.5"></path></svg>
<span class="field__sheen" aria-hidden="true"></span>
</button>
<div class="menu menu--grid" role="listbox" aria-label="Year" data-menu></div>
</div>
</div>
<button class="shop" type="button" disabled data-shopbtn>
<span class="shop__bg" aria-hidden="true"><span class="shop__light"></span></span>
<span class="shop__label">Shop parts</span>
<svg class="shop__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9M8.5 4.5L12 8l-3.5 3.5"></path></svg>
</button>
<div class="fit" data-fit aria-hidden="true">
<div class="fit__in" data-fit-in>
<svg class="fit__tick" viewBox="0 0 28 28" aria-hidden="true"><circle cx="14" cy="14" r="11.5" pathLength="1" data-ring></circle><path d="M9 14.4l3.3 3.2 6.6-6.9" pathLength="1" data-check></path></svg>
<div class="fit__text">
<p class="fit__line">Fits your <b data-car>2019 Arvel Sora</b></p>
<p class="fit__count"><span class="odo" data-odo aria-hidden="true"></span> compatible parts<span class="sr" data-count-sr></span></p>
</div>
<button class="change" type="button" data-change>Change</button>
</div>
</div>
<div class="garage">
<span class="garage__label">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3 9.2L10 4l7 5.2V16H3z"></path><path d="M6.4 16v-3.6h7.2V16"></path></svg>
My garage
</span>
<span class="garage__empty" data-empty>No cars saved yet</span>
<div class="garage__pills" data-garage></div>
</div>
</section>
<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.
37 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Vehicle fitment selector” from Animorio and fit it into my siteEach field keeps its state in one object (make, model, year): a field is unlocked only when the one before is set, and changing the make clears model and year. The model menu is built when it opens, with the models of the chosen make.
The item’s label in the menu and the spot it will land on in the field are measured with getBoundingClientRect; a position fixed copy flies from one to the other with x, y and a scale that brings its size to the field’s, then it goes away and the real text settles by a pixel with back.out.
The count 1,284 becomes one column per digit, each with two rounds of 0 to 9 in a strip; GSAP moves each strip with yPercent to the second round of its digit, one column after the other, so the digits turn like an odometer without any pixel sizes.
The “Fits your…” line has zero height: it is measured at auto height and GSAP brings it there with back.out, then sets it back to auto. Change empties the fields from last to first, CASCADE_GAP apart, and locks them again in the same order; the tick draws with strokeDashoffset on pathLength 1 paths with autoRound off.
| Name | File | Default | What it changes |
|---|---|---|---|
SHOP_NAME | script.js | Gearloft | The shop’s name at the top of the card. |
SPRING | script.js | 1.5 | How far the menus and the “Fits your…” line overshoot and come back. |
MENU_TIME | script.js | 0.5 | How long a menu takes to open. |
SLIDE_TIME | script.js | 0.55 | How long the chosen item takes to slide from the menu into the field. |
COUNT_TIME | script.js | 1.3 | How long the digits of the parts count roll. |
CASCADE_GAP | script.js | 0.14 | The gap between one field and the next when Change empties everything in reverse. |
GARAGE_MAX | script.js | 2 | How many cars stay saved in My garage. |
In an online shop for car parts, tyres, accessories and car care, on the page of a garage or a car wash, and anywhere a product has to be chosen by something you own (the model of a motorbike, a phone, a printer).
The card takes the width with a margin and heights, gaps and type also follow the window height with clamp, so with the “Fits your…” line open everything fits the preview box; the menus stay inside the card. Touch replaces hover.
No springs, hops or flights: the menus, the items, the line and the pill fade in, the tick is already drawn, the count already shows its number and the self-running preview does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.
Tested on 21 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.
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.