
The colour columns
Hover, SVG
Someone searched for “battery” and the site only found buttons and cables with a battery inside. Here is a phone's batteries widget, in a white card on cool paper: the phone, the watch and the earbuds case on three rows, each with its outlined icon, a rolling percentage and a small battery whose liquid fills on a spring with a gently moving surface. The earbuds connect: their row slides in between the others, the green bolt draws itself and a light climbs slowly through the liquid while the charge rises to 100; meanwhile the case drops under 20% and turns red with a single beat. On hover a row opens and says how much is left, “2 h 40 min left”. Minimal style.
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>
<!--
"Battery levels widget" 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>Batteries widget</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 batteries widget of a phone: every device on a row, a battery that fills with a liquid edge, the
percentage that rolls, the bolt that draws itself while charging, red under the low limit -->
<div class="scala">
<section class="card" data-card aria-labelledby="bw-title">
<header class="head">
<div class="head__l">
<h1 class="head__title" id="bw-title">Batteries</h1>
<p class="head__sub" data-head-sub>3 devices</p>
</div>
<span class="head__ic" aria-hidden="true">
<svg viewBox="0 0 20 20"><rect x="2.5" y="6" width="13" height="8" rx="2.4"></rect><path d="M17.5 8.6v2.8"></path><path class="head__lv" d="M5 8.5h5.2v3H5z"></path></svg>
</span>
</header>
<ul class="list" data-list>
<li class="dev" data-dev="phone">
<button class="dev__main" type="button" aria-expanded="false">
<span class="dev__ic" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="7" y="2.8" width="10" height="18.4" rx="2.6"></rect><path d="M10.6 5.4h2.8"></path></svg></span>
<span class="dev__txt"><span class="dev__name">Phone</span><span class="dev__sub" data-sub>On battery</span></span>
<span class="dev__pct"><svg class="bolt" viewBox="0 0 12 16" aria-hidden="true"><path pathLength="1" d="M7.2 1.2 2.4 9h3.8l-1.4 5.8L9.6 7H5.8z"></path></svg><span class="roll" data-pct></span><span class="pct">%</span></span>
<span class="batt" aria-hidden="true"><span class="batt__in"><span class="batt__fill" data-fill><span class="batt__sheen" data-sheen></span><svg class="batt__wave" viewBox="0 0 6 22" preserveAspectRatio="none"><path data-wave></path></svg></span></span><span class="batt__nub"></span></span>
</button>
<div class="dev__more" data-more><div class="dev__more-in"><p data-left></p><p class="muted" data-note>Last full charge 9:12</p></div></div>
</li>
<li class="dev dev--hidden" data-dev="buds">
<button class="dev__main" type="button" aria-expanded="false">
<span class="dev__ic" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M6.4 4.6a3 3 0 0 1 3 3v3.2a1.6 1.6 0 0 1-1.6 1.6H7.2v6.4a1.2 1.2 0 0 1-2.4 0V7.6a3 3 0 0 1 1.6-3z"></path><path d="M17.6 4.6a3 3 0 0 0-3 3v3.2a1.6 1.6 0 0 0 1.6 1.6h.6v6.4a1.2 1.2 0 0 0 2.4 0V7.6a3 3 0 0 0-1.6-3z"></path></svg></span>
<span class="dev__txt"><span class="dev__name">Earbuds</span><span class="dev__sub" data-sub>Connected</span></span>
<span class="dev__pct"><svg class="bolt" viewBox="0 0 12 16" aria-hidden="true"><path pathLength="1" d="M7.2 1.2 2.4 9h3.8l-1.4 5.8L9.6 7H5.8z"></path></svg><span class="roll" data-pct></span><span class="pct">%</span></span>
<span class="batt" aria-hidden="true"><span class="batt__in"><span class="batt__fill" data-fill><span class="batt__sheen" data-sheen></span><svg class="batt__wave" viewBox="0 0 6 22" preserveAspectRatio="none"><path data-wave></path></svg></span></span><span class="batt__nub"></span></span>
</button>
<div class="dev__more" data-more><div class="dev__more-in"><p data-left></p><p class="muted" data-note>Left and right in step</p></div></div>
</li>
<li class="dev" data-dev="watch">
<button class="dev__main" type="button" aria-expanded="false">
<span class="dev__ic" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="6" y="6.4" width="12" height="11.2" rx="3"></rect><path d="M8.6 6.4 9.4 2.8h5.2l.8 3.6M8.6 17.6l.8 3.6h5.2l.8-3.6"></path><path d="M12 9.6V12l1.6 1"></path></svg></span>
<span class="dev__txt"><span class="dev__name">Watch</span><span class="dev__sub" data-sub>On battery</span></span>
<span class="dev__pct"><svg class="bolt" viewBox="0 0 12 16" aria-hidden="true"><path pathLength="1" d="M7.2 1.2 2.4 9h3.8l-1.4 5.8L9.6 7H5.8z"></path></svg><span class="roll" data-pct></span><span class="pct">%</span></span>
<span class="batt" aria-hidden="true"><span class="batt__in"><span class="batt__fill" data-fill><span class="batt__sheen" data-sheen></span><svg class="batt__wave" viewBox="0 0 6 22" preserveAspectRatio="none"><path data-wave></path></svg></span></span><span class="batt__nub"></span></span>
</button>
<div class="dev__more" data-more><div class="dev__more-in"><p data-left></p><p class="muted" data-note>Workout mode off</p></div></div>
</li>
<li class="dev" data-dev="case">
<button class="dev__main" type="button" aria-expanded="false">
<span class="dev__ic" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="4" y="7" width="16" height="11.6" rx="4.2"></rect><path d="M4.4 11.2h15.2"></path><path d="M11 14.2h2"></path></svg></span>
<span class="dev__txt"><span class="dev__name">Earbuds case</span><span class="dev__sub" data-sub>On battery</span></span>
<span class="dev__pct"><svg class="bolt" viewBox="0 0 12 16" aria-hidden="true"><path pathLength="1" d="M7.2 1.2 2.4 9h3.8l-1.4 5.8L9.6 7H5.8z"></path></svg><span class="roll" data-pct></span><span class="pct">%</span></span>
<span class="batt" aria-hidden="true"><span class="batt__in"><span class="batt__fill" data-fill><span class="batt__sheen" data-sheen></span><svg class="batt__wave" viewBox="0 0 6 22" preserveAspectRatio="none"><path data-wave></path></svg></span></span><span class="batt__nub"></span></span>
</button>
<div class="dev__more" data-more><div class="dev__more-in"><p data-left></p><p class="muted" data-note>Charge the case soon</p></div></div>
</li>
</ul>
<footer class="foot"><span data-foot>Updated just now</span></footer>
</section>
</div>
<p class="sr" aria-live="polite" data-live></p>
</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.
39 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 “Battery levels widget” from Animorio and fit it into my siteEach device has an object with its level: GSAP takes it to the new value with a back.out (the spring) and at every step paint() sets the liquid's width, rolls the percentage only when the whole number changes and checks the low limit.
On the liquid's right edge sits a small SVG with a nine-point path recalculated every frame: two sines shifted in time. The amplitude starts as a hair and grows with the level's speed, measured as the difference between one frame and the next and smoothed.
Charging switches on a class that changes the liquid's colour through a CSS variable, draws the bolt with stroke-dashoffset (autoRound off) and slides a light with background-position. Below the limit, the red class and a single beat, scale 1.12 there and back.
The detail under each row goes from height 0 to auto with GSAP; the text inside drops 6 pixels and fades in. It opens on hover, on tap and with the Tab key, and the first touch on the page stops the self-running tour.
| Name | File | Default | What it changes |
|---|---|---|---|
PHONE_LEVEL | script.js | 82 | The phone's charge, in percent. |
WATCH_LEVEL | script.js | 47 | The watch's charge, in percent. |
CASE_LEVEL | script.js | 23 | The earbuds case's charge, in percent. |
BUDS_LEVEL | script.js | 64 | The earbuds' charge when they connect, in percent. |
LOW_LIMIT | script.js | 20 | Below this percentage the battery turns red. |
CHARGE_TIME | script.js | 4.5 | How long the earbuds take to charge fully in the tour, in seconds. |
SPRING | script.js | 1.4 | How far the liquid overshoots the level before settling (0 = no spring). |
SLOSH | script.js | 1 | How much the liquid's surface moves (0 = still). |
LOOP_PAUSE | script.js | 1.8 | The pause at the end of the tour before it starts again, in seconds. |
In the app or site of a brand selling earbuds, watches or accessories; on a product page that shows how long it lasts; in a dashboard that tracks devices (sensors, scooters, robots) and has to say which ones are running low.
The card takes the width with a margin and its spacing, tiles and rows also follow the height with clamp and vh; when the box is short the line at the bottom goes. The battery stays large enough to see the liquid. A tap opens a row, a second tap closes it.
No springs, waves, climbing light or rolling digits: the batteries appear already filled to their level, the earbuds already connected and charging with the bolt drawn, the rows open without motion and the self-running tour does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.9 KB; the libraries: GSAP 28 KB.
Tested on 23 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.