
The elastic button
Buttons, Hover, Text
The Pin button next to every note in a team channel, with a single gesture: pressed, the drawn pushpin lifts, drops and sticks into the page with a small bounce while its shadow tightens under the tip, and turns red. Then the note lifts and rises to the top of the list as the others step down one place on a spring, and only once it has arrived does the Pinned tag come in. Pressed again, the pin pulls out, lies back down and the note goes home.
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>
<!--
"Pushpin Pin 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 Pin button with the pushpin that sticks and lifts the note to the top</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">
<!-- one gesture: press. Every note of a team channel has its Pin button: pressed, the pushpin stands up, drops and
sticks with a small bounce while its shadow tightens, the note rises to the top of the list as the others step
down one place, and only then the Pinned tag comes in. Pressed again, the pin pulls out and the note goes home -->
<section class="panel" data-panel aria-label="Notes in the Studio channel">
<header class="panel__head">
<span class="panel__mark" aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M4 5.5h12M4 10h8M4 14.5h10"></path></svg>
</span>
<span class="panel__title">Notes</span>
<span class="panel__place">Larkspur, #studio</span>
<span class="panel__count" data-count>1 pinned</span>
</header>
<ol class="list" data-list>
<li class="note" data-note data-i="0">
<span class="note__avatar" style="--av:#efe7dc;--avt:#8a6a45" aria-hidden="true">MR</span>
<span class="note__body">
<span class="note__top"><span class="note__title">Launch checklist</span><span class="tag" data-tag><span>Pinned</span></span></span>
<span class="note__text">Final copy is in the doc, review by Thursday.</span>
</span>
<span class="note__time">9:12</span>
<button class="pinbtn" type="button" data-pin aria-pressed="false" aria-label="Pin Launch checklist"></button>
</li>
<li class="note" data-note data-i="1">
<span class="note__avatar" style="--av:#e3ecf6;--avt:#3f5f86" aria-hidden="true">JT</span>
<span class="note__body">
<span class="note__top"><span class="note__title">Brand colours v3</span><span class="tag" data-tag><span>Pinned</span></span></span>
<span class="note__text">Warmer greys, one accent. Swatches attached.</span>
</span>
<span class="note__time">Tue</span>
<button class="pinbtn" type="button" data-pin aria-pressed="false" aria-label="Pin Brand colours v3"></button>
</li>
<li class="note" data-note data-i="2">
<span class="note__avatar" style="--av:#e6efe6;--avt:#4d6b4d" aria-hidden="true">AK</span>
<span class="note__body">
<span class="note__top"><span class="note__title">Wi-Fi and door code</span><span class="tag" data-tag><span>Pinned</span></span></span>
<span class="note__text">larkspur-guest, door 4417. Ask before sharing.</span>
</span>
<span class="note__time">Mon</span>
<button class="pinbtn" type="button" data-pin aria-pressed="false" aria-label="Pin Wi-Fi and door code"></button>
</li>
<li class="note" data-note data-i="3">
<span class="note__avatar" style="--av:#f1e6ee;--avt:#7d4a6c" aria-hidden="true">SL</span>
<span class="note__body">
<span class="note__top"><span class="note__title">Offsite, 14 Nov</span><span class="tag" data-tag><span>Pinned</span></span></span>
<span class="note__text">Train at 8:40. Lunch is on us, dinner is not.</span>
</span>
<span class="note__time">Oct 24</span>
<button class="pinbtn" type="button" data-pin aria-pressed="false" aria-label="Pin Offsite, 14 Nov"></button>
</li>
</ol>
</section>
<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.
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 “Pushpin Pin button” from Animorio and fit it into my siteThe pin sits in a group clipped by a rectangle that ends just above the shadow: when it drops by 2.6 drawing units the needle goes below the edge of the clip and seems to enter the page, with no mask to animate.
The shadow is an ellipse under the tip that spreads and fades as the pin rises and tightens, darker, when it touches the page: more than the pin itself, it is what makes the blow felt.
The note waits four tenths of a second, the time it takes the pin to go in, then lifts and rises with back.out; the others move one place only if they have to, the nearest first, with a delay for each place of distance.
All the rows sit at the top of the list and GSAP puts them in place with y, a multiple of the measured row height: the travelling row passes in front of the others without the layout moving, and on resize the places are measured again.
The Pinned tag comes in only once the note has arrived and leaves before it moves off; the count at the top sends the old text out before the new one comes in, so two texts never share a place.
| Name | File | Default | What it changes |
|---|---|---|---|
TRAVEL | script.js | 0.75 | How long the note takes to rise to the top of the list, in seconds. |
BOUNCE | script.js | 1.5 | How much the note bounces when it reaches its place. |
STAGGER | script.js | 0.045 | The delay between one note and the next as they step down, in seconds. |
LIFT | script.js | 1.025 | How much the note lifts while it travels (1 = stays flat). |
DROP | script.js | 2.6 | How far the pin goes into the page when it sticks. |
ACCENT | script.js | #e5484d | The colour of the stuck pin and the tag. |
TAG | script.js | Pinned | The label of the tag on the pinned note. |
In a team chat, a notes or task app, the comments under a post, an inbox: anywhere an item can be pinned to the top so it stays in sight.
The same list at the width of the screen, with slightly shorter rows when the screen is short; under 380 pixels the time and the channel name hide to leave room for the title. A finger presses like the mouse.
No jumps, bounces or travel: the pin goes straight from lying down to stuck, the list fades out and back in already in the new order, the tag and the count change with a fade. The drawn pointer does not run.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.3 KB; the libraries: GSAP 28 KB.
Tested on 29 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.