
The colour columns
Hover, SVG
The charging session of an electric car at a fast charger, live: the battery fills towards its 80% limit, energy and cost count up, the minutes left go down and the power, full at first, tapers as the battery fills, along a curve that draws itself. “Stop charging” halts everything with the power dropping to zero; once the limit is reached, the bolt becomes a tick.
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>
<!--
"EV charging session" 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>EV charging session</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">
<!-- a live charging session at a fast charger: the battery fills towards its limit, energy and cost count
up, the power tapers as the battery gets full, and the session can be stopped and resumed -->
<section class="ev" data-ev aria-labelledby="ev-title">
<header class="ev__head">
<span class="ev__bolt" aria-hidden="true"><svg viewBox="0 0 24 24"><path class="bl" d="M13 3.500 6 13.500h5l-1 7 7-10h-5Z"></path><path class="ck" pathLength="1" d="m6 12.500 4 4 8-9"></path></svg></span>
<span class="ev__name"><b id="ev-title">Volta Hub, bay 4</b><span class="ev__stateroll"><span data-state>Charging, CCS</span></span></span>
<span class="ev__eta"><b data-eta>14</b><span>min left</span></span>
</header>
<div class="ev__battery">
<svg viewBox="0 0 300 96" aria-hidden="true">
<defs><clipPath id="ev-cell"><rect x="6" y="6" width="272" height="84" rx="17"></rect></clipPath><clipPath id="ev-level"><rect data-level x="6" y="6" width="0" height="84"></rect></clipPath></defs>
<rect class="shell" x="2" y="2" width="280" height="92" rx="21"></rect>
<rect class="cap" x="286" y="32" width="10" height="32" rx="4"></rect>
<g clip-path="url(#ev-cell)">
<rect class="fill" data-fill x="6" y="6" width="0" height="84"></rect>
<g clip-path="url(#ev-level)"><rect class="sheen" data-sheen x="-60" y="6" width="46" height="84"></rect></g>
<path class="ticks" d="M60.400 6v84M114.800 6v84M169.200 6v84M223.600 6v84"></path>
</g>
<path class="limit" data-limit d="M0 0v92"></path>
</svg>
<p class="ev__pct"><b data-pct>46</b><span>%</span></p>
<p class="ev__to"><span data-to>to 80%</span></p>
</div>
<dl class="ev__stats">
<div><dt>Energy</dt><dd><b data-kwh>0.0</b> kWh</dd></div>
<div><dt>Cost</dt><dd>€<b data-cost>0.00</b></dd></div>
<div><dt>Power</dt><dd><b data-kw>0</b> kW</dd></div>
</dl>
<svg class="ev__curve" viewBox="0 0 300 34" preserveAspectRatio="none" aria-hidden="true">
<path class="back" data-curve-back d=""></path>
<path class="front" data-curve pathLength="1" d=""></path>
</svg>
<button class="ev__go" type="button" data-go><span class="ev__gotext"><span data-golabel>Stop charging</span></span></button>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.
30 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 “EV charging session” from Animorio and fit it into my siteThe charge and the power shown. A single function draws everything from there: the width of the green (an SVG attribute), the percentage, the kWh, the cost, the minutes and how much of the curve is lit.
Full up to 60%, then falling in a straight line to a third at 100%. On every frame the charge grows in proportion to the power: that is why it slows towards the end.
The simulation runs in GSAP’s ticker with time capped at a thirtieth of a second, so a dropped frame does not make the charge jump; when it is paused or full nothing is computed.
The same path twice: the one behind grey, the one in front green with pathLength 1 and the stroke-dashoffset equal to the part still to go.
The power shown does not jump: a tween takes it to zero on stopping and back to the real value on resuming.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #3ddc84 | The colour of the charge, of the curve and of charging in progress. |
START | script.js | 46 | The battery’s charge when the session starts, in percent. |
LIMIT | script.js | 80 | The limit at which charging stops, in percent. |
PRICE | script.js | 0.49 | The price of one kWh, in euros. |
POWER | script.js | 120 | The charger’s peak power, in kW. |
SPEED | script.js | 5 | How many charge points per second at peak power: the demo runs faster than real life. |
LOOP | script.js | true | Left alone, the demo’s pointer stops charging, resumes it and the session starts again. |
In the app of an electric car, a charging network or a fleet: the screen people watch while the car is plugged in, to know how long is left, how much they are spending and to stop charging from the phone.
The same card, as wide as the screen minus the margins: the battery is an SVG that tightens with the width, the charge figure shrinks a little and the three tiles stay in a row with tabular figures, so they do not jitter.
Nothing runs: the session is shown already finished, with the battery at its limit, the final kWh and cost, the whole curve and the tick. The button shows on request the session half way, paused, with no counting. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.5 KB; the libraries: GSAP 28 KB.
Tested on 24 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.