
Falling tools
Physics, Hover
The filters of a furniture shop hanging from thin threads under a rail: the passing pointer pushes them and they swing like real pendulums, barely touching each other and calming down slowly. One can be pulled down by its thread, which stretches like a rubber band, and let go it springs back up; clicked, it becomes the choice, fills with colour and its thread shortens with a little hop. In the style of product micro-interactions, one gesture only: Hover.
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>
<!--
"Hanging tags" 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>Hanging tags that swing as you pass</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>
<!-- the shop filters hang from a thin rail on threads: the pointer pushes them and they swing like pendulums,
a tag can be pulled down by its thread, and a click picks it -->
<header class="top">
<p class="brand">Halden Home</p>
<p class="hint">Shop by room</p>
</header>
<div class="rig" data-rig>
<svg class="threads" data-threads aria-hidden="true">
<line class="rail" data-rail x1="0" y1="0" x2="0" y2="0"></line>
<g data-knots></g>
<g data-paths></g>
</svg>
<div class="tags" role="radiogroup" aria-label="Filter the shop by room" data-tags>
<button class="tag is-on" type="button" role="radio" aria-checked="true" data-tag data-n="128" data-room="everything"><span class="tag__clip" aria-hidden="true"></span><span class="tag__face"><span class="tag__label">All</span></span></button>
<button class="tag" type="button" role="radio" aria-checked="false" data-tag data-n="24" data-room="lamps"><span class="tag__clip" aria-hidden="true"></span><span class="tag__face"><span class="tag__label">Lamps</span></span></button>
<button class="tag" type="button" role="radio" aria-checked="false" data-tag data-n="31" data-room="chairs"><span class="tag__clip" aria-hidden="true"></span><span class="tag__face"><span class="tag__label">Chairs</span></span></button>
<button class="tag" type="button" role="radio" aria-checked="false" data-tag data-n="18" data-room="tables"><span class="tag__clip" aria-hidden="true"></span><span class="tag__face"><span class="tag__label">Tables</span></span></button>
<button class="tag" type="button" role="radio" aria-checked="false" data-tag data-n="22" data-room="rugs"><span class="tag__clip" aria-hidden="true"></span><span class="tag__face"><span class="tag__label">Rugs</span></span></button>
</div>
</div>
<footer class="foot">
<p class="count"><span class="count__n" data-count>128</span> <span class="count__rest">pieces in <span class="count__name" data-name>everything</span></span></p>
<p class="note">Brush the tags, pull one down, or pick one.</p>
</footer>
<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.
25 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 “Hanging tags” from Animorio and fit it into my siteEach tag is a pendulum: an angle, an angular speed and the length of its thread. On every frame, in four small steps in GSAP’s ticker, gravity pulls it back down with minus G over the length times the sine of the angle, and DAMPING slows it. The tag turns by 88% of the thread’s angle around its clip, so it looks hung and not glued.
The pointer’s speed is measured between one event and the next and fades by itself when it stops. If the pointer is over a tag’s face, its speed along the arc becomes the speed the tag wants to have, and the tag reaches it quickly: so it moves with the pointer and, as soon as the pointer leaves, it swings.
After each step neighbouring faces are compared: if they overlap and are moving towards each other, they trade speed like two balls with a restitution of 0.35, and the overlap is split in half between them. The touch is soft and the push travels along the row.
Grabbed by its face, the tag follows the finger: the angle comes from the arctangent, and past its length the thread stretches by STRETCH times (1 minus 1 over (x over STRETCH plus 1)), less and less. Let go, the length goes back with its own spring in which BOUNCE leaves the bounce, and the angle starts again with the speed of the last ninety milliseconds.
Each thread is a quadratic curve from the hook to the clip: its control point moves sideways against the speed, so the thread lags behind the movement, and when the thread is shorter than its length it curves, like a slack string. Pulled past its length it turns straight and dark.
| Name | File | Default | What it changes |
|---|---|---|---|
SWING | script.js | 1 | How fast the tags swing: higher means quicker pendulums. |
DAMPING | script.js | 1.1 | How quickly they calm down after a push. |
PUSH | script.js | 1 | How hard the passing pointer pushes them. |
BOUNCE | script.js | 0.3 | How much they bounce when you let go after pulling them down. |
STRETCH | script.js | 46 | How many pixels at most the thread stretches when pulled. |
SHORTEN | script.js | 10 | How many pixels the chosen tag’s thread shortens. |
ACCENT | script.js | #2f5bff | The colour of the chosen tag and of the number. |
HOLD | script.js | 1.4 | The seconds of pause before the autopilot starts again. |
For the filters or the categories of a shop, a blog or a portfolio, when the choice should have a little play without losing clarity: it reads as a normal row of pills, and whoever passes over it feels it move.
The same animation with adapted sizes: the row, the length of the threads and the letters are sized on the width and the height of the window; with a finger the tags are pushed by sliding over them, pulled down and picked.
No swinging and no stretching threads: the tags stay still, the choice moves from one to the next with a colour fade and the number changes without rolling.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.2 KB; the libraries: GSAP 28 KB.
Tested on 27 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.