
Falling tools
Physics, Hover
The parcel summary of a made-up pantry shop, Wexcombe Pantry, in the premium style of the interface pieces: the items of the order are clean tiles with their name, price and weight, and they really drop onto the pan of a postal scale, knock into each other and settle on top of one another. The pan sinks on its spring under the weight and bobs, the ruler needle follows it, the weight, the shipping band and the total roll to the new value. A tap on a tile takes it out of the parcel: it lifts, flies off, the other items fall into the gap and the pan springs back up.
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>
<!--
"Cart on the scale" 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>Wexcombe Pantry, your parcel on the scale</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="page">
<!-- the parcel summary of a made-up pantry shop, Wexcombe Pantry. The items of the order are clean tiles with their
name, price and weight: they drop onto the pan of a postal scale and settle on top of each other, the pan sinks
on its spring under the weight, the weight and the shipping band roll to the new value. A tap on a tile takes it
out of the parcel: it lifts off, the others settle into the gap and the pan springs back up. -->
<section class="card" data-card aria-label="Your parcel">
<span class="card__grain" aria-hidden="true"></span>
<header class="head">
<div class="head__who">
<svg class="head__mark" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="7.5" width="18" height="13" rx="3.2"></rect><path d="M8 7.5V6a4 4 0 0 1 8 0v1.5"></path><path d="M3 12.5h18"></path></svg>
<div>
<p class="head__brand">Wexcombe Pantry</p>
<h1 class="head__title">Your parcel</h1>
</div>
</div>
<p class="count"><span class="roll" data-count>0</span><span data-count-word>items</span></p>
</header>
<div class="well" data-well>
<span class="well__light" aria-hidden="true"></span>
<div class="ruler" aria-hidden="true" data-ruler></div>
<svg class="spring" data-spring aria-hidden="true"><path data-coil></path><path data-coil-hi></path></svg>
<span class="base" aria-hidden="true"></span>
<div class="pan" data-pan aria-hidden="true"><span class="pan__face"></span></div>
<div class="tiles" data-tiles></div>
<div class="empty" data-empty>
<p>Your parcel is empty</p>
<button class="empty__btn" type="button" data-refill>Put it all back</button>
</div>
<div class="toast" data-toast role="status">
<span class="toast__t" data-toast-t>Linen towel removed</span>
<button class="toast__btn" type="button" data-undo>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5.6 4.2 2.8 7l2.8 2.8"></path><path d="M3.2 7h6.3a3.4 3.4 0 0 1 0 6.8H7.6"></path></svg>
<span>Undo</span>
</button>
</div>
</div>
<div class="read">
<div class="read__w">
<p class="read__label">Parcel weight</p>
<p class="read__num"><span class="roll" data-weight>0.00</span><span class="read__unit">kg</span></p>
</div>
<div class="read__band">
<p class="band__name"><span data-band>Small parcel</span></p>
<p class="band__price"><span class="roll" data-ship>€4.90</span><span> shipping</span></p>
</div>
</div>
<div class="meter" aria-hidden="true">
<div class="meter__track"><span class="meter__fill" data-fill></span></div>
<span class="meter__tick" data-tick="2" style="--at: 25%"><i></i><b>2 kg</b></span>
<span class="meter__tick" data-tick="5" style="--at: 62.5%"><i></i><b>5 kg</b></span>
<span class="meter__end">8 kg</span>
</div>
<footer class="foot">
<div class="foot__total">
<p class="foot__label">Total</p>
<p class="foot__num"><span class="roll" data-total>€0.00</span></p>
</div>
<button class="go" type="button" data-go>
<span class="go__face">
<span class="go__t" data-go-t>Checkout</span>
<svg class="go__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.4M8.6 4.2 12.4 8l-3.8 3.8"></path></svg>
</span>
</button>
</footer>
</section>
<p class="sr" data-live aria-live="polite"></p>
<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="https://cdn.jsdelivr.net/npm/matter-js@0.20.0/build/matter.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.
40 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 “Cart on the scale” from Animorio and fit it into my siteEach item is a chamfered Matter.js rectangle as big as its tile, with a mass that grows with its weight: the engine runs in fixed 8 millisecond steps inside the GSAP ticker, and on every frame the HTML tile takes the position and rotation of its body. The name and the prices stay real text, crisp and readable, and the tile is a button that can be pressed from the keyboard too.
The pan is a static body the script moves at every step with Body.setPosition and updateVelocity on, so the items on top follow it through friction. Its height follows a damped spring towards the weight of the items that have landed; every hard knock adds speed to the spring in proportion to the impact speed and the weight, and the pan bobs. The coil underneath is an SVG path redrawn every frame between the pan and the base.
Weight, shipping, total and item count are columns of digits from 0 to 9 that GSAP slides with yPercent, right to left with a small delay and a light back.out. When the shape of the number changes (from €7.90 to €12.50) the columns are rebuilt starting from the previous digits.
| Name | File | Default | What it changes |
|---|---|---|---|
GRAVITY | script.js | 1.2 | The gravity in the well: higher, sharper falls. |
BOUNCE | script.js | 0.08 | How much an item bounces when it hits the pan or another item. |
FRICTION | script.js | 0.55 | The friction between items: low they slide, high they stay where they fall. |
SINK | script.js | 1 | How far the pan sinks for each kilo (1 means 5.5 pixels a kilo). |
SPRING | script.js | 1 | The stiffness of the pan spring: higher, the pan settles sooner. |
WOBBLE | script.js | 0.32 | The damping of the spring: low it bobs for long, 1 it does not swing. |
PAUSE | script.js | 1.6 | Left alone: how many seconds it waits between one gesture and the next. |
LOOP | script.js | true | Left alone, a drawn pointer takes items out and puts them back. |
--accent | style.css | #1f5f46 | The green of the mark, the needle, the bar, the oil and the button. |
--page | style.css | #efece6 | The warm white of the ground. |
--steel | style.css | #b8b2a6 | The colour of the spring. |
For the cart or order summary of a shop that ships heavy goods by weight bands (pantry, kitchen, home, wine, plants): the shopper sees at once how much the parcel weighs and why shipping costs what it does, and works out alone that dropping the lightest item takes it down a band.
The same animation with adapted measures: the card is sized on width and height, the well is at most 40% of the screen tall and the tiles, the pan and the spring scale together; you tap a tile to take it out. Turning the phone keeps the same pile, only bigger or smaller.
No movement: the pile is worked out at once, out of sight, and shown already in place with the pan still at its weight; taking out or putting back an item the tiles fade and reappear in their new place, and the numbers simply change.
GSAP 3.15.0, Matter.js 0.20.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 13 KB; the libraries: GSAP 28 KB, Matter.js 25 KB.
Tested on 16 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.
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.