
The elastic button
Buttons, Hover, Text
A writing app’s draft with Publish still off: resting on it, a dark tooltip lists what is missing, a title and a cover. Pressed anyway, the button shakes its head and lights the field to fill. As you write the title and pick the cover the count on the button goes down, and the next time the tooltip ticks off, one after the other, the steps you did; when nothing is missing the button fills with ink and publishes.
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>
<!--
"Publish checklist tooltip" 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 tooltip on the Publish button that says what’s missing</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" data-stage>
<!-- a draft in a writing app: Publish is not ready yet. Resting on it, a tooltip lists what is missing; the
count on the button goes down as you fill the draft, and the tooltip ticks off what you did since you last
looked. When nothing is missing the button turns on -->
<section class="draft" data-draft aria-label="Draft">
<button class="cover" type="button" data-cover aria-label="Add a cover image" aria-pressed="false">
<span class="cover__empty" data-cover-empty>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 6.5A1.5 1.5 0 0 1 5.5 5h13A1.5 1.5 0 0 1 20 6.5v11a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 17.5zM4 15l4.5-4.5 4 4 2.5-2.5L20 17"/><circle cx="15.5" cy="9" r="1.4"/></svg>
<span>Add cover image</span>
</span>
<span class="cover__img" data-cover-img aria-hidden="true">
<svg viewBox="0 0 400 120" preserveAspectRatio="xMidYMid slice">
<defs>
<linearGradient id="cielo" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#f6efe6"/>
<stop offset="1" stop-color="#f3d9c4"/>
</linearGradient>
<linearGradient id="colle" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#c9b8a8"/>
<stop offset="1" stop-color="#b6a392"/>
</linearGradient>
</defs>
<rect width="400" height="120" fill="url(#cielo)"/>
<circle class="sole" data-sun cx="262" cy="70" r="20" fill="#f0a374"/>
<path d="M0 86 C60 70 110 74 160 84 S260 96 310 82 400 74 400 74 V120 H0Z" fill="#dcc7b4"/>
<path d="M0 100 C70 90 140 92 200 100 S320 110 400 96 V120 H0Z" fill="url(#colle)"/>
<path d="M118 62h36M126 57h20" stroke="#cbb4a2" stroke-width="2" stroke-linecap="round"/>
</svg>
</span>
</button>
<input class="title" data-title type="text" placeholder="Untitled" maxlength="40" aria-label="Title" autocomplete="off" spellcheck="false">
<div class="lines" aria-hidden="true"><span></span><span></span><span></span></div>
<div class="foot">
<span class="meta">Draft · saved</span>
<div class="pub" data-pub>
<button class="publish" type="button" data-publish aria-disabled="true" aria-describedby="tip">
<span class="publish__fill" data-fill aria-hidden="true"></span>
<span class="publish__row">
<svg class="publish__tick" data-ptick viewBox="0 0 24 24" aria-hidden="true"><path d="M6 12.5l4 4 8-9"/></svg>
<span class="publish__win" data-lwin><span class="publish__lab" data-lab>Publish</span></span>
<span class="chip" data-chip aria-hidden="true"><span class="chip__n" data-chip-n>2</span></span>
</span>
</button>
<div class="tip" id="tip" role="tooltip" data-tip>
<div class="tip__in" data-tip-in>
<div class="tip__head"><span class="tip__headwin"><span data-head>2 steps before publishing</span></span></div>
<ul class="tip__list">
<li class="step" data-step="title">
<svg class="mark" viewBox="0 0 18 18" aria-hidden="true"><circle class="mark__ring" cx="9" cy="9" r="7"/><circle class="mark__dot" data-dot cx="9" cy="9" r="7"/><path class="mark__tick" data-tick d="M5.6 9.3l2.2 2.2 4.6-4.9"/></svg>
<span class="step__txt">Add a title<span class="step__strike" data-strike></span></span>
</li>
<li class="step" data-step="cover">
<svg class="mark" viewBox="0 0 18 18" aria-hidden="true"><circle class="mark__ring" cx="9" cy="9" r="7"/><circle class="mark__dot" data-dot cx="9" cy="9" r="7"/><path class="mark__tick" data-tick d="M5.6 9.3l2.2 2.2 4.6-4.9"/></svg>
<span class="step__txt">Add a cover image<span class="step__strike" data-strike></span></span>
</li>
</ul>
<span class="tip__tail" aria-hidden="true"></span>
</div>
</div>
</div>
</div>
</section>
<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.
26 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 “Publish checklist tooltip” from Animorio and fit it into my sitePublish is not disabled but aria-disabled: so it gets the pointer and the keyboard focus, shows the tooltip and, pressed, answers with a shake instead of doing nothing. The tooltip is a role="tooltip" tied with aria-describedby.
The first time it waits DELAY seconds with the pointer resting (a gsap.delayedCall, cancelled on leaving); leaving it fades in 0.16 seconds, and for GRACE seconds coming back shows it at once. With the keyboard focus it shows without waiting, Esc closes it; on a phone a tap on the off button opens it.
The script keeps two lists: the steps done and the steps the tooltip showed last time. On opening it ticks only the ones that changed, one every 0.18 seconds: the little circle with back.out, the tick drawn with stroke-dashoffset, the strike line with scaleX. If the tooltip is open while something changes, it ticks at once.
The number on the button and the sentence at the top of the tooltip change the same way: the old one leaves upwards in 0.12 seconds, only then the new one comes from below with back.out, so two words are never read together. At zero the number closes in width and goes.
The black is a layer inside the pill going from scale 0 to 1 in 0.42 seconds with power3.out, while the button grows by 4.5 per cent and comes back on an elastic spring. Publishing, the word changes, the label’s window widens to the real width of Published and the tick draws itself in front.
| Name | File | Default | What it changes |
|---|---|---|---|
DELAY | script.js | 0.5 | The seconds of the pointer resting on Publish before the tooltip shows. |
GRACE | script.js | 0.8 | The seconds after leaving in which, coming back over it, it shows at once. |
TYPE_SPEED | script.js | 0.055 | The seconds between one letter and the next when the drawn pointer writes the title. |
ACCENT | script.js | #5b5bf7 | The colour of the ticks and of the published button. |
TITLE | script.js | Notes on slow mornings | The title the drawn pointer writes. |
LABEL | script.js | Publish | The button label. |
LABEL_DONE | script.js | Published | The label after publishing. |
In an editor, a CMS, a blog or an app where a button stays off until something is missing: Publish, Send, Checkout, Create account. Instead of a silent grey button, one that says what is missing and ticks it off as you do it.
The card narrows to the screen width and the cover gets lower with the height; with no hover the tooltip opens by tapping the off button and closes by tapping outside.
No shakes, hops, bounces or opening circles: the tooltip, the ticks, the number and the cover appear with a fade and the button changes colour at once. The drawn pointer does not run.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.6 KB; the libraries: GSAP 28 KB.
Tested on 30 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.