
The elastic button
Buttons, Hover, Text
The notice that appears when a session is about to expire: the seconds roll inside a draining ring that turns red for the last ones and beats at every second. “Stay signed in” refills it with a bounce; at zero the ring makes way for a padlock that closes and the card asks to sign in again.
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>
<!--
"Session timeout dialog" 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>Session timeout dialog</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">
<!-- the notice of a session about to expire: the seconds roll inside a draining ring,
Stay signed in refills it, and at zero the card locks itself and asks to sign in again -->
<section class="st" data-st role="alertdialog" aria-labelledby="st-title" aria-describedby="st-text">
<div class="st__dial" data-dial aria-hidden="true">
<svg class="st__ring" viewBox="0 0 64 64">
<circle class="st__track" cx="32" cy="32" r="27"></circle>
<circle class="st__arc" data-arc cx="32" cy="32" r="27" pathLength="1" transform="rotate(-90 32 32)"></circle>
</svg>
<span class="st__num"><span data-num>6</span></span>
<svg class="st__lock" data-lock viewBox="0 0 28 28">
<path data-shackle d="M9.500 13V9.800a4.500 4.500 0 0 1 9 0V13"></path>
<rect x="6.500" y="13" width="15" height="10.500" rx="3"></rect>
<path d="M14 17.300v2.200"></path>
</svg>
</div>
<h1 class="st__title" id="st-title"><span data-title>Still there?</span></h1>
<p class="st__text" id="st-text"><span data-text>We’ll sign you out soon to keep your account safe.</span></p>
<div class="st__keys">
<button class="st__btn" type="button" data-stay><span class="st__btntext"><span data-staylabel>Stay signed in</span></span></button>
<button class="st__link" type="button" data-out>Log out</button>
</div>
<span class="st__say" data-say aria-live="assertive"></span>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.
16 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Session timeout dialog” from Animorio and fit it into my siteA linear tween takes a number from SECONDS to zero; on every frame one function derives the ring’s arc and the whole second to show.
Below WARN a class changes the colour of disc, ring and number through a CSS variable, and at every second that ticks the disc gives a beat.
The count’s tween is stopped, another takes the number back to the top in six tenths, the disc bounces on a spring and the count starts again.
At the end of the tween the card goes to its locked state: the padlock scales in, the shackle drops with a bounce and the words roll.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #f2872e | The colour of the ring and of the seconds while there is time. |
LOW | script.js | #ec4136 | The colour of the last seconds. |
SECONDS | script.js | 6 | How many seconds the count starts from before signing out. |
WARN | script.js | 3 | From how many seconds the ring changes colour and beats every second. |
SPRING | script.js | 1 | How much the refilling ring, the padlock and the buttons bounce: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer stays in at the last moment, then lets it expire and signs in again. |
In apps with sensitive data: banking, health, admin panels, work portals, checkouts. It appears after a spell of inactivity, before closing the session, and also suits a cart or a booking held for a few minutes.
The same card, 284 pixels wide at most: the button is 44 pixels tall, the text wraps into two balanced lines and everything fits a short screen.
The count still goes on, because it is the data: the number changes without rolling and the ring steps down a second at a time. No bounces: the padlock and the words appear in place. The demo does not click by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.5 KB; the libraries: GSAP 28 KB.
Tested on 23 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.
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.