
The elastic button
Buttons, Hover, Text
A week’s bin collection calendar: pick a day and the dark tile slides under it, the bin takes the colour of what is collected, lifts its lid and lets it drop shut, and three lines say what, when and by what time. A switch sets the reminder for the evening before.
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>
<!--
"Bin collection calendar" 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>Bin collection calendar</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 week of the bin collection: pick a day and the bin takes that day's colour, lifts its lid
and says what goes out and by when; a switch sets the reminder for the evening before -->
<section class="bc" data-bc aria-label="Bin collection calendar">
<header class="bc__head">
<span class="bc__title">Collection days</span>
<span class="bc__zone">Zone B</span>
</header>
<div class="bc__week" data-week role="radiogroup" aria-label="Day of the week">
<span class="bc__pick" data-pick aria-hidden="true"><i></i></span>
</div>
<div class="bc__day" aria-live="polite">
<svg class="bc__bin" viewBox="0 -26 96 130" aria-hidden="true">
<ellipse class="bin__shade" cx="48" cy="97" rx="30" ry="4"></ellipse>
<g data-bin>
<circle class="bin__wheel" cx="30" cy="92" r="6"></circle>
<circle class="bin__hub" cx="30" cy="92" r="2"></circle>
<path class="bin__body" d="M24 34h48l-4.600 52a6 6 0 0 1-6 5.500H34.600a6 6 0 0 1-6-5.500Z"></path>
<path class="bin__rib" d="M38 44l2 38M48 44v38M58 44l-2 38"></path>
<path class="bin__lip" d="M21 30h54a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H21a2 2 0 0 1-2-2v-2a2 2 0 0 1 2-2Z"></path>
<g transform="translate(76 29)"><g data-lid>
<path class="bin__lid" d="M-58 -1.500a4 4 0 0 1 4-4h50a4 4 0 0 1 4 4v1.500h-58Z"></path>
<path class="bin__grip" d="M-34 -5.500v-2.500a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v2.500"></path>
</g></g>
</g>
</svg>
<div class="bc__text">
<span class="bc__when"><span data-when></span></span>
<b class="bc__what"><span data-what></span></b>
<span class="bc__by"><span data-by></span></span>
</div>
</div>
<button class="bc__remind" type="button" data-remind aria-pressed="false">
<svg class="bc__bell" viewBox="0 0 20 20" aria-hidden="true"><g data-bell><path d="M5.500 13.500V9a4.500 4.500 0 0 1 9 0v4.500l1.300 1.500H4.200Z"></path><path d="M8.300 17a1.800 1.800 0 0 0 3.400 0"></path></g></svg>
<span class="bc__rtext">Remind me the evening before</span>
<span class="bc__switch" aria-hidden="true"><i data-knob></i></span>
</button>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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
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 “Bin collection calendar” from Animorio and fit it into my siteThe days are buttons with the radio role inside a radiogroup: arrows move the choice, Tab enters only once. The tile is a single element moved by 100 xPercent per cell, with a child that stretches.
The lid is drawn around zero inside a group moved onto the hinge; an animated number writes the angle into the transform attribute. The timeline shuts it, lifts it with back.out, holds it and lets it drop with a bounce.
Each day carries its colour: a CSS variable on the card hands it to the bin, the “when” line and the shadow under the card, and transitions blend it. On Sunday a class takes everything to grey.
| Name | File | Default | What it changes |
|---|---|---|---|
TODAY | script.js | 0 | Today’s day in the week: 0 Monday, 6 Sunday. |
OUT_BY | script.js | 7:00 | The time by which the bin has to be out. |
LID | script.js | 40 | How many degrees the lid lifts. |
OPEN | script.js | 1.1 | How many seconds the lid stays open. |
HOLD | script.js | 1.2 | On its own: how many seconds it stops on each day. |
LOOP | script.js | true | Left alone, a pointer goes through the week and sets the reminder. |
In the app or site of a council or a waste company, in the app of a block of flats or a rental home; and wherever a week has a different thing each day: a canteen’s menu, a gym’s classes, deliveries.
The same component: day cells stay at least 44 pixels tall, the bin and the lines shrink with the window’s height, the reminder row is one whole tap target.
No sliding, lid or rolls: the tile, the bin’s colour, the lines and the switch change at once.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.2 KB; the libraries: GSAP 28 KB.
Tested on 18 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.