
The star rating
Ratings, SVG, Hover
The button that signs you out of an account, asking first without opening a dialog. Pressed, the pill splits in two: “Stay” on the left and “Log out” in red on the right. Choose to leave and the avatar crosses the pill and goes through the door; what remains is a quiet “Sign in” with the arrow turned round.
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>
<!--
"Log out 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>Log out button</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">
<!-- a Log out button that asks before it acts: the pill splits in two, Stay and Log out;
on Log out the avatar leaves through the door and what remains is a quiet Sign in -->
<div class="lo" data-lo role="group" aria-label="Account">
<button class="lo__a" type="button" data-a>
<span class="lo__avatar" data-avatar aria-hidden="true">NK</span>
<span class="lo__roll"><span data-alabel>Log out</span></span>
</button>
<button class="lo__b" type="button" data-b tabindex="-1" aria-hidden="true">
<span class="lo__roll"><span data-blabel>Log out</span></span>
<svg class="lo__door" viewBox="0 0 24 24" aria-hidden="true">
<path d="M13 4.500h4.500A1.500 1.500 0 0 1 19 6v12a1.500 1.500 0 0 1-1.500 1.500H13"></path>
<g data-arrow><path d="M4 12h10M10.500 8.500 14 12l-3.500 3.500"></path></g>
</svg>
</button>
<span class="lo__say" data-say aria-live="polite"></span>
</div>
<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.
12 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 “Log out button” from Animorio and fit it into my siteThe two halves are two real buttons in a row: the second starts zero wide and hidden. Asking for confirmation means tightening the first and widening the second, each to the size of its label.
No dialog: the question is the shape itself. Staying is the gesture nearest the finger (same spot as the first tap), leaving asks you to move to the red: a careless double tap does not sign you out.
On leaving, the disc is measured, a copy is made above the pills and sent to the centre of the door icon, worked out again every frame because the widths are changing meanwhile.
The hidden half has tabindex -1 and aria-hidden until it is needed; Esc cancels and returns focus, and an aria-live region says every step.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #e5484d | The colour of the half that signs you out. |
GAP | script.js | 8 | The space between the two halves when the pill splits, in pixels. |
STRETCH | script.js | 1 | How elastic the two halves are when their width changes: 0.3 = stiff, 2 = very elastic. |
PAUSE | script.js | 1.1 | How many seconds “Signed out” stays before it becomes “Sign in”. |
LOOP | script.js | true | Left alone, the demo’s pointer logs out, signs back in, and once thinks better of it. |
At the bottom of the account menu, in a dashboard’s sidebar, in an app’s settings. The same splitting pill suits any action to confirm without a dialog: cancelling a plan, leaving a group, clearing a list.
The same button, 56 pixels tall: the two halves are wide enough for a thumb and stay in a row even on a narrow screen.
The halves change width and label at once, the avatar does not fly and it goes straight from “Log out” to “Sign in”. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.1 KB; the libraries: GSAP 28 KB.
Tested on 20 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.