
The elastic button
Buttons, Hover, Text
The Snooze menu of an email app, on white: the button’s alarm clock trembles as soon as the pointer passes over it, the menu of times opens from the button on a spring and a soft light slides from line to line, lighting up the time on the right in the clock’s colour. Once a time is chosen, the menu closes back into the button and the email folds into a slim notice, Snoozed until tomorrow, 08:00, with Undo bringing it back.
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>
<!--
"Email Snooze menu" 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>The Snooze menu of an email whose times light up</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">
<!-- one gesture: choose. An email row with a Snooze button: the alarm clock trembles on hover, the menu of
times opens from the button, the time of each line lights up under the pointer, and once a time is chosen
the menu closes back into the button and the email folds away into a slim Snoozed notice with Undo -->
<section class="inbox" data-inbox aria-label="Inbox">
<div class="slot" data-slot>
<article class="mail" data-mail>
<span class="mail__face" aria-hidden="true">NL</span>
<div class="mail__body">
<p class="mail__top"><span class="mail__from">Noor Lindqvist</span><span class="mail__at">9:41</span></p>
<p class="mail__subject">Q4 budget, final draft</p>
<p class="mail__preview">Numbers are in. Can you look before Friday’s review?</p>
</div>
<button class="snooze" type="button" data-snooze aria-haspopup="menu" aria-expanded="false" aria-controls="snooze-menu">
<span class="snooze__press" data-press>
<svg class="clock" data-clock viewBox="0 0 24 24" aria-hidden="true">
<path class="clock__bell" d="M5.2 3.6 2.9 5.9M18.8 3.6l2.3 2.3"/>
<circle cx="12" cy="13" r="7.2"/>
<path class="clock__hand" data-hand d="M12 9.2V13l2.4 1.6"/>
<path d="M7.2 19.6 6 21M16.8 19.6 18 21"/>
</svg>
<span class="snooze__label">Snooze</span>
</span>
</button>
</article>
<div class="notice" data-notice role="status" aria-live="polite">
<span class="notice__row" data-notice-row>
<svg class="notice__clock" viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12.6" r="7.2"/>
<path d="M12 8.8v3.8l2.4 1.6"/>
</svg>
<span class="notice__text">Snoozed until <b data-until>tomorrow, 08:00</b></span>
<button class="undo" type="button" data-undo>Undo</button>
</span>
</div>
</div>
<div class="menu" id="snooze-menu" data-menu role="menu" aria-label="Snooze until">
<div class="menu__inner" data-menu-inner>
<p class="menu__head">Snooze until</p>
<span class="menu__lit" data-lit aria-hidden="true"></span>
<button class="item" type="button" role="menuitem" data-item data-until-text="later today, 18:00"><span class="item__name">Later today</span><span class="item__time">18:00</span></button>
<button class="item" type="button" role="menuitem" data-item data-until-text="tomorrow, 08:00"><span class="item__name">Tomorrow</span><span class="item__time">Fri 08:00</span></button>
<button class="item" type="button" role="menuitem" data-item data-until-text="Saturday, 09:00"><span class="item__name">This weekend</span><span class="item__time">Sat 09:00</span></button>
<button class="item" type="button" role="menuitem" data-item data-until-text="Monday, 08:00"><span class="item__name">Next week</span><span class="item__time">Mon 08:00</span></button>
<span class="menu__rule" aria-hidden="true"></span>
<button class="item item--pick" type="button" role="menuitem" data-item data-until-text="Tue 3 Nov, 08:00"><span class="item__name">Pick a date</span>
<svg class="item__cal" viewBox="0 0 24 24" aria-hidden="true"><rect x="4" y="5.5" width="16" height="14" rx="2.6"/><path d="M4 10h16M8.5 3.5v4M15.5 3.5v4"/></svg>
</button>
</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.
37 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 “Email Snooze menu” from Animorio and fit it into my siteThe button holds an SVG of the alarm clock: on hover a short timeline swings it around a point just below the centre, back and forth by WOBBLE degrees with yoyo, and brings it back to zero with elastic.out. At the same time the hand moves on by thirty degrees with back.out, around the centre of the dial (svgOrigin).
The menu has its transform origin at the top right, under the button: it starts at scale 0.86 and 8 pixels higher and reaches 1 with back.out(1.5). The lines inside come down with a three-hundredths stagger. To close it, content and size go down together towards the button.
Under the lines there is a single light grey rectangle: on the line it reaches it takes that line’s offsetTop and height, with back.out, so it moves from line to line instead of switching on and off. The line’s time turns the clock’s colour, at weight 600, and shifts by a pixel.
The email row and the notice sit on top of each other in the same box. First the email slides 18 pixels and fades, then the box shrinks to the notice’s height with power3.inOut, and only then does the notice come in: never two pieces of text in the same place at once. Undo does the same in reverse, with the box growing back with a small bounce.
| Name | File | Default | What it changes |
|---|---|---|---|
OPEN_TIME | script.js | 0.42 | How long the menu takes to open from the button, in seconds. |
WOBBLE | script.js | 9 | How many degrees the alarm clock trembles when the pointer passes over the button. |
FOLD_TIME | script.js | 0.5 | How long the email takes to fold into the Snoozed notice, in seconds. |
LIT_SPRING | script.js | 1.4 | How much the light bounces as it moves from one line of the menu to the next (1 means no bounce). |
PILOT_PICK | script.js | 2 | Which line the drawn pointer picks: 1 Later today, 2 Tomorrow, 3 This weekend, 4 Next week. |
ACCENT | script.js | #e2662b | The colour of the alarm clock, of the lit time and of the open button. |
In email, task and messaging apps, to put something off to a precise moment without losing it: the menu shows the real time of each choice straight away, the sliding light tells you where you are, and the notice with Undo reassures you that the email will come back.
The row is at most 94% of the window wide; under 360 pixels the message preview hides and the row gets shorter, and the menu opens under the button inside the frame. You tap with your finger: the clock’s tremble is there only with a mouse.
No movement: the menu appears and disappears with a fade, the light jumps straight to the line, the clock does not tremble, the email and the notice swap with fades and the drawn pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.0 KB; the libraries: GSAP 28 KB.
Tested on 29 October 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.