Skip to content
animorio
IT
All components

Bin collection calendar

Calendars, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.2 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On white, a card: at the top “Collection days” and the zone; below, the week in seven cells, each with the day, the date and a short bar in the colour of what is collected (none on Sunday); then a wheelie bin drawn in flat colours, and beside it three lines: “Tomorrow”, “Paper and card”, “Out by 7:00, lid closed”; at the bottom the reminder row with the bell and the switch. Picking a day, the dark tile slides under the cell on a spring and stretches in the direction of travel, the bin changes colour, squashes slightly, lifts its lid on the hinge, holds it up for a moment and lets it drop with a bounce on the rim; the three lines roll in the direction of the change. On Sunday the bin turns light grey and the card says “No collection”. Tapping the reminder, the switch’s knob slides while stretching and the bell swings.

How it works

Seven real radios

The 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 on its hinge

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.

The colour in a variable

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.

Values to change

NameFileDefaultWhat it changes
TODAYscript.js0Today’s day in the week: 0 Monday, 6 Sunday.
OUT_BYscript.js7:00The time by which the bin has to be out.
LIDscript.js40How many degrees the lid lifts.
OPENscript.js1.1How many seconds the lid stays open.
HOLDscript.js1.2On its own: how many seconds it stops on each day.
LOOPscript.jstrueLeft alone, a pointer goes through the week and sets the reminder.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

No sliding, lid or rolls: the tile, the bin’s colour, the lines and the switch change at once.

Pitfalls

  • The demo’s calendar is made up: the real one changes street by street and on holidays, and comes from the council or the waste company.
  • Colour is not enough: each day says in words what is collected, in the button’s label and in the lines beside the bin. Bin colours change from town to town.
  • The reminder in the demo is just the switch: a real notification asks the system for permission and has to be scheduled on the device or the server.

Libraries

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.

Testing

Tested on 18 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components