
The colour columns
Hover, SVG
Halyard, a made-up analytics dashboard: where this month’s visits came from, as ten packed bubbles whose area is the number of visits. They grow from the middle one after another and settle against each other; pointing at one lifts it with a soft shadow, its neighbours make room and a tag gives the name, visits and share; switching month slides every bubble to its new size on a spring. Minimal style, SVG and GSAP.
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>
<!--
"Packed bubble chart" 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>Packed bubble chart</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Halyard, a made-up analytics dashboard: where this month's visitors came from, as packed bubbles whose area
is the number of visits. Bubbles grow from the middle and settle against each other; pointing at one lifts it
and shows its numbers; switching the period slides every bubble to its new size on springs -->
<main class="stage">
<section class="panel" aria-label="Traffic sources, Halyard analytics">
<header class="head">
<p class="brand"><svg class="brand__mark" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 13 8 3l5 10" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" stroke-linecap="round"/><path d="M5.6 9h4.8" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>Halyard</p>
<h1 class="title">Where visitors came from</h1>
<p class="total"><span class="total__num" data-total>0</span> <span class="total__unit">visits</span></p>
</header>
<div class="period" role="tablist" aria-label="Period" data-period>
<span class="period__pill" data-pill aria-hidden="true"></span>
<button class="period__btn is-on" type="button" role="tab" aria-selected="true" data-tab="now">This month</button>
<button class="period__btn" type="button" role="tab" aria-selected="false" data-tab="then">Last month</button>
</div>
<div class="chart" data-chart>
<svg class="chart__svg" data-svg role="img" aria-label="Packed bubble chart of traffic sources">
<defs>
<radialGradient id="sheen" cx="35%" cy="28%" r="75%">
<stop offset="0" stop-color="#fff" stop-opacity=".55" />
<stop offset=".5" stop-color="#fff" stop-opacity=".08" />
<stop offset="1" stop-color="#fff" stop-opacity="0" />
</radialGradient>
</defs>
<g data-bubbles></g>
</svg>
<div class="tip" data-tip aria-live="polite">
<p class="tip__name" data-tip-name></p>
<p class="tip__nums"><span data-tip-value></span> <span class="tip__sep">·</span> <span data-tip-share></span></p>
</div>
</div>
</section>
</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.
26 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 “Packed bubble chart” from Animorio and fit it into my siteEach bubble’s radius is the square root of its visits, so area is proportional. Largest first, each bubble takes the free spot tangent to two placed bubbles that is closest to their centre of mass: a hand-written greedy algorithm, plenty for ten bubbles. Then the whole thing is centred on its bounding box.
The two months are packed separately but with the same scale, the one of the wider of the two, so the areas really compare. The scale is recomputed whenever the chart changes size.
Each bubble’s position and radius chase their targets on a hand-written spring on gsap.ticker (stiffness 170, damping 17): on entry the targets switch on one after another from the middle, on a month change they all change at once.
The bubble under the pointer lifts four pixels with two soft shadows, its neighbours move away along the line between centres, more the closer they are, and the tag follows it while staying inside the chart.
Name and number are two texts with dominant-baseline central, shifted by half their block: together they sit in the middle of the circle. Small bubbles keep only the number, centred.
| Name | File | Default | What it changes |
|---|---|---|---|
SPEED | script.js | 1 | Speed of everything. |
STIFFNESS | script.js | 170 | Stiffness of the bubble springs. |
DAMPING | script.js | 17 | Spring damping: lower means more bounce. |
GAP | script.js | 0.035 | Space between bubbles, as a share of the largest one. |
STAGGER | script.js | 0.07 | Seconds between one bubble and the next on entry. |
LIFT | script.js | 4 | Pixels the pointed bubble lifts. |
PUSH | script.js | 5 | Pixels the neighbours move aside. |
HOLD | script.js | 1.4 | Seconds on each bubble in the self-running loop. |
For an analytics dashboard, a monthly report, a product’s numbers page or anywhere a share of a total reads better as an area than as a bar.
The same chart, sized on the shorter side of the screen; a tap points at a bubble.
No springs and no nudging: the bubbles are already in place and the month change fades.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.2 KB; the libraries: GSAP 28 KB.
Tested on 1 December 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.