
The elastic button
Buttons, Hover, Text
The notifications of a video editing app, in dark glass on near black: while the video exports a blue light fills the glass from the left, with its bright front, the border lighting up as far as it has reached and the percentage rising with two small pauses; once done, a glint crosses the glass, the text rolls to Export ready and the Show button pops out. When the upload for review arrives the new notification comes in at the front and the old one shrinks and stays behind, just visible at the top. You clear them by dragging them sideways: the notification resists, short of the line it springs back into place, past it it flies away and the one behind comes forward.
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>
<!--
"Glass export notification" 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 glass notification that fills with light while it exports</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 video editor's notifications, made of glass: light fills each one while the export runs,
the newest pushes the older ones back into a stack, and a swipe sends them away -->
<section class="dock" data-dock aria-label="Notifications" aria-live="polite">
<div class="floor" data-floor aria-hidden="true"></div>
<div class="stack" data-stack></div>
<p class="hint" data-hint>Swipe to dismiss</p>
</section>
<template data-tpl>
<article class="note" data-note>
<span class="note__halo" data-halo aria-hidden="true"></span>
<div class="note__glass">
<span class="note__fill" data-fill aria-hidden="true"><span class="note__front" data-front></span></span>
<span class="note__glint" data-glint aria-hidden="true"></span>
<div class="note__icon" data-icon aria-hidden="true">
<svg class="ico ico--work" data-work viewBox="0 0 24 24">
<rect x="3.5" y="5.5" width="17" height="13" rx="2.6"/>
<path class="ico__reel" data-reel d="M7 5.5v13M17 5.5v13M3.5 9.5H7M3.5 14.5H7M17 9.5h3.5M17 14.5h3.5"/>
</svg>
<svg class="ico ico--done" data-done viewBox="0 0 24 24"><path data-tick d="M6.4 12.6 10.2 16.2 17.8 8.4"/></svg>
</div>
<div class="note__text">
<p class="note__top"><span class="note__app">Framewell</span><span class="note__time" data-when>now</span></p>
<p class="note__title"><span class="roll"><span class="roll__line" data-t1></span><span class="roll__line" data-t2></span></span></p>
<p class="note__sub"><span class="roll"><span class="roll__line" data-s1></span><span class="roll__line" data-s2></span></span></p>
</div>
<div class="note__side">
<span class="note__pct" data-pct>0%</span>
<button class="note__act" data-act type="button" tabindex="-1">Show</button>
</div>
</div>
<svg class="note__edge" data-edge aria-hidden="true">
<defs>
<linearGradient data-grad x1="0" y1="0" x2="1" y2="0">
<stop offset="0" stop-color="#8fd0ff" stop-opacity="0.35"/>
<stop data-g1 offset="0" stop-color="#ffffff" stop-opacity="0.95"/>
<stop data-g2 offset="0" stop-color="#ffffff" stop-opacity="0.11"/>
<stop offset="1" stop-color="#ffffff" stop-opacity="0.11"/>
</linearGradient>
</defs>
<rect data-edgerect x="0.5" y="0.5" rx="19.5"/>
</svg>
</article>
</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.
13 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 “Glass export notification” from Animorio and fit it into my siteInside the glass, which has overflow hidden, a layer as wide as the notification holds a blue gradient, scaled horizontally from 0 to 1 with its origin on the left. On its right edge a white line with a blue box-shadow is the front of the light: its scaleX is the inverse of the layer’s, so it stays two pixels wide.
The outline is an SVG rect over the notification, its stroke on a four-stop linearGradient: two close stops move with the progress, so the border is bright white up to the front and barely visible after it. Each notification has its own gradient with its own id.
The notifications live in an array, the front one first. Each slot has its own y, scale and opacity: at the front 0, 1 and 1; behind, 11 pixels higher and 5.5% smaller per slot. When a new one arrives or one is cleared, they all move to their slots with back.out.
The finger’s movement goes through a function that grows ever more slowly (d times k over 1 plus d times the resistance over 420). Released short of the line the notification comes back with elastic.out; past it, or with a quick flick, it flies off rotating nine degrees and the one behind comes forward.
| Name | File | Default | What it changes |
|---|---|---|---|
EXPORT_TIME | script.js | 3.4 | How many seconds the export lasts, while the light fills the glass. |
UPLOAD_TIME | script.js | 2.4 | How many seconds the upload for review lasts, in the second notification. |
DISMISS_AT | script.js | 96 | How many pixels you have to drag the notification for it to go. |
RESISTANCE | script.js | 0.5 | How much the notification resists the drag: 0 follows the finger, 1 barely moves. |
ACCENT | script.js | #8fd0ff | The colour of the light filling the glass. |
FILE_NAME | script.js | Harbour cut | The name of the video being exported. |
In apps that run long jobs in the background, like exporting a video, generating a file, uploading photos or backing up: the progress lives inside the notification rather than in a separate bar, new notifications stack the old ones instead of covering them, and they are cleared with the gesture everyone knows from their phone.
The stack is at most 90% of the window wide and 78 pixels tall, so it fits whole in the frame; you drag it with your finger, horizontally, leaving the page free to scroll vertically.
No movement: the notifications appear and disappear with a fade, the light fills the glass without glints, the text changes with a fade and dragging the notification makes it fade instead of moving.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.0 KB; the libraries: GSAP 28 KB.
Tested on 28 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.