
The colour columns
Hover, SVG
The Today card of a home solar panel app, dark with a warm light and grain: the bell curve of production draws itself from sunrise to sunset with a warm gradient under it, the dashed line of the house's consumption crosses it and the share sent to the grid lights up where production beats consumption. Above it, the arc of the sun: a small disc of light rides it at the hour under the pointer, a dot slides on the curve and the kW roll digit by digit. In the footer the day's total in kWh, the energy sent to the grid and the money saved.
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 solar dashboard" 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 home solar production chart</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" data-stage>
<!-- the Today card of Brightfold, an invented app for home solar: the day's production as a bell curve from
sunrise to sunset, the house's consumption crossing it, the energy sent to the grid lit where production is
higher, and over it all the arc of the sun, which follows the pointer along the day -->
<article class="card" data-card>
<header class="card__head">
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
<path d="M3 14.5a7 7 0 0 1 14 0" />
<circle cx="10" cy="14.5" r="2.6" />
<path d="M2 17.5h16" />
</svg>
<span class="brand__name">Brightfold</span>
</span>
<span class="chip">
<span class="chip__words">Today</span>
<svg class="chip__chev" viewBox="0 0 10 10" aria-hidden="true"><path d="M2.5 4l2.5 2.5L7.5 4" /></svg>
</span>
</header>
<section class="now" aria-label="Right now">
<div class="now__main">
<span class="label">Solar at <span class="now__time" data-time>1:10 PM</span></span>
<p class="big"><span class="roll" data-roll="kw" data-dec="2" data-int="1"></span><span class="big__unit">kW</span></p>
</div>
<dl class="now__side">
<div class="side">
<dt class="side__label"><svg class="key key--home" viewBox="0 0 12 4" aria-hidden="true"><path d="M1 2h10" /></svg>Home</dt>
<dd class="side__value"><span data-home>0.42</span> kW</dd>
</div>
<div class="side side--grid" data-grid-row>
<dt class="side__label"><svg class="key key--grid" viewBox="0 0 12 4" aria-hidden="true"><path d="M1 2h10" /></svg><span data-grid-word>To grid</span></dt>
<dd class="side__value"><span data-grid>4.20</span> kW</dd>
</div>
</dl>
</section>
<div class="chart" data-chart>
<svg class="chart__svg" data-svg aria-hidden="true">
<defs>
<linearGradient id="sf-area" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" style="stop-color:var(--sun)" stop-opacity="0.34" />
<stop offset="0.55" style="stop-color:var(--ember)" stop-opacity="0.12" />
<stop offset="1" style="stop-color:var(--ember)" stop-opacity="0" />
</linearGradient>
<linearGradient id="sf-export" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" style="stop-color:var(--glow)" stop-opacity="0.78" />
<stop offset="1" style="stop-color:var(--sun)" stop-opacity="0.22" />
</linearGradient>
<linearGradient id="sf-line" x1="0" y1="0" x2="1" y2="0">
<stop offset="0" style="stop-color:var(--ember)" />
<stop offset="0.5" style="stop-color:var(--glow)" />
<stop offset="1" style="stop-color:var(--ember)" />
</linearGradient>
<radialGradient id="sf-disc">
<stop offset="0" stop-color="#fffaf0" />
<stop offset="0.38" style="stop-color:var(--glow)" />
<stop offset="1" style="stop-color:var(--sun)" stop-opacity="0" />
</radialGradient>
<pattern id="sf-hatch" width="5" height="5" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
<path d="M0 0v5" stroke="rgba(255,236,200,0.22)" stroke-width="1" />
</pattern>
<clipPath id="sf-clip-prod"><rect data-clip-prod x="0" y="-20" width="0" height="400" /></clipPath>
<clipPath id="sf-clip-home"><rect data-clip-home x="0" y="-20" width="0" height="400" /></clipPath>
</defs>
<g class="grid" data-gridlines></g>
<path class="arc" data-arc />
<g clip-path="url(#sf-clip-prod)">
<path class="area" data-area fill="url(#sf-area)" />
<g class="export" data-export>
<path class="export__fill" data-export-fill fill="url(#sf-export)" />
<path class="export__hatch" data-export-hatch fill="url(#sf-hatch)" />
</g>
<path class="prod prod--soft" data-prod-soft />
<path class="prod" data-prod stroke="url(#sf-line)" />
</g>
<path class="home" data-home-line clip-path="url(#sf-clip-home)" />
<line class="base" data-base />
<g class="ticks" data-ticks></g>
<g class="scrub" data-scrub>
<line class="scrub__hair" data-hair />
<circle class="scrub__home" data-dot-home r="2.6" />
<circle class="scrub__halo" data-dot-halo r="11" />
<circle class="scrub__dot" data-dot r="3.4" />
</g>
<g class="sun" data-sun>
<circle class="sun__glow" r="14" fill="url(#sf-disc)" />
<circle class="sun__core" r="4.2" />
</g>
</svg>
<span class="flag" data-flag><span data-flag-words>To grid</span></span>
</div>
<footer class="foot">
<div class="stat">
<span class="label">Produced</span>
<p class="stat__value"><span class="roll" data-roll="total" data-dec="1" data-int="2"></span><span class="stat__unit">kWh</span></p>
</div>
<div class="stat">
<span class="label">Sent to grid</span>
<p class="stat__value"><span class="roll" data-roll="sent" data-dec="1" data-int="2"></span><span class="stat__unit">kWh</span></p>
</div>
<div class="stat stat--save">
<span class="label">Saved</span>
<p class="stat__value"><span class="stat__cur">€</span><span class="roll" data-roll="saved" data-dec="2" data-int="1"></span></p>
</div>
</footer>
</article>
<svg class="pointer" data-pointer viewBox="0 0 20 24" aria-hidden="true">
<path d="M3 2.2v17.2l4.4-4.1 2.9 6.4 2.7-1.2-2.9-6.3 6-.4z" />
</svg>
<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.
41 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 solar dashboard” from Animorio and fit it into my siteProduction is a sine between sunrise and sunset raised to 1.55 (a bell narrower at the top), times the peak and the valley of a cloud, a Gaussian in the afternoon. Consumption is a fixed base plus four Gaussians: breakfast, lunch, tea and dinner. The day is sampled in 320 steps and the totals are added up once, keeping the partials at each step so the figures can count while it draws.
The viewBox is as big as the chart: x and y are real pixels, so the lines stay 1 px and the labels don't stretch. On resize (even halfway) a ResizeObserver rebuilds the lines, the curves, the arc and the grid band.
Curve, area and grid band sit inside a clipping rectangle that widens with the drawn hour: everything advances together without measuring path lengths, and the consumption line has its own clip.
The stretches where production beats consumption are found, with the exact crossing interpolated between two samples; the path goes forward along production and back along consumption. Two layers: the gold gradient and a hatch in a pattern that drifts slowly, faster while the pointer is inside it.
The sun's disc sits at the hour's x and at the height of the ellipse that runs from sunrise to sunset; the hour follows the pointer on a spring. Each digit is a column from 0 to 9 plus a 0: the column eases to its digit every frame and, when it is shorter, goes from 9 round to 0.
| Name | File | Default | What it changes |
|---|---|---|---|
PEAK | script.js | 4.6 | The panels' best output at midday, in kW. |
CLOUD | script.js | 0.3 | How deep the dip of the afternoon cloud is (0 = clear sky). |
SUNRISE | script.js | 6.2 | Sunrise, in hours (6.2 = 6:12). |
SUNSET | script.js | 20.1 | Sunset, in hours. |
DRAW | script.js | 3.2 | How long the curve takes to draw, in seconds. |
PRICE | script.js | 0.31 | What a kWh from the grid costs, in euros (energy used from the panels saves this). |
FEED | script.js | 0.09 | What a kWh sent to the grid earns, in euros. |
STIFFNESS | script.js | 190 | The spring that pulls the sun and the dot to the pointer: higher is quicker. |
DAMPING | script.js | 19 | Lower lets them pass the mark and come back. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Draws the day and walks along it again and again. |
In the dashboard of a home energy app, a solar system, a home battery, an EV charger or an electricity supplier, and on the landing page of a solar panel seller: wherever you want to show at a glance how much energy was made and how much went to the grid. The colours are --sun, --ember, --glow and --home in the CSS, the data are prod() and home() in the script.
The same animations at adapted sizes: the card takes the full width minus the margins, the chart is measured on the height (36vh, between 130 and 200 px) and redrawn in pixels, the big figure and the totals with min(vw, vh). With a finger you slide over the chart and the sun follows.
The chart fades in already drawn; there is no drawn pointer and the sun, the dot and the figures jump to four hours of the day without sliding. With the real pointer they move at once, without the spring.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.
Tested on 4 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.