
The elastic button
Buttons, Hover, Text
A chat app’s notice when the connection drops, on white, in the style of real product interface pieces: a dark pill rises from the bottom on a spring, the wifi goes out arc by arc and a thin ring counts the seconds to the next try. Retry tries, fails the first time with a shake, the second time the arcs light up again, the notice turns light with «Back online» and a check and slides away, while the inbox lights up and the waiting message goes out.
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>
<!--
"Connection lost notice" 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 connection-lost notice that comes back online</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>
<!-- the inbox of a team chat app: the connection drops, a dark notice rises from the bottom with the wifi
going out arc by arc and a countdown to the next try; Retry tries, fails once with a shake, then the arcs
fill, the notice turns light with «Back online» and slides away, and the inbox lights up again -->
<section class="screen" data-screen aria-label="Inbox">
<header class="top">
<span class="brand"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v7a2.5 2.5 0 0 1-2.5 2.5H11l-4.5 3.5V16h0A2.5 2.5 0 0 1 4 13.5z"/></svg><span data-app>Halcyra</span></span>
<span class="top__title">Inbox</span>
</header>
<ul class="list" data-list>
<li class="row" data-row>
<span class="av" style="--av:#e8e1f7">NO</span>
<span class="row__txt"><span class="row__name">Noor Okafor</span><span class="row__msg">The deck is in the shared folder</span></span>
<span class="row__time">9:41</span>
</li>
<li class="row" data-row>
<span class="av" style="--av:#dff0e6">TB</span>
<span class="row__txt"><span class="row__name">Tomas Berg</span><span class="row__msg">Can we move the review to 3?</span></span>
<span class="row__time">9:28</span>
</li>
<li class="row" data-row>
<span class="av" style="--av:#f7e6da">LM</span>
<span class="row__txt"><span class="row__name">Lena Moreau</span><span class="row__msg">Sent you the new icons</span></span>
<span class="row__time">9:02</span>
</li>
<li class="row" data-row>
<span class="av" style="--av:#dde9f7">DK</span>
<span class="row__txt"><span class="row__name">Design crit</span><span class="row__msg">Ava: looks great, ship it</span></span>
<span class="row__time">8:47</span>
</li>
</ul>
<div class="draft" data-draft>
<span class="draft__txt">Running ten minutes late</span>
<span class="draft__state" data-draft-state>Waiting to send</span>
</div>
<div class="toast" role="status" aria-live="polite" data-toast>
<span class="wifi" aria-hidden="true">
<svg class="ring" viewBox="0 0 40 40"><circle class="ring__track" cx="20" cy="20" r="17"/><circle class="ring__run" cx="20" cy="20" r="17" data-ring/></svg>
<svg class="arcs" viewBox="0 0 24 24">
<path class="arc" data-arc d="M3.2 9.4a12.6 12.6 0 0 1 17.6 0"/>
<path class="arc" data-arc d="M6.3 12.6a8.2 8.2 0 0 1 11.4 0"/>
<path class="arc" data-arc d="M9.4 15.8a3.8 3.8 0 0 1 5.2 0"/>
<path class="arc arc--base" data-arc d="M11.1 19h1.8"/>
<path class="cross" data-cross d="M5 5l14 14"/>
</svg>
<svg class="tick" viewBox="0 0 24 24"><path data-tick d="M6 12.5l4 4 8-9"/></svg>
</span>
<span class="toast__txt">
<span class="toast__title"><span class="swap" data-title><span>You’re offline</span></span></span>
<span class="toast__sub" data-sub><span class="swap"><span>Retrying in <span class="digit" data-digit><span>5</span></span>s</span></span></span>
</span>
<button class="retry" type="button" data-retry>Retry</button>
</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.
43 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 “Connection lost notice” from Animorio and fit it into my siteThe notice is absolute at the bottom of the window: it starts at yPercent 160 and rises to 0 with back.out(1.5), while widening from 0.92 to 1, so it looks pushed up by a spring. It leaves with back.in.
The wifi is four paths: three arcs and the base. Offline, the three arcs go to 0.18 opacity one after the other from the outermost, and a red line draws itself over them with strokeDashoffset. On a try they light up the other way round, from the base outwards.
A circle with a strokeDasharray as long as its circumference empties linearly over the seconds of the count; every second the digit rolls: the old one rises and fades, the new one comes from below with back.out. At zero the try starts by itself.
On the first try of each loop only two arcs light up, then one falls back; the pill shakes with x keyframes (-7, 6, -4, 2, 0), the red line returns and a three-second count starts. The second try lights everything.
The pill goes from near black to white and the text from white to near black in one colour tween; the arcs take the accent colour and fade, and a check draws itself in their place. The inbox returns to full opacity and saturation, and the waiting message changes state.
| Name | File | Default | What it changes |
|---|---|---|---|
APP | script.js | Halcyra | The name of the invented chat app, written at the top. |
ACCENT | script.js | #2f6bff | The colour of the check, the arcs coming back and the mark. |
COUNTDOWN | script.js | 5 | The seconds before the notice tries again by itself. |
RISE | script.js | 0.7 | The seconds the notice takes to rise from the bottom on its spring. |
DIM | script.js | 0.5 | How much the inbox dims while offline (1 = not at all). |
HOLD | script.js | 1.6 | The seconds «Back online» stays before sliding away. |
For a chat, mail or collaboration app, a live dashboard, a phone app that has to say gently that the network dropped and when it came back, without blocking the screen.
The window takes the width of the box and a height measured in vh, the inbox rows tighten with the height, and the notice stays as wide as the window minus the margins; Retry stays big enough for a finger. A tap does what a click does.
No springs, shakes or rolls: the notice fades in and out, digits and titles change in place, the arcs and the check change without drawing themselves. The drawn pointer stays hidden.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.1 KB; the libraries: GSAP 28 KB.
Tested on 27 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.