
The elastic button
Buttons, Hover, Text
The Roll back button of the panel of an invented developer platform, Halyard, in dark glass: version v2.14.0 throws errors in four regions. Pressed, the light button turns dark and walks the regions one after the other: a light runs backwards along each line, the time in milliseconds is written, the version tag rolls to v2.13.2 and the error chart falls. It lands on Rolled back with a self-drawing check and the panel cooling down.
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>
<!--
"Rollback 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 Rollback button with the regions going back to the last version</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/geist-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the release panel of Halyard, an invented hosting platform: version v2.14.0 is throwing errors. The Roll back
button walks the four regions one after the other, a light runs back along each line, the version tag rolls
to v2.13.2 and the time in milliseconds is written; the error rate falls and the button lands on Rolled back -->
<section class="card" data-card aria-label="atlas-api, production">
<header class="head">
<span class="mark" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M12 3.5 19.5 8v8L12 20.5 4.5 16V8z"/><path d="M12 8.2v7.6M8.6 10.2 12 8.2l3.4 2"/></svg>
</span>
<div class="head__name">
<p class="head__title">atlas-api</p>
<p class="head__sub">Production <span class="mono" data-current>v2.14.0</span></p>
</div>
<div class="errs" data-errs>
<svg class="errs__spark" viewBox="0 0 64 22" preserveAspectRatio="none" aria-hidden="true">
<path class="errs__area" data-spark-area d=""/>
<polyline class="errs__line" data-spark points=""/>
</svg>
<div class="errs__text">
<span class="errs__num mono" data-errs-num>4.8%</span>
<span class="errs__label">errors</span>
</div>
</div>
</header>
<ul class="regions" data-regions>
<li class="region" data-region data-ms="38">
<span class="region__name">Frankfurt <span class="mono">fra1</span></span>
<span class="region__line" aria-hidden="true"><i class="region__glow" data-glow></i><i class="region__comet" data-comet></i></span>
<span class="region__ms mono" data-ms-out></span>
<span class="ver mono" data-ver><span class="ver__in">v2.14.0</span></span>
</li>
<li class="region" data-region data-ms="71">
<span class="region__name">Virginia <span class="mono">iad1</span></span>
<span class="region__line" aria-hidden="true"><i class="region__glow" data-glow></i><i class="region__comet" data-comet></i></span>
<span class="region__ms mono" data-ms-out></span>
<span class="ver mono" data-ver><span class="ver__in">v2.14.0</span></span>
</li>
<li class="region" data-region data-ms="118">
<span class="region__name">Singapore <span class="mono">sin1</span></span>
<span class="region__line" aria-hidden="true"><i class="region__glow" data-glow></i><i class="region__comet" data-comet></i></span>
<span class="region__ms mono" data-ms-out></span>
<span class="ver mono" data-ver><span class="ver__in">v2.14.0</span></span>
</li>
<li class="region" data-region data-ms="164">
<span class="region__name">Sydney <span class="mono">syd1</span></span>
<span class="region__line" aria-hidden="true"><i class="region__glow" data-glow></i><i class="region__comet" data-comet></i></span>
<span class="region__ms mono" data-ms-out></span>
<span class="ver mono" data-ver><span class="ver__in">v2.14.0</span></span>
</li>
</ul>
<button class="rb" type="button" data-rb data-autoclic aria-label="Roll back production to v2.13.2">
<span class="rb__fill" data-fill aria-hidden="true"></span>
<span class="rb__shine" aria-hidden="true"></span>
<span class="rb__face rb__face--idle" data-idle>
<svg class="ico" data-undo viewBox="0 0 24 24" aria-hidden="true"><path d="M5.5 9.5a7.2 7.2 0 1 1-.6 5.6"/><path d="M5 4.8v4.9h4.9"/></svg>
<span>Roll back to <span class="mono">v2.13.2</span></span>
</span>
<span class="rb__face rb__face--busy" data-busy>
<svg class="ico ico--spin" data-spin viewBox="0 0 24 24" aria-hidden="true"><path d="M5.5 9.5a7.2 7.2 0 1 1-.6 5.6"/><path d="M5 4.8v4.9h4.9"/></svg>
<span class="rb__words">Rolling back <span class="where" data-where><span class="where__in">Frankfurt</span></span></span>
<span class="rb__clock mono" data-clock>0 ms</span>
</span>
<span class="rb__face rb__face--done" data-done>
<svg class="ico ico--ok" viewBox="0 0 24 24" aria-hidden="true"><path data-check d="m5.5 12.5 4.2 4.2 8.8-9.4"/></svg>
<span class="rb__words">Rolled back to <span class="mono">v2.13.2</span></span>
<span class="rb__clock mono" data-total>164 ms</span>
</span>
</button>
<p class="sr" aria-live="polite" data-say></p>
</section>
</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.
44 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 “Rollback button” from Animorio and fit it into my siteThere is only one button and on top of its light background sits a dark one that GSAP turns on at the click. The three faces, rest, work and done, are stacked: the hidden ones also get visibility: hidden, so screen readers skip them.
Each line has a CSS property --p that GSAP takes from 0 to 1: the comet (a gradient with a light head and a drop-shadow) sits at right: calc(var(--p) * (100% - its width)), so it follows the line whatever its length, even if the window changes halfway. Behind it the crossed part lights up with a scaleX starting from the right.
Each new version and region name is born below the old one: it comes in from yPercent 100 with back.out, the old one leaves to -100 and is removed. The tag changes colour with a CSS transition and makes a 6% scale jump there and back.
The error line is a window of twelve points over a longer series: a single number, the position of the window, goes from 0 to 6 and on every frame the interpolated points of the polyline and of the area below are worked out again. So the chart really slides right and the peak comes down, instead of warping.
| Name | File | Default | What it changes |
|---|---|---|---|
STEP | script.js | 0.7 | The seconds for each region: the light, the time and the new version. |
BOUNCE | script.js | 1.8 | How much the springs of the button and of the tags overshoot (0 = none). |
HOLD | script.js | 2.6 | The seconds the button stays on Rolled back before going back to rest. |
ERRORS_BEFORE | script.js | 4.8 | The error rate of the broken version, in percent. |
ERRORS_AFTER | script.js | 0.2 | The error rate once every region is back. |
FROM_VERSION | script.js | v2.14.0 | The broken version. |
TO_VERSION | script.js | v2.13.2 | The version the button rolls back to. |
LIGHT | script.js | #5eead4 | The colour of the light running back and of the good version. |
For the panel of a hosting platform, a cloud service, a release tool or any app where an important action has to be undone in several places: the person pressing sees where it has got to, how long each place takes and that the problem is going away.
The panel is 92% of the screen wide and the rows are sized on the height too; under 380 pixels the region codes hide, the chart narrows and the line keeps at least 14 pixels. The button stays 56 pixels tall and a tap does what a click does.
Nothing moves: the button changes face with a fade, the arrow does not spin, the light does not run and the line lights up at once, versions and names change with a fade, the check appears already drawn.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Geist Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.6 KB; the libraries: GSAP 28 KB.
Tested on 6 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.