
The elastic button
Buttons, Hover, Text
A work app’s week calendar: five days, six hours, events to pick up and move. The event lifts and tilts, the slot under it lights up and hops from cell to cell, red if taken; on release the event lands on a spring or goes home with a shake.
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>
<!--
"Week 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>Week 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">
<!-- a work week: five days, six hours, a handful of events; pick one up and it lifts, the free slot
under it lights up, and on release it springs into place or goes back if the slot is taken -->
<section class="wk" data-wk aria-label="Week calendar">
<header class="wk__head">
<span class="wk__title">
<b>This week</b>
<span>16 to 20 November</span>
</span>
<span class="wk__note" aria-live="polite"><span class="wk__roll"><span data-note>Drag an event to move it</span></span></span>
</header>
<div class="wk__days" data-days aria-hidden="true"></div>
<div class="wk__body">
<div class="wk__hours" data-hours aria-hidden="true"></div>
<div class="wk__grid" data-grid>
<span class="wk__slot" data-slot aria-hidden="true"></span>
<span class="wk__now" data-now aria-hidden="true"><i data-now-tag></i></span>
</div>
</div>
</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.
15 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 “Week calendar” from Animorio and fit it into my siteEach event only knows its day, its first row and how long it lasts. Its x and y in pixels come from the grid’s width and height divided by five and by six, worked out again on resize.
Lift, carry, drop: three functions working in the grid’s own pixels. The real pointer and the demo’s pointer call the same ones, so what you see by itself is what happens by hand.
While the event follows the finger, it is the slot that snaps to the nearest cell: you see at once where it will go and whether the place is free. Only on release does the event join it.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #5b5bf0 | The colour of the slot where the event lands. |
TONES | script.js | #5b5bf0, #0f9f8c, #d9822b, #c2419c, #3d6fd9 | The events’ colours, separated by a comma. |
FIRST_HOUR | script.js | 9 | The grid’s first hour. |
TODAY | script.js | 2 | Today’s day (0 = Monday, 4 = Friday). |
NOW | script.js | 1.65 | The current time, in rows from the first hour (1.65 = 10:39 when starting at 9). |
SPRING | script.js | 1.6 | How much the event bounces when it lands (0 = none). |
LOOP | script.js | true | Left alone, a pointer moves two events. |
In a planner or work calendar app, on a studio’s booking page, in a dashboard with shifts; and wherever things are moved on a grid of days and hours: classes, meeting rooms, deliveries.
The same card: events are dragged with a finger without scrolling the page (touch-action: none on the grid). The rows are also sized on the window’s height.
The event follows the finger without lifting or tilting and the slot goes from cell to cell with no spring; on release the event is already in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.4 KB; the libraries: GSAP 28 KB.
Tested on 19 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.