
Falling tools
Physics, Hover
The first screen of Ampwell Pack 20, a made-up power bank, on a warm white: the headline «Plug in. Forget it.», the matte graphite pack and, on the floor, a real USB-C cable. The cable is a chain of points held by sticks, written by hand, so it sags, swings, slides and comes to rest, with its shadow following it on the floor. You pick up the plug and bring it to the port on the side of the pack: it snaps in, the pack gives a tiny jolt, a thin ring opens at the port, the bolt appears and the four bars light up one after the other while the percentage climbs to 100. Touched again, the plug pops out and falls back, swinging.
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>
<!--
"Power bank cable" 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 power bank hero with the cable you drag into the port</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>
<!-- the opening of the page of a made-up power bank, Ampwell Pack 20. A real USB-C cable lies on the floor: it is a
chain of points held by sticks (Verlet, written by hand), so it sags, swings and rests. Drag its plug into the
port on the side of the pack: it snaps in, the pack gives a tiny jolt, the four charge bars fill one by one and
the percentage rolls to 100. Touch the plug again and it pops out and falls. Left alone, a drawn pointer does it -->
<main class="stage" data-stage>
<canvas class="cable" data-cable aria-hidden="true"></canvas>
<header class="nav" data-nav>
<span class="brand">
<svg viewBox="0 0 20 20" aria-hidden="true"><rect x="2.5" y="5" width="15" height="10" rx="3"/><path d="M9.6 7.4 7.6 10.4h3l-1.9 2.6"/></svg>
Ampwell
</span>
<nav class="nav__links" aria-label="Main">
<a href="#" data-link>Packs</a><a href="#" data-link>Cables</a><a href="#" data-link>Support</a>
</nav>
<a class="nav__cta" href="#" data-cta><span>Buy · $89</span></a>
</header>
<section class="hero">
<p class="eyebrow" data-rise>Ampwell Pack 20</p>
<h1 class="title"><span class="line"><span data-line>Plug in.</span></span> <span class="line"><span data-line>Forget it.</span></span></h1>
<p class="sub" data-rise>Full in 32 minutes. Lasts the whole trip.</p>
</section>
<div class="product" data-product>
<div class="readout" data-readout aria-live="polite">
<span class="readout__state" data-state>Unplugged</span>
<span class="readout__pct"><span data-pct>18</span>%</span>
</div>
<div class="pack" data-pack>
<span class="pack__edge" aria-hidden="true"></span>
<span class="pack__port" data-port aria-hidden="true"></span>
<span class="pack__name" aria-hidden="true">AMPWELL</span>
<svg class="pack__bolt" data-bolt viewBox="0 0 16 16" aria-hidden="true"><path d="M9.2 1.8 4.4 9h3.4l-1.2 5.2L11.6 7H8.2z"/></svg>
<span class="pack__bars" aria-hidden="true"><i data-bar></i><i data-bar></i><i data-bar></i><i data-bar></i></span>
</div>
<span class="floor" aria-hidden="true"></span>
</div>
<p class="hint" data-hint>Drag the cable into the port</p>
<svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.5v15.2l4.1-3.9 2.7 6 2.6-1.1-2.7-5.9 5.6-.3z"/></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.
31 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 “Power bank cable” from Animorio and fit it into my siteThirty points in a chain: every frame they move with their own speed (Verlet) and gravity, then eighteen passes pull them back to the length of their link. The first point is fixed off screen to the left; the last one is the plug.
Every point below the floor goes back above it and loses part of its sideways speed, so the cable slides and stops; a point inside the pack leaves it by the shortest way, over the top or out of the side.
Picked up, the plug chases the hand halfway at every pass, and the cable hangs. When it gets close to the port it locks there: the last point stays still and the one before is pulled straight, like a real strain relief.
A GSAP tween takes the percentage to a hundred; every quarter lights a bar with a small hop and the label changes, rising.
| Name | File | Default | What it changes |
|---|---|---|---|
GRAVITY | script.js | 1700 | How hard the cable is pulled down, in pixels per second squared. |
SEGMENTS | script.js | 30 | How many links the cable is made of: more is softer. |
SLACK | script.js | 1.02 | How much longer the cable is than the shortest way to the port. |
STIFFNESS | script.js | 18 | How many times per frame the links go back to their length. |
FLOOR_FRICTION | script.js | 0.82 | How fast the cable stops sliding on the floor. |
SNAP | script.js | 3.4 | How close to the port the plug must get to snap in. |
CHARGE_TIME | script.js | 4.2 | Seconds to reach 100%. |
START_LEVEL | script.js | 18 | The charge when the page opens, in percent. |
CABLE | script.js | '#f2f0ea' | The colour of the cable. |
IDLE | script.js | 1.2 | Seconds before the pointer starts by itself. |
In the opening of the page of a product you plug in: a power bank, a charger, headphones, a lamp, a small appliance; or in a «how it works» section of an electronics shop.
The measures start from a unit that is the smaller of a hundredth of the width and a hundredth and a third of the height: pack, cable and plug shrink together, the pack widens a little and the bar links disappear. The cable is picked up with the finger, with the same physics.
No physics and no pointer: the cable is already laid and plugged in, the pack is full and the bars are lit; the headline and the rest fade in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.5 KB; the libraries: GSAP 28 KB.
Tested on 14 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.