
The menu that opens from its button
Menus, Transitions, Text
Free
In the minimal style: the notification of a save is born from a thin orange line, which stretches out from the middle, opens in height like a slit and becomes the notification, while the words come up one line at a time, narrow and light, and widen as they settle. The line stays on the bottom edge and measures the time to undo; Undo closes it back into the line and opens it again with the new words, and several notifications pile up making room for each other with a real spring.
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>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>The toast from a line</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/archivo@5.3.0/wdth.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the Save draft button of a writing app and, under it, the room for its notifications. Each notification is
born from a thin line: the line stretches out from the middle, opens like a slit into the notification and
the words come up out of it one line at a time. The orange line along its bottom edge is the time left to
undo. Undo closes it back into the line and it opens again with the new words; a swipe, the cross or Esc
fold it into the line and slide it away. The notifications are made by script.js -->
<div class="desk" data-desk>
<div class="desk__head">
<button class="save" type="button" data-save data-autoclic>
<span class="save__rim" aria-hidden="true"></span>
<span class="save__label">Save draft</span>
</button>
</div>
<ol class="stack" aria-label="Notifications" data-stack></ol>
<p class="sr" role="status" aria-live="polite" aria-atomic="true" data-live></p>
</div>
</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.
22 values to change
With the Animorio connector, Claude Code takes it from here, guide included, and fits it into your project. Paste this request:
Take “The toast from a line” from Animorio and fit it into my siteEach notification is an object with five numbers: how long the line is, how open, how much time is left, how much the marks show and how much it is being held. GSAP animates only those numbers, and one function turns them into the page: the three thin lines (the top edge, the bottom edge and the orange time) move and stretch with a transform, the face is uncovered by a clip-path in pixels that closes from the middle, the marks always stand at the ends of the time left.
Each line of words has its own window with hidden overflow; inside it, the text comes up from below with back.out and a STAGGER offset. Meanwhile two CSS variables, --wd and --wg, go from NARROW and 260 to the right width and weight for each line (the title settles wide, at 112): Archivo’s font-variation-settings reads them, and the letters widen and gain weight as they settle. Closing, they go towards the middle, narrow and fade before the two lines meet, so they never lie on each other.
The time to undo is a GSAP tween of a single number, from 1 to 0 in LIFE seconds, which stops under the pointer, with the focus inside and with a finger on it (a set of the reasons it is being held: while it is not empty the tween stays paused). Undo closes the notification into the line, brings the time back to 1 on the closed line, changes the words and opens it again, with HOLD seconds ahead.
Before every change (a notification arriving, one leaving) the script measures where each slot of the list is; then it changes the list, measures again, and each slot starts from where it was and goes to its new place. The motion is a damped spring solved exactly, 1 − e^(−ζωt)(cos ωd t + ζω/ωd sin ωd t), handed to GSAP as an ease: with ζω fixed the spring has always come to rest at the end of the tween, and with DAMPING 0.8 it goes one pixel too far and back.
On pointerdown the notification captures the pointer; after 6 pixels the direction is chosen: sideways it follows the finger, vertically it lets the page scroll (touch-action: pan-y). Let go past 110 pixels or thrown fast it folds and slides away, otherwise it comes back with the spring. Esc sends away the one with the focus or the newest. The click the preview makes by itself (detail 0 and no key pressed) plays a whole round in a GSAP timeline instead: three saves, Undo on the newest, one sent away sideways, the oldest running out of time.
| Name | File | Default | What it changes |
|---|---|---|---|
LIFE | script.js | 5 | The seconds to undo: the orange line under the notification (it waits under the pointer). |
HOLD | script.js | 1.8 | The seconds the notification stays after Undo. |
DRAW | script.js | 0.42 | The seconds the line takes to stretch out from the middle. |
OPEN | script.js | 0.55 | The seconds the line takes to open into the notification. |
STAGGER | script.js | 0.08 | The seconds between one line of words coming up and the next. |
DAMPING | script.js | 0.8 | The spring of the pile making room: 1 no overshoot, 0.4 a few bounces. |
NARROW | script.js | 66 | The width of the letters as they come up out of the line (62 narrowest, 100 normal). |
MAX | script.js | 3 | The most notifications at once: one more closes the oldest. |
FIRST | script.js | 0.7 | The seconds before a first notification comes by itself (0: none). |
TITLE | script.js | Draft saved | The notification’s title. |
UNDONE | script.js | Save undone | The title after Undo. |
DOC | script.js | Slow mornings | The name of the draft. |
WORDS | script.js | 1204 | The words in the draft at the start. |
For an action that can still be undone for a few seconds: a save, an archive, a moved email, an edit in a writing app or a dashboard. The line measuring the time says how much is left with no numbers, and being born from a line suits sober, typographic interfaces on a dark background.
The column takes the width of the screen minus 32 pixels (358 at 390). Notifications are sent away by dragging them sideways with a finger, while vertically the page scrolls; a finger on one stops the time, Undo is 30 pixels tall and the cross has a touch area bigger than the drawn one.
No stretching line and no opening slit: the notification fades in already open, the words fade in in their places, and the pile changes at once with no spring. The time line still draws back, because it is information; Undo changes the words in a fade and the notifications leave by fading.
GSAP 3.15.0, Archivo (font variabile, assi wdth e wght) 5.3.0.
Compressed with gzip, the three demo files weigh 9.3 KB; the libraries: GSAP 28 KB.
Tested on 16 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.
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.