
The colour columns
Hover, SVG
The energy panel of a smart-home app: four nodes (solar panels, grid, battery, home) joined by thin lines with streaks of light running the way the power goes, faster when there is more of it. Below, three moments of the day: switching them changes who feeds whom, the numbers count, the battery fills or empties and the self-powered share rolls. Hovering a node keeps only its own lines lit.
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>
<!--
"Home energy flow" 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>Home energy flow with light running between solar, battery and grid</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 energy panel of a smart-home app: four nodes (solar, grid, battery, home) joined by thin lines; streaks of
light run along the lines in the direction the power is going, faster when there is more of it; the three
moments of the day below change who feeds whom, the numbers count, the battery fills or empties and the
self-powered share rolls; hovering a node keeps only its own lines lit -->
<section class="panel" data-panel aria-label="Home energy">
<span class="panel__sky" aria-hidden="true"></span>
<header class="top">
<div>
<p class="top__brand">Halo Home</p>
<h1 class="top__title">Home energy</h1>
</div>
<p class="self"><span class="self__n"><span data-self>100</span>%</span><span class="self__l">self-powered</span></p>
</header>
<div class="plot">
<svg data-plot viewBox="0 0 340 292" role="img" aria-label="Diagram of the power flowing between solar panels, the grid, the battery and the home">
<defs>
<filter id="soft" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="3.2"></feGaussianBlur></filter>
<filter id="halo" x="-80%" y="-80%" width="260%" height="260%"><feGaussianBlur stdDeviation="9"></feGaussianBlur></filter>
</defs>
<g class="links">
<g class="link link--solar" data-link="sh"><path class="link__base" d="M170 74V226"></path><path class="link__glow" d="M170 74V226"></path><path class="link__run" d="M170 74V226"></path></g>
<g class="link link--solar" data-link="sg"><path class="link__base" d="M145 57C90 62 46 80 46 120"></path><path class="link__glow" d="M145 57C90 62 46 80 46 120"></path><path class="link__run" d="M145 57C90 62 46 80 46 120"></path></g>
<g class="link link--solar" data-link="sb"><path class="link__base" d="M195 57C250 62 294 80 294 120"></path><path class="link__glow" d="M195 57C250 62 294 80 294 120"></path><path class="link__run" d="M195 57C250 62 294 80 294 120"></path></g>
<g class="link link--grid" data-link="gh"><path class="link__base" d="M46 180C46 240 90 272 145 269"></path><path class="link__glow" d="M46 180C46 240 90 272 145 269"></path><path class="link__run" d="M46 180C46 240 90 272 145 269"></path></g>
<g class="link link--battery" data-link="bh"><path class="link__base" d="M294 180C294 240 250 272 195 269"></path><path class="link__glow" d="M294 180C294 240 250 272 195 269"></path><path class="link__run" d="M294 180C294 240 250 272 195 269"></path></g>
</g>
<g class="node node--solar" data-node="solar" transform="translate(170 44)">
<g data-in>
<circle class="node__halo" r="24" filter="url(#halo)"></circle>
<circle class="node__disc" r="28"></circle>
<g class="node__icon">
<circle cx="0" cy="-8" r="3.3"></circle>
<g data-rays><path d="M0-14.4v-2.2M0-1.6v2.2M-6.4-8h-2.2M6.4-8h2.2M-4.5-12.5l-1.6-1.6M4.5-3.5l1.6 1.6M-4.5-3.5l-1.6 1.6M4.5-12.5l1.6-1.6"></path></g>
</g>
<text class="node__value" y="15"><tspan data-v="solar">4.2</tspan><tspan class="node__unit" dx="2">kW</tspan></text>
</g>
<text class="node__name" x="38" y="-14">Solar</text>
<text class="node__sub" x="38" y="-1" data-sub="solar">Producing</text>
</g>
<g class="node node--grid" data-node="grid" transform="translate(46 150)">
<g data-in>
<circle class="node__halo" r="24" filter="url(#halo)"></circle>
<circle class="node__disc" r="28"></circle>
<g class="node__icon"><path d="M0-15.5-4.6-1.5M0-15.5 4.6-1.5M-3.3-5.6h6.6M-6.6-11.2h13.2M-1.8-11.2-3.3-5.6M1.8-11.2 3.3-5.6"></path></g>
<text class="node__value" y="15"><tspan data-v="grid">0.7</tspan><tspan class="node__unit" dx="2">kW</tspan></text>
</g>
<text class="node__name" x="38" y="-1">Grid</text>
<text class="node__sub" x="38" y="13" data-sub="grid">Exporting</text>
</g>
<g class="node node--battery" data-node="battery" transform="translate(294 150)">
<g data-in>
<circle class="node__halo" r="24" filter="url(#halo)"></circle>
<circle class="node__disc" r="28"></circle>
<g class="node__icon"><rect x="-8" y="-13" width="15" height="9" rx="2.6"></rect><path d="M9.2-10.2v3.4"></path><rect class="node__level" data-level x="-6" y="-11" width="11" height="5" rx="1.2"></rect></g>
<text class="node__value" y="15"><tspan data-v="battery">1.9</tspan><tspan class="node__unit" dx="2">kW</tspan></text>
</g>
<text class="node__name node__name--end" x="-38" y="-1">Battery</text>
<text class="node__sub node__name--end" x="-38" y="13" data-sub="battery">Charging, 62%</text>
</g>
<g class="node node--home" data-node="home" transform="translate(170 256)">
<g data-in>
<circle class="node__halo" r="24" filter="url(#halo)"></circle>
<circle class="node__disc" r="28"></circle>
<g class="node__icon"><path d="M-7.2-6.4 0-13.4 7.2-6.4V-0.6H-7.2Z"></path><rect class="node__window" x="-2" y="-7.2" width="4" height="4" rx="0.8"></rect></g>
<text class="node__value" y="15"><tspan data-v="home">1.6</tspan><tspan class="node__unit" dx="2">kW</tspan></text>
</g>
<text class="node__name" x="38" y="-12">Home</text>
<text class="node__sub" x="38" y="1" data-sub="home">Using</text>
</g>
</svg>
</div>
<div class="seg" data-seg role="group" aria-label="Moment of the day">
<span class="seg__pill" data-pill aria-hidden="true"></span>
<button type="button" data-scene="0" aria-pressed="true">Midday</button>
<button type="button" data-scene="1" aria-pressed="false">Evening</button>
<button type="button" data-scene="2" aria-pressed="false">Night</button>
</div>
</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="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 “Home energy flow” from Animorio and fit it into my siteEach connection is the same SVG path three times: an almost invisible base line, the streak (a dash STREAK long with a gap of 58 units) and a wider blurred copy for the glow. The path is drawn in the direction of the power, so it is enough to bring stroke-dashoffset down.
A function on GSAP’s ticker moves all the streaks: at every frame a line’s offset advances by 26 plus 46 times its kilowatts, times FLOW. Each line also has an opacity that the changes of moment take to 0 or 1: a line with no power does not move and is not seen.
SCENES keeps for each moment the values of the four nodes, the battery level, the self-powered share and the kilowatts of each line. go() animates a single object with the current numbers (the texts, the battery bar and the percentage are rewritten at every step), turns the lines on and off and gives each node a staggered elastic kick.
The control’s pill is an absolute element: it takes the offsetLeft and offsetWidth of the chosen button and goes there with elastic.out. It is measured again on resize and when the fonts arrive.
ENDS says which two nodes each line joins. On a node, the lines that do not contain it drop to 22% and its streaks go from 2.2 to 3 in width; the other nodes stay full only if at that moment they exchange power with it.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | 0 | Which moment it starts from: 0 midday, 1 evening, 2 night. |
FLOW | script.js | 1 | How fast the light runs on the lines (1 = normal). |
STREAK | script.js | 22 | How long each streak of light is, in drawing units. |
COUNT | script.js | 0.9 | In how many seconds the numbers reach the new value. |
SPRING | script.js | 0.8 | How long the spring of the nodes and the control lasts, in seconds. |
SOLAR | script.js | #ffc24a | The colour of the sun and its energy. |
BATTERY | script.js | #45d99a | The colour of the battery. |
GRID | script.js | #8291ff | The colour of the grid. |
PAUSE | script.js | 1.8 | By itself: how many seconds it stays on each moment. |
LOOP | script.js | true | Left alone, a pointer changes moment and hovers the nodes. |
For the dashboard of a smart-home app, an energy supplier, a solar or battery installer, a charging station: the tile that shows at a glance where the power comes from and where it goes. With other nodes it suits any flow: money between accounts, data between services, goods between warehouses.
The same panel: its width is worked out from the screen height too, so the drawing, the head and the control always fit. No hover: a tap on a node keeps it lit, another tap lets it go.
The streaks do not run: the lines carrying power stay lit and still, dashed. The numbers, the control’s pill and the battery go straight to the new value, the words change with a fade and the nodes give no kick.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.4 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.