
The elastic button
Buttons, Hover, Text
A meeting note in an AI app, on an almost black background, in the style of the light effects of AI apps: six grey lines and below them the Summarize button with a small sparkle. A single gesture, press: a blue and lilac light starts running round the button’s border, a soft band of light slides over the note line by line as if reading it and the words under it brighten as it passes; then the note folds down on a spring into a two line summary that writes itself letter by letter, the word count rolls from 79 to 19 and the button becomes Summarized · 2 lines, with a quiet Undo beside it.
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>
<!--
"Summarize button" 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 Summarize button with a light that reads the text</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">
<!-- a meeting note and its Summarize button: press it and a soft band of light reads the note line by line,
then the note folds down into a two line summary that writes itself; Undo brings the note back -->
<article class="note" data-note aria-label="Meeting note">
<header class="note__top">
<p class="note__title">
<svg class="note__doc" viewBox="0 0 20 20" aria-hidden="true"><path d="M5.5 2.8h6.2l3.3 3.3v11.1H5.5Z"></path><path d="M11.6 2.8v3.4H15"></path><path d="M7.8 9.6h4.6M7.8 12.4h4.6"></path></svg>
<span>Design sync</span>
<span class="note__date">Oct 24</span>
</p>
<p class="note__count"><span class="roller" data-count></span> <span data-unit>words</span></p>
</header>
<div class="note__body" data-body>
<p class="note__text" data-text></p>
<p class="note__sum" data-sum aria-live="polite"></p>
<span class="scan" data-scan aria-hidden="true"></span>
</div>
<footer class="note__foot">
<div class="btnwrap" data-wrap>
<span class="btn__halo" data-halo aria-hidden="true"><span class="btn__spin" data-spin-halo></span></span>
<button class="btn" type="button" data-btn>
<span class="btn__ring" data-ring aria-hidden="true"><span class="btn__spin" data-spin></span></span>
<span class="btn__face" aria-hidden="true"><span class="btn__shine" data-shine></span></span>
<span class="btn__in">
<svg class="btn__spark" data-spark viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.4c.55 4 2.2 5.65 6.2 6.2-4 .55-5.65 2.2-6.2 6.2-.55-4-2.2-5.65-6.2-6.2 4-.55 5.65-2.2 6.2-6.2Z"></path><path d="M15.4 13.6c.2 1.4.75 1.95 2.15 2.15-1.4.2-1.95.75-2.15 2.15-.2-1.4-.75-1.95-2.15-2.15 1.4-.2 1.95-.75 2.15-2.15Z"></path></svg>
<span class="btn__label" data-label></span>
</span>
</button>
</div>
<button class="undo" type="button" data-undo tabindex="-1">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M7.4 5.2 4.2 8.4l3.2 3.2"></path><path d="M4.6 8.4h7.1a4 4 0 0 1 0 8H9.2"></path></svg>
<span>Undo</span>
</button>
</footer>
</article>
<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 “Summarize button” from Animorio and fit it into my siteThe note is split into words, each in its own span, and the words are grouped into lines by reading their position: each line knows where it starts, where it ends and where the centre of each word sits. It is measured again on resize and before every reading.
A blurred band with a radial gradient slides line by line, each in a time proportional to its length. On every frame each word on that line takes a colour between grey and a white with a hint of blue, depending on its distance from the band, through a soft curve.
Inside the pill sits a square with a conic gradient that rotates, clipped by the pill’s corners, and over it the dark face one pixel in from the edge: what stays visible is a thread of light running round. A blurred copy behind makes the glow.
The card has the height of the note; once the reading is over the words lift away, the height goes to the summary’s on an elastic spring and the summary’s letters come out of a blur with an 11 millisecond stagger. The counter has three columns of sliding digits, and the one left empty shrinks to zero.
| Name | File | Default | What it changes |
|---|---|---|---|
READ_SPEED | script.js | 1 | How fast the light reads the lines (2 twice as fast, 0.5 half). |
LIGHT | script.js | #a9b8ff | The colour of the light on the border and on the words. |
GLOW | script.js | 1 | How strong the glow running round the border is (0 none). |
SPRING | script.js | 1 | How much the note bounces as it folds into the summary (0 none). |
PRESS_SCALE | script.js | 0.955 | How much the button squashes when pressed. |
DONE_HOLD | script.js | 2.6 | The seconds the summary stays before the autopilot presses Undo. |
For the summarize button in a notes, email, documents or meetings app with AI: the reading light shows the work really happens on the text, and the summary takes the note’s place without opening a window.
The same animation: the card takes almost the whole width, the note wraps onto more lines and the light reads them all; the text and the button are measured on the screen height too.
No sliding band, no squash and no spring, the sparkle does not spin: the words brighten all together and fade back to grey, the summary fades in and the border lights up and fades out; the drawn pointer stays hidden.
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 26 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.