
The elastic button
Buttons, Hover, Text
A team app’s notifications panel, on black: unread rows carry a light tint and a fuller title, and the bell at the top holds the count. Pressing Mark all as read turns the rows quiet one after another from the top, with a pass of light and a one-pixel settle, while the number on the badge rolls down until it disappears; then the rows leave together with the panel’s height and «You’re all caught up» appears with its thin line drawing.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React tab holds the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Mark all read panel" 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 notifications panel that marks everything as read</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" data-stage>
<!-- a team app's notifications: Mark all as read turns the unread rows off one by one from the top,
the bell's badge counts down to nothing, and the panel settles on "You're all caught up" -->
<div class="wrap" data-wrap>
<header class="bar">
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M3.5 13.5c2.6-5.2 6.8-7.7 13-8-1.9 4.9-5.6 8.3-11.4 9.1"/><path d="M5.6 14.4 9.8 10.2"/></svg>
Plover
</span>
<button class="bell" data-bell type="button" aria-label="Notifications, 4 unread">
<span class="bell__icon" data-bell-icon>
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M6.2 16.6V11a5.8 5.8 0 0 1 11.6 0v5.6l1.5 1.7H4.7Z"/>
<path class="bell__clapper" data-clapper d="M10 20.4a2.2 2.2 0 0 0 4 0"/>
</svg>
</span>
<span class="badge" data-badge aria-hidden="true">
<span class="badge__roll"><span class="badge__num" data-num-a>4</span><span class="badge__num" data-num-b></span></span>
</span>
</button>
</header>
<section class="panel" data-panel aria-label="Notifications">
<div class="panel__head">
<h1 class="panel__title">Notifications</h1>
<button class="mark" data-mark type="button">
<svg class="mark__icon" viewBox="0 0 24 24" aria-hidden="true">
<path class="mark__tick mark__tick--a" data-tick-a pathLength="1" d="M2.8 12.6 6.6 16.3 14.2 8.4"/>
<path class="mark__tick mark__tick--b" data-tick-b pathLength="1" d="M10.6 15.4 11.6 16.3 19.2 8.4"/>
</svg>
<span class="mark__label">Mark all as read</span>
</button>
</div>
<div class="panel__body" data-body aria-live="polite">
<ul class="list" data-list></ul>
<div class="empty" data-empty hidden>
<svg class="empty__art" viewBox="0 0 120 64" aria-hidden="true">
<path class="empty__line" data-draw pathLength="1" d="M18 34h22l5 9h30l5-9h22"/>
<path class="empty__line" data-draw pathLength="1" d="M18 34 29 14h62l11 20v16a4 4 0 0 1-4 4H22a4 4 0 0 1-4-4Z"/>
<path class="empty__line empty__line--accent" data-draw pathLength="1" d="M50 25.5 57 32 71 18"/>
</svg>
<p class="empty__title" data-empty-title>You’re all caught up</p>
<p class="empty__sub" data-empty-sub>Nothing new since 9:41</p>
</div>
</div>
</section>
</div>
<template data-tpl>
<li class="row" data-row>
<button class="row__hit" type="button" data-hit>
<span class="row__tint" data-tint aria-hidden="true"></span>
<span class="row__sweep" data-sweep aria-hidden="true"></span>
<span class="row__avatar" data-avatar aria-hidden="true"></span>
<span class="row__text">
<span class="row__title" data-title></span>
<span class="row__meta" data-meta></span>
</span>
<span class="row__time" data-time></span>
</button>
</li>
</template>
<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.
18 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 “Mark all read panel” from Animorio and fit it into my siteEach row has a layer behind it with the accent tint at 8.5%, and the title’s weight sits in a CSS variable, --w, used in font-variation-settings. Marking it read means fading the tint and taking --w from 600 to 440 with GSAP, which animates CSS variables too: no dot in front, and the change still reads clearly.
Inside the row, which has overflow hidden, a band with a gradient fading at both ends goes from xPercent -110 to 110 in 0.58 seconds with power2.inOut, beneath the text (z-index -1 with isolation: isolate on the row). At the same time the row dips one pixel in a tenth of a second and comes back with elastic.out: the settle that makes the change felt.
The number sits in a 19 pixel window with two numbers on top of each other that swap places. First the old one leaves downwards in 0.13 seconds, then the new one comes in from above with back.out: there are never two readable numbers in the same spot. At zero the badge closes with back.in; when the first new notification arrives it opens again with back.out and the bell swings on its hook.
At the end the panel’s height is locked in pixels, the rows rise away with a 0.05 second stagger and meanwhile the height moves to that of the empty state, measured beforehand while hidden. The tray drawing is made of paths with pathLength 1, written with stroke-dashoffset from 1 to 0; the blue tick arrives last with a small snap of scale.
| Name | File | Default | What it changes |
|---|---|---|---|
UNREAD | script.js | 4 | How many unread notifications arrive in the panel, from 2 to 5. |
ROW_GAP | script.js | 0.14 | How many seconds between one row going quiet and the next. |
ACCENT | script.js | #8fa8ff | The colour of the badge, the unread rows’ tint and the button. |
CAUGHT_UP_HOLD | script.js | 2.4 | How many seconds «You’re all caught up» stays before new notifications arrive. |
TEAM | script.js | Plover | The team app’s name, top left. |
In team apps, back offices and dashboards, where notifications pile up: the panel under the bell with a single button to clear it, showing row by row what has been marked as read and ending with a reassuring empty state. A single row can also be tapped to mark just that one.
The panel is at most 94% of the window wide and the rows are between 40 and 56 pixels tall depending on the height (clamp with vh), so the bar, the panel and four rows fit in the 341 by 410 box. Tapping a row marks it as read, like a click.
No movement: the tint and the title’s weight change with a fade, the pass of light and the settle are gone, the badge number fades (the old one disappears before the new one shows), the bell doesn’t swing and the empty state appears already drawn.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.8 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.