
The elastic button
Buttons, Hover, Text
The button that blocks a person from their profile row, on black: on tap a red ring closes around the avatar and a slash crosses it, the face loses its colour, the name dims and the button becomes “Unblock”. Another tap and slash and ring withdraw, the face comes back with a bounce.
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>
<!--
"Block user 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>Block user 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">
<!-- the button that blocks a person from their profile row: a ring and a slash draw themselves over the avatar,
the name dims and the button turns into Unblock -->
<div class="bu" data-bu>
<span class="bu__face" aria-hidden="true">
<span class="bu__pic" data-pic>TR</span>
<svg viewBox="0 0 44 44"><circle data-ring cx="22" cy="22" r="20" pathLength="1" transform="rotate(-45 22 22)"></circle><path data-slash pathLength="1" d="M7.900 7.900l28.200 28.200"></path></svg>
</span>
<span class="bu__who">
<b data-name>Theo Rask</b>
<span class="bu__sub"><span data-sub>@theo.rask</span></span>
</span>
<button class="bu__btn" type="button" aria-pressed="false" data-btn><span class="bu__label"><span data-label>Block</span></span></button>
<span class="bu__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.
14 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 “Block user button” from Animorio and fit it into my siteThey are an SVG circle and line with pathLength 1: the dashoffset goes from 1 to 0, the ring first and then the slash; the circle is rotated in the transform attribute so it starts at the top left.
A class on the pill greys and dims it with a transition; GSAP only gives it the slight shrink and the bounce on the way back.
The button and the line below roll out and come back with the new text; aria-pressed tells the state.
The same button unblocks: the slash withdraws first, then the ring, the reverse of the way in.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #ff5c50 | The colour of the Block button, of the ring and of the slash. |
NAME | script.js | Theo Rask | The person’s name: the initials and the handle come from it. |
DRAW | script.js | 0.5 | In how many seconds the ring and the slash draw themselves. |
SPRING | script.js | 1 | How much the button and the avatar bounce: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer blocks the person and then unblocks them. |
In apps where people write to, follow or comment on each other: social, chat, forums, games, marketplaces. In the followers list, on the profile, in the privacy settings, next to anyone who can be blocked.
The same pill, 300 pixels wide at most and 68 tall: the button is 36 pixels tall, a long name is cut and the line below stays on one line.
Ring and slash appear already drawn, the words change without rolling and the avatar changes colour with its transition. 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 4.1 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.