
The slide-to-confirm button
Buttons, Physics, Transitions
The notification part of a lock screen, like a Dribbble shot: the big clock on a wallpaper of soft lights and five frosted glass notifications stacked as one, the two behind smaller and faded and the count of the rest on the edge. A tap fans the stack open downwards on a staggered spring, the clock shrinks to make room and the glass catches the light; a notification swiped sideways is archived and the others rise to close the gap; Show less folds 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>
<!--
"Fanning notification stack" 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 notification stack that fans open on the lock screen</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 notification part of a lock screen: a soft wallpaper of our own, the big clock and a stack of five
notifications. A tap fans the stack open downwards on a staggered spring; a notification swiped sideways is
archived and the ones below rise to close the gap; Show less folds the stack back -->
<section class="lock" data-lock aria-label="Lock screen notifications">
<div class="lock__wall" aria-hidden="true">
<span class="lock__blob lock__blob--a" data-blob></span>
<span class="lock__blob lock__blob--b" data-blob></span>
<span class="lock__blob lock__blob--c" data-blob></span>
<span class="lock__blob lock__blob--d" data-blob></span>
</div>
<span class="lock__grain" aria-hidden="true"></span>
<div class="lock__ui" data-ui>
<header class="clock" data-clock>
<svg class="clock__lock" viewBox="0 0 16 18" aria-hidden="true"><rect x="2.5" y="8" width="11" height="8.5" rx="2.2"/><path d="M5 8V5.6a3 3 0 0 1 6 0V8"/></svg>
<p class="clock__date">Thursday, November 5</p>
<p class="clock__time">9:41</p>
</header>
<div class="bar" data-bar>
<span class="bar__title">Notification Centre</span>
<button class="bar__less" type="button" data-less tabindex="-1">
<span class="bar__less-face" data-less-face>
Show less
<svg viewBox="0 0 12 12" aria-hidden="true"><path d="M3 7.4L6 4.6l3 2.8"/></svg>
</span>
</button>
</div>
<ul class="stack" data-stack aria-label="Notifications">
<li class="slot" data-slot>
<span class="slot__action" data-action aria-hidden="true"><svg viewBox="0 0 20 20"><rect x="3" y="4" width="14" height="4" rx="1.2"/><path d="M4.5 8v6.6a1.6 1.6 0 0 0 1.6 1.6h7.8a1.6 1.6 0 0 0 1.6-1.6V8M8 11h4"/></svg>Archive</span>
<article class="note" data-note tabindex="-1" aria-label="Wren, Maya Ortiz: Running 5 min late, grab the window table?">
<span class="note__shadow" data-shadow></span>
<span class="note__glass"><span class="note__lit" data-lit></span><span class="note__sheen"><span class="note__band" data-band></span></span></span>
<span class="note__body" data-body>
<span class="note__icon note__icon--msg"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 5.2c-4.3 0-7.6 2.7-7.6 6.1 0 1.9 1 3.6 2.7 4.7l-.6 2.6 3-1.5c.8.2 1.6.3 2.5.3 4.3 0 7.6-2.7 7.6-6.1S16.3 5.2 12 5.2z"/></svg></span>
<span class="note__text">
<span class="note__top"><strong>Maya Ortiz</strong><time>now</time></span>
<span class="note__line">Running 5 min late, grab the window table?</span>
</span>
</span>
</article>
</li>
<li class="slot" data-slot>
<span class="slot__action" data-action aria-hidden="true"><svg viewBox="0 0 20 20"><rect x="3" y="4" width="14" height="4" rx="1.2"/><path d="M4.5 8v6.6a1.6 1.6 0 0 0 1.6 1.6h7.8a1.6 1.6 0 0 0 1.6-1.6V8M8 11h4"/></svg>Archive</span>
<article class="note" data-note tabindex="-1" aria-label="Daybook, Design review: in 10 min, Studio 4B">
<span class="note__shadow" data-shadow></span>
<span class="note__glass"><span class="note__lit" data-lit></span><span class="note__sheen"><span class="note__band" data-band></span></span></span>
<span class="note__body" data-body>
<span class="note__icon note__icon--cal"><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="6.5" width="14" height="12.5" rx="2.6"/><path d="M5 10.5h14M9 4.6v3.4M15 4.6v3.4"/><path class="fill" d="M9.4 13.2h2.2v2.2H9.4z"/></svg></span>
<span class="note__text">
<span class="note__top"><strong>Design review</strong><time>2m ago</time></span>
<span class="note__line">In 10 min · Studio 4B with Theo and Ana</span>
</span>
</span>
</article>
</li>
<li class="slot" data-slot>
<span class="slot__action" data-action aria-hidden="true"><svg viewBox="0 0 20 20"><rect x="3" y="4" width="14" height="4" rx="1.2"/><path d="M4.5 8v6.6a1.6 1.6 0 0 0 1.6 1.6h7.8a1.6 1.6 0 0 0 1.6-1.6V8M8 11h4"/></svg>Archive</span>
<article class="note" data-note tabindex="-1" aria-label="Parcelo, your parcel is 3 stops away">
<span class="note__shadow" data-shadow></span>
<span class="note__glass"><span class="note__lit" data-lit></span><span class="note__sheen"><span class="note__band" data-band></span></span></span>
<span class="note__body" data-body>
<span class="note__icon note__icon--box"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4.6l6.6 3.4v8L12 19.4 5.4 16V8z"/><path d="M5.6 8.1L12 11.4l6.4-3.3M12 11.4v7.8M8.7 6.3l6.5 3.4"/></svg></span>
<span class="note__text">
<span class="note__top"><strong>Parcel 3 stops away</strong><time>9m ago</time></span>
<span class="note__line">Arriving 10:05 to 10:20 · Leave at the door</span>
</span>
</span>
</article>
</li>
<li class="slot" data-slot>
<span class="slot__action" data-action aria-hidden="true"><svg viewBox="0 0 20 20"><rect x="3" y="4" width="14" height="4" rx="1.2"/><path d="M4.5 8v6.6a1.6 1.6 0 0 0 1.6 1.6h7.8a1.6 1.6 0 0 0 1.6-1.6V8M8 11h4"/></svg>Archive</span>
<article class="note" data-note tabindex="-1" aria-label="Monal, payment received: 240 dollars from Jonas Kerr">
<span class="note__shadow" data-shadow></span>
<span class="note__glass"><span class="note__lit" data-lit></span><span class="note__sheen"><span class="note__band" data-band></span></span></span>
<span class="note__body" data-body>
<span class="note__icon note__icon--bank"><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="4.4" y="6.8" width="15.2" height="10.4" rx="2.4"/><path d="M4.4 10.2h15.2M7.6 14h3.2"/></svg></span>
<span class="note__text">
<span class="note__top"><strong>Payment received</strong><time>24m ago</time></span>
<span class="note__line">+$240.00 from Jonas Kerr · Rent split</span>
</span>
</span>
</article>
</li>
<li class="slot" data-slot>
<span class="slot__action" data-action aria-hidden="true"><svg viewBox="0 0 20 20"><rect x="3" y="4" width="14" height="4" rx="1.2"/><path d="M4.5 8v6.6a1.6 1.6 0 0 0 1.6 1.6h7.8a1.6 1.6 0 0 0 1.6-1.6V8M8 11h4"/></svg>Archive</span>
<article class="note" data-note tabindex="-1" aria-label="Nimbo, rain from 10:20">
<span class="note__shadow" data-shadow></span>
<span class="note__glass"><span class="note__lit" data-lit></span><span class="note__sheen"><span class="note__band" data-band></span></span></span>
<span class="note__body" data-body>
<span class="note__icon note__icon--sky"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M8.2 15.4h8.3a3.1 3.1 0 0 0 .3-6.2 4.6 4.6 0 0 0-8.8 1.2 2.6 2.6 0 0 0 .2 5z"/><path d="M9.4 17.8l-.7 1.6M12.6 17.8l-.7 1.6M15.8 17.8l-.7 1.6"/></svg></span>
<span class="note__text">
<span class="note__top"><strong>Rain from 10:20</strong><time>1h ago</time></span>
<span class="note__line">Light showers until noon, 14° right now</span>
</span>
</span>
</article>
</li>
</ul>
<span class="more" data-more aria-hidden="true">+<span class="more__win"><span class="more__roll" data-roll><span>0</span><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span></span></span></span>
<button class="stack__toggle" type="button" data-toggle aria-expanded="false" aria-label="Show all notifications"></button>
</div>
<span class="lock__home" aria-hidden="true"></span>
</section>
<p class="sr" aria-live="polite" data-live></p>
</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.
48 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 “Fanning notification stack” from Animorio and fit it into my siteThe notifications are absolute inside the lock screen and one function gives each its place in pixels from its rank in the stack: closed, rank 0 in front, 1 and 2 lower by 9 px, 5.5% smaller each with the origin at the bottom (so only the edge shows) and more transparent; open, one under the other. The measures are taken again on resize.
The spring is the damped oscillator formula (stiffness 190, damping 21, mass 1) handed to GSAP as an ease function, with the duration equal to the settling time: it passes the mark by about 2%, one pixel, and comes back. Each notification starts 55 ms after the one before.
No backdrop-filter: the wallpaper is made of soft radial gradients, so glass made of translucent gradients with an overlay grain and a 1 px edge brighter on top looks frosted. The shadow and the light are separate layers whose opacity is all GSAP changes, and a slanted streak crosses the glass on opening.
On opening it works out how big the clock can stay for all five notifications to fit in the panel; if that is not enough the gap between them shrinks too. The clock scales from the top on the same spring.
Each notification is inside a slot: the slot moves vertically, the notification horizontally, so the two movements do not cancel each other. While dragging, the Archive action behind grows with the gesture; past 36% of the width or with a quick flick the notification flies off and the others rise, each on its own spring.
The badge on the edge holds a column of digits in a window one line high: GSAP moves it with yPercent on the same spring when a notification leaves or arrives.
| Name | File | Default | What it changes |
|---|---|---|---|
STIFFNESS | script.js | 190 | The spring of the fan: higher is quicker. |
DAMPING | script.js | 21 | Lower lets the notifications pass their place and come back. |
STAGGER | script.js | 0.055 | Seconds between one notification and the next as the stack opens and closes. |
PEEK | script.js | 9 | How many pixels of each notification behind show under the front one. |
SHRINK | script.js | 0.055 | How much smaller each notification behind is. |
SWIPE | script.js | 0.36 | How far a notification must be swiped to be archived, as a share of its width. |
SPEED | script.js | 1 | 2 = the round on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the round on its own until someone touches the stack. |
For an app's showcase (the page of a messaging, banking, delivery or productivity app showing how its notifications arrive), for a dashboard or web app that groups its alerts, or as the notification centre of an interface.
The same animation with adapted sizes: the panel is at most as tall as the screen, the notifications get as low as 50 px, the clock shrinks more on opening and the gap between notifications narrows so all five fit. With a finger: tap to open, drag sideways to archive.
No movement: the open stack, the closed one and the one without the archived notification swap with a fade, already in place; the wallpaper's lights stay still.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.
Tested on 5 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.