
The elastic button
Buttons, Hover, Text
The «Request a consultation» form of an invented law firm, on white: you pick the area, Family, Employment, Property or Business, and the ink slides behind your choice with a small spring; the questions underneath leave and the new ones come in, while the card stretches or shortens with a bounce. You type, pick an answer and a day, and on click the form leaves and a wax seal comes down and presses with its ripple: «Request sent».
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>
<!--
"Law firm intake form" 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 law firm consultation form whose questions change with the practice area</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.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" data-stage>
<!-- a law firm's consultation request: pick the practice area and the questions underneath change (the old ones
leave, then the new ones come in while the height springs), pick a day, send; the request is sealed in wax -->
<section class="card" data-card aria-label="Request a consultation">
<div class="card__in" data-card-in>
<form class="form" data-form novalidate>
<header class="head" data-reveal>
<p class="firm"><svg class="firm__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v18M6 21h12M4 8h16M12 5l-1 3h2zM4 8l-2.5 6h5zM20 8l-2.5 6h5z"></path><path d="M1.5 14a2.5 1.4 0 0 0 5 0M17.5 14a2.5 1.4 0 0 0 5 0"></path></svg><span data-firm>Wren & Ashcombe</span></p>
<h1 class="title">Request a <em>consultation</em></h1>
<p class="sub">Confidential. A partner replies within one working day.</p>
</header>
<fieldset class="block" data-reveal>
<legend class="label">Practice area</legend>
<div class="areas" role="radiogroup" aria-label="Practice area" data-areas>
<span class="areas__ink" data-ink aria-hidden="true"></span>
<button type="button" class="area" role="radio" aria-checked="true" data-area="family">Family</button>
<button type="button" class="area" role="radio" aria-checked="false" data-area="employment">Employment</button>
<button type="button" class="area" role="radio" aria-checked="false" data-area="property">Property</button>
<button type="button" class="area" role="radio" aria-checked="false" data-area="business">Business</button>
</div>
</fieldset>
<div class="qs" data-qs aria-live="polite">
<div class="qs__in" data-qs-in></div>
</div>
<fieldset class="block" data-reveal>
<legend class="label">Preferred day <span class="label__soft">· morning</span></legend>
<div class="days" role="radiogroup" aria-label="Preferred day" data-days></div>
</fieldset>
<button class="send" type="submit" data-send>
<span class="send__label" data-send-label>Request consultation</span>
<svg class="send__spin" viewBox="0 0 24 24" aria-hidden="true" data-spin><circle cx="12" cy="12" r="8"></circle><path d="M12 4a8 8 0 0 1 8 8"></path></svg>
</button>
</form>
<div class="done" data-done aria-hidden="true">
<div class="seal" data-seal aria-hidden="true">
<span class="seal__press" data-press></span>
<svg class="seal__wax" viewBox="0 0 120 120" data-wax>
<defs>
<radialGradient id="cera" cx="38%" cy="32%" r="75%">
<stop offset="0" stop-color="var(--cera-luce)"></stop>
<stop offset="0.55" stop-color="var(--accento)"></stop>
<stop offset="1" stop-color="var(--cera-ombra)"></stop>
</radialGradient>
</defs>
<path class="seal__blob" data-blob d=""></path>
<circle class="seal__ring" cx="60" cy="60" r="34"></circle>
<circle class="seal__ring seal__ring--in" cx="60" cy="60" r="29"></circle>
<text class="seal__mono" x="60" y="68" text-anchor="middle" data-mono>W&A</text>
<path class="seal__shine" d="M36 44a30 30 0 0 1 22-14"></path>
</svg>
</div>
<p class="done__title">Request <em>sent</em></p>
<p class="done__line" data-done-line>Employment · Wed 5 Nov, morning</p>
<p class="done__note">We’ll confirm the time by email.</p>
<button class="again" type="button" data-again>New request</button>
</div>
</div>
</section>
<p class="sr" aria-live="polite" data-status></p>
<svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3l14 8.2-6.2 1.4 3.6 6.8-2.6 1.4-3.6-6.8L5 18.6z"></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.
33 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 “Law firm intake form” from Animorio and fit it into my siteBehind the pills there is a single dark element, placed with the x, y, width and height of the chosen pill, read with getBoundingClientRect. When the choice changes it goes to the new rectangle with back.out and, at the same time, starts from a six-degree skewX towards the travel and a 0.9 scaleY that spring back: it looks like a drop sliding.
The old questions rise six pixels and fade in just over two tenths of a second, staggered; only then is the content replaced. The container’s height is locked in pixels: the new one is measured and reached with back.out, while the new pieces come in from below one after another. Two texts are never on top of each other.
At start the questions of every area are built one at a time and the tallest card is measured; the card is placed where the tallest one would sit in the middle. So it only grows and shrinks downwards and the title never moves.
The edge of the wax is a path worked out once, a circle whose radius adds four waves of different frequency. It comes down with power3.in from 1.4 times its size and rotated, on impact it squashes in width and returns with elastic.out, while a thin ring spreads and fades and the card jolts by a pixel and a half. The wax has a radial gradient with tones worked out from the accent colour.
| Name | File | Default | What it changes |
|---|---|---|---|
FIRM | script.js | Wren & Ashcombe | The name of the invented law firm, at the top of the card. |
ACCENT | script.js | #8a2a2b | The colour of the wax, the button and the choices. |
MONOGRAM | script.js | W&A | The letters pressed into the seal. |
SPRING | script.js | 1.5 | How much the height bounces when the questions change. |
SWAP | script.js | 0.22 | The seconds the old questions take to leave before the new ones. |
STAMP | script.js | 0.32 | The seconds the seal takes to come down and press. |
TYPE_SPEED | script.js | 15 | The letters per second the autopilot types. |
PAUSE | script.js | 1.2 | The seconds the autopilot waits between rounds. |
For the site of a law firm, a notary, an accountant or any practice that gets different requests by area: the right questions for each one, without one very long form for everybody.
The card takes the width minus the margins, spacing and heights tighten with the screen height and, when it is short, the subtitle and the advice lines step aside. The real field uses 16-pixel text on touch screens, so Safari doesn’t zoom the page.
No pointer, no springs and no falling seal: the form is already filled in for an employment question, and area changes and the confirmation arrive with a fade.
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 11 KB; the libraries: GSAP 28 KB.
Tested on 29 October 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.