
The inchworm menu
Menus, Hover, Transitions
The «Request a quote» button of a made-up garage, Wrenfield Garage, that does not open a new page: it opens inside itself. Pressed, it squashes and widens into the first step, what the car needs (Service, Brakes, Tyres), with a cream mark sliding under the one you point at; pick one and it stretches across the card for the second step, the email, while two thin bars above fill one per step. Sent, the arrow turns into a spinner, the pill closes on «Quote on its way» with a tick that draws itself, a drawn envelope takes off and flies away and a green glow wakes under the card. A wrong email makes the pill shake.
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>
<!--
"Two-step quote button" 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 request a quote button with a two-step form inside the pill</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">
<!-- Wrenfield Garage, an invented workshop: «Request a quote» opens inside the pill into the service, then the email,
and closes on «Quote on its way» while a drawn envelope leaves the pill -->
<section class="card" aria-labelledby="card-title">
<span class="card__glow" data-glow aria-hidden="true"></span>
<header class="card__head">
<span class="card__mark" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M14.6 6.2a4 4 0 0 0-5.3 5.3L4.5 16.3a1.6 1.6 0 0 0 2.3 2.3l4.8-4.8a4 4 0 0 0 5.3-5.3l-2.3 2.3-2-.4-.4-2z"/></svg>
</span>
<span>
<span class="card__name">Wrenfield Garage</span>
<span class="card__where">Service and repair</span>
</span>
</header>
<h1 class="card__title" id="card-title">Fixed prices, before we touch the car.</h1>
<p class="card__text">Tell us what it needs. A mechanic writes back with a price you can hold us to.</p>
<div class="steps" data-steps aria-hidden="true"><span><i data-bar></i></span><span><i data-bar></i></span></div>
<div class="quote" data-quote>
<span class="quote__shine" data-shine aria-hidden="true"></span>
<button class="quote__layer quote__idle" type="button" data-idle aria-expanded="false">
<span>Request a quote</span>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9M8.5 4.5 12 8l-3.5 3.5"/></svg>
</button>
<div class="quote__layer quote__service" data-service role="radiogroup" aria-label="What does the car need?">
<span class="quote__ask">Needs</span>
<span class="quote__mark" data-mark aria-hidden="true"></span>
<button class="quote__chip" type="button" role="radio" aria-checked="false" data-chip>Service</button>
<button class="quote__chip" type="button" role="radio" aria-checked="false" data-chip>Brakes</button>
<button class="quote__chip" type="button" role="radio" aria-checked="false" data-chip>Tyres</button>
</div>
<form class="quote__layer quote__mail" data-mail novalidate>
<span class="quote__picked" data-picked>Brakes</span>
<label class="quote__field">
<span class="sr">Your email</span>
<input type="email" data-input placeholder="you@email.com" autocomplete="off" spellcheck="false">
</label>
<button class="quote__send" type="submit" data-send aria-label="Send">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9M8.5 4.5 12 8l-3.5 3.5"/></svg>
<span class="quote__spin" data-spin></span>
</button>
</form>
<button class="quote__layer quote__done" type="button" data-done>
<svg class="quote__tick" viewBox="0 0 16 16" aria-hidden="true"><path data-tick d="M3.5 8.4 6.6 11.3 12.5 4.9" pathLength="1"/></svg>
<span>Quote on its way</span>
</button>
</div>
<svg class="envelope" data-envelope viewBox="0 0 40 28" aria-hidden="true">
<rect x="1" y="1" width="38" height="26" rx="4"/>
<path class="envelope__flap" d="M2.5 3.5 20 15.5 37.5 3.5"/>
</svg>
<p class="card__note" aria-live="polite"><span data-note>A reply within two hours, Monday to Saturday.</span></p>
</section>
<svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z"/></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.
31 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 “Two-step quote button” from Animorio and fit it into my siteThe pill is a single element with four stacked layers: the button, the services, the email form and the confirmation. GSAP changes its width by measuring the natural width of the incoming layer (width: max-content for a moment), on a back.out curve with OVERSHOOT; the form takes the whole width of the card.
The cream mark is a single element behind the three options: it moves to the offsetLeft and offsetWidth of the option you point at, on a back.out spring, and stays under the chosen one.
Two bars above the pill fill with scaleX, one per step; the form is a real form, sending checks the email with a regex and, if it is wrong, the pill shakes with keyframes on x.
The arrow shrinks and a spinner turns; then the pill closes on the confirmation, the tick draws with stroke-dashoffset on pathLength 1, the envelope leaves the middle of the pill and flies up turning and fading, the green glow rises and the note slides to its new text.
A drawn pointer opens the pill, hovers the options, picks Brakes, types the email letter by letter, sends and then closes: all on a GSAP timeline that stops at the first real gesture (pointermove, pointerdown or a key).
| Name | File | Default | What it changes |
|---|---|---|---|
OPEN | script.js | 0.6 | Seconds for the pill to open into a step. |
CLOSE | script.js | 0.55 | Seconds for the pill to close on «Quote on its way». |
OVERSHOOT | script.js | 1.4 | How far the pill passes its width before settling (0 none). |
PRESS | script.js | 0.96 | How much the pill squashes under the finger (1 never). |
TYPING | script.js | 0.065 | Seconds per letter when the pilot types the email. |
FLIGHT | script.js | 1.1 | Seconds of the envelope flight (0 no envelope). |
GLOW | script.js | 1 | How bright the green glow is once the quote is sent (0 none). |
SPEED | script.js | 1 | 2 = the pilot twice as fast, 0.5 = half. |
On the page of a garage, a craftsperson, a service business or a supplier: visitors ask for a quote without leaving the page and without a long form, in two gestures inside the same button.
The same animation with adapted sizes: the card is 92% of the screen wide, the pill is a little lower, the word «Needs» goes and the options are narrower, so the first step stays inside the card.
Nothing moves: the pill changes width at once, the layers swap with a fade, the envelope does not fly and the tick appears already drawn.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.5 KB; the libraries: GSAP 28 KB.
Tested on 8 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.