
The colour columns
Hover, SVG
The day’s macros in a food app: the calorie ring, the three bars for protein, carbs and fat and four meals to add. Tap a meal and its plus becomes a tick, the ring grows while the calories count and the bars lengthen one after the other with a bounce. Hover a bar and the numbers roll into what is left to the goal.
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>
<!--
"Macro tracker" 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>Macro tracker</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 day's macros in a food app: add a meal and the calorie ring and the three bars grow on springs
while the numbers count; hover a bar to read what is left -->
<section class="mt" data-mt aria-label="Today's macros">
<header class="mt__head"><h2>Today</h2><span>Goal <b data-goal></b> kcal</span></header>
<div class="mt__body">
<div class="mt__ring">
<svg viewBox="0 0 104 104" aria-hidden="true"><circle class="mt__track" cx="52" cy="52" r="44"></circle><circle class="mt__arc" data-arc pathLength="1" cx="52" cy="52" r="44" transform="rotate(-90 52 52)"></circle><circle class="mt__over" data-over pathLength="1" cx="52" cy="52" r="44" transform="rotate(-90 52 52)"></circle></svg>
<div class="mt__kcal"><b data-kcal></b><span data-kcalsub>kcal eaten</span></div>
</div>
<ul class="mt__bars" data-bars></ul>
</div>
<div class="mt__meals" data-meals role="group" aria-label="Meals"></div>
<span class="mt__say" data-say aria-live="polite"></span>
</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.
17 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 “Macro tracker” from Animorio and fit it into my siteCalories, protein, carbs and fat as shown live in one object; at each tap the chosen meals are summed again and four tweens take it there.
Calories arrive on a soft curve, the three macros on an elastic six hundredths apart: the bars lengthen in a row.
An SVG circle with pathLength 1 and stroke-dashoffset equal to one minus the share of the goal; a second circle on top shows the excess.
Over a bar a variable says the remainder is wanted: the same function that writes the grams then writes “88 g to go”, and the text rolls.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #2fb573 | The colour of the calorie ring and the chosen meals. |
GOAL | script.js | 2100 | The day’s calorie goal. |
FILL_TIME | script.js | 0.9 | How many seconds the ring and the bars take to reach the new value. |
SPRING | script.js | 1 | How much the bars and the meal’s tick bounce: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer adds two meals, looks at what is left and adds another. |
On the day screen of a nutrition or training app, in a meal diary, in a health dashboard; and for any goal made of several parts that fill together.
It is made for the phone: the card is 318 pixels wide at most, the meals are 38-pixel buttons in two columns, and with a finger the “what is left” is read by focusing the bar.
Ring, bars and numbers go straight to the new value; plus and tick swap without turning and the numbers on the bar change without rolling. 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 5.7 KB; the libraries: GSAP 28 KB.
Tested on 22 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.