
The elastic button
Buttons, Hover, Text
The shifts of a food drive that need covering: every row has the job, the time, the places already taken by avatars and the free ones. With “Sign up” your avatar drops into the first free place and settles, the row takes on colour, the button becomes “You’re in” with a tick and at the top the count of places left goes down by one.
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>
<!--
"Volunteer shift sign-up" 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>Volunteer shifts</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 volunteer shifts of a charity's food drive: every shift shows who is in and the places
still open; Sign up drops your avatar into the free place and the count of places goes down -->
<section class="vs" data-vs aria-label="Volunteer shifts">
<header class="vs__head"><span class="vs__title"><strong>Saturday food drive</strong><span>Riverside Hall, 6 December</span></span><span class="vs__left"><span class="vs__roll"><b data-outleft>3</b></span><span data-outword>places left</span></span></header>
<ul class="vs__list">
<li class="vs__row" data-row data-size="4" data-in="AK:#f2b84b,MO:#7cc6a4,JS:#9db4f5">
<span class="vs__what"><strong>Sorting donations</strong><span>9:00 to 11:00</span></span>
<span class="vs__slots" data-slots></span>
<button class="vs__btn" type="button" data-sign aria-pressed="false"><span class="vs__face" data-face="ask">Sign up</span><span class="vs__face" data-face="in"><svg viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="m3.600 8.300 2.900 2.900 5.900-6.500"></path></svg>You’re in</span><span class="vs__face" data-face="full">Full</span></button>
</li>
<li class="vs__row" data-row data-size="3" data-in="LE:#e58a7b">
<span class="vs__what"><strong>Packing boxes</strong><span>11:00 to 13:00</span></span>
<span class="vs__slots" data-slots></span>
<button class="vs__btn" type="button" data-sign aria-pressed="false"><span class="vs__face" data-face="ask">Sign up</span><span class="vs__face" data-face="in"><svg viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="m3.600 8.300 2.900 2.900 5.900-6.500"></path></svg>You’re in</span><span class="vs__face" data-face="full">Full</span></button>
</li>
<li class="vs__row" data-row data-size="2" data-in="TN:#c9a4e8,RB:#8fd0d8">
<span class="vs__what"><strong>Driving deliveries</strong><span>13:00 to 15:00</span></span>
<span class="vs__slots" data-slots></span>
<button class="vs__btn" type="button" data-sign aria-pressed="false"><span class="vs__face" data-face="ask">Sign up</span><span class="vs__face" data-face="in"><svg viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="m3.600 8.300 2.900 2.900 5.900-6.500"></path></svg>You’re in</span><span class="vs__face" data-face="full">Full</span></button>
</li>
</ul>
</section>
<span class="live" aria-live="polite" data-live></span>
<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.
27 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 “Volunteer shift sign-up” from Animorio and fit it into my siteEvery row says in the HTML how many places it has and who is already in. The script draws a ring per place and puts an avatar on the taken ones: changing a shift only takes changing two attributes.
Your avatar is born inside the first free place, already centred by CSS, and GSAP brings it in from above on a spring: at the end it is exactly on the ring, with no sums.
The places left are the sum of the free places of all rows, worked out again on every tap: the number rolls down when you sign up and up when you leave.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #e4572e | The colour of your avatar, of the shift you took and of the places count. |
DROP | script.js | 26 | From how many pixels above your avatar drops. |
SPRING | script.js | 1 | How much the avatar and the button bounce. |
On the site of a charity, a parish, a school or a festival looking for volunteers for an event; with other words it carries the slots of a residents’ meeting, the places on a course, the tables of a community dinner or who brings what to a party.
The list is at most 344 pixels wide and about 290 tall, and narrows with the screen: the shift’s name shortens with an ellipsis, the button stays 98 pixels wide and 40 tall. In a very short window the rows move closer. Everything is thumb-sized and nothing depends on hover.
Your avatar appears already in its place, without dropping; the button cross-fades to its new words with the tick already drawn and the number of places changes without rolling. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.3 KB; the libraries: GSAP 28 KB.
Tested on 28 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.