
The elastic button
Buttons, Hover, Text
The guestbook of a personal site: a field to leave a couple of lines and the “Sign” button. On signing, the new note opens at the top of the list on a spring and pushes the others down, the oldest leaves at the bottom, the count of notes rolls and the button goes from the pen to a tick. The field counts the characters left and, if it is empty, shakes instead of signing.
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>
<!--
"Guestbook" 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>Guestbook</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 guestbook of a personal site: a visitor leaves a couple of lines, the new note enters at the top
pushing the others down and the count of the notes rolls -->
<section class="gb" data-gb aria-labelledby="gb-title">
<header class="gb__head">
<h1 id="gb-title">Guestbook</h1>
<p class="gb__count" aria-live="polite"><span data-count>128 notes</span></p>
</header>
<form class="gb__form" data-form novalidate>
<label class="gb__field" data-field>
<span class="gb__sr">Your note</span>
<input type="text" data-input maxlength="80" placeholder="Say hello, leave a line" autocomplete="off" enterkeyhint="send">
<i class="gb__left" data-left aria-hidden="true">80</i>
</label>
<button class="gb__sign" type="submit" data-sign>
<svg viewBox="0 0 16 16" aria-hidden="true"><path class="pen" d="M3 13l1-3.500 6.800-6.800 2.500 2.500L6.500 12Z"></path><path class="ck" pathLength="1" d="m3.500 8.300 3 3 6-6.600"></path></svg>
<span class="gb__signtext"><span data-signlabel>Sign</span></span>
</button>
</form>
<ul class="gb__list" data-list>
<li class="gb__note"><i class="gb__face" style="--h: 262">M</i><span class="gb__body"><b>Mira <em>2 h ago</em></b><span>Came for the fonts, stayed for the footer.</span></span></li>
<li class="gb__note"><i class="gb__face" style="--h: 24">T</i><span class="gb__body"><b>Tomas <em>yesterday</em></b><span>That hover on the menu made my day.</span></span></li>
<li class="gb__note"><i class="gb__face" style="--h: 152">A</i><span class="gb__body"><b>Aiko <em>3 days ago</em></b><span>Hello from Osaka. Lovely corner of the web.</span></span></li>
</ul>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.
30 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Guestbook” from Animorio and fit it into my siteThe new note is built with elements and text nodes, never with the HTML of what was typed: whatever is written stays text.
The note is put first in the list and its height goes from zero to its size on a spring: the others move down by themselves, with nothing to measure.
The list is three rows tall with a fade at the bottom: the fourth note is out of sight, and beyond the fourth the old notes are removed.
On every letter the characters left and the field’s state are updated; the form is a real form, so Enter signs.
In the same svg: a class on the card makes the pen withdraw and draws the tick, a path with pathLength 1; after 1.8 seconds the class goes away.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #e2522b | The colour of the successful signature and of the field’s warnings. |
NOTES | script.js | 128 | How many notes are already in the book. |
DROP | script.js | 0.75 | How long the new note takes to enter at the top of the list. |
TYPE | script.js | 22 | How many letters per second the demo types when it runs by itself. |
SPRING | script.js | 1 | How much the entering note bounces: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer writes two notes and signs them. |
On a blog or a personal site, in the portfolio of someone who draws or writes, on a wedding page or a small venue’s: where visitors can leave a hello that stays in view.
The same card, as wide as the screen minus the margins: field and button stay on the same row, 44 pixels tall; long note texts are cut with an ellipsis and the phone keyboard shows “Send”.
No springs and no rolling words: the new note fades in at the top, the count changes in one step, the tick appears and the empty field only takes the orange edge, without shaking. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.7 KB; the libraries: GSAP 28 KB.
Tested on 24 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.
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.