
The word on the elastic line
Hover, Text, Physics
NewFree
A balloon shop's headline written in puffy foil letters, each one tied with a curling ribbon to a little weight on the floor. The physics is real: the pointer blows into the air and the letters lean, knock together, turn on their ribbons and float back up. A click ties a new balloon where you clicked, and the whole bunch makes room for it.
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>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The balloon headline</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fredoka@5.3.0/standard.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the wall, the floor, the weights, the ribbons and the foil balloons: one canvas drawn by the script -->
<canvas class="sky" data-sky aria-hidden="true"></canvas>
<header class="brand" data-in>
<svg class="brand__mark" viewBox="0 0 28 40" aria-hidden="true">
<path d="M14 2c6.4 0 11 4.9 11 11.2 0 7.4-5.6 13.3-9.4 15.2h-3.2C8.6 26.5 3 20.6 3 13.2 3 6.9 7.6 2 14 2z" fill="currentColor"/>
<path d="M12.2 28.4h3.6l-1 2.4h-1.6z" fill="currentColor"/>
<path d="M14 30.8c-1.8 2.2 1.8 3.6 0 5.8s1.6 2.4 0.4 3.2" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/>
<path d="M9.4 9.2c1-2.2 2.8-3.4 4.8-3.6" fill="none" stroke="#fff" stroke-opacity="0.7" stroke-width="1.8" stroke-linecap="round"/>
</svg>
<span class="brand__name">Helium Hour</span>
</header>
<p class="hint" data-hint data-in>Blow on the letters with your pointer. Click the sky to tie on another balloon.</p>
<h1 class="sr-only" data-title>Big day</h1>
<footer class="copy">
<p class="copy__line" data-in>Foil letters, filled and tied, at your door by nine. Balloons for birthdays, launches and every big day in between.</p>
<button class="pill" type="button" data-add data-autoclic data-in><span class="pill__bg" aria-hidden="true"></span><span class="pill__text">Add a balloon</span></button>
</footer>
</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
With the Animorio connector, Claude Code takes it from here, guide included, and fits it into your project. Paste this request:
Take “The balloon headline” from Animorio and fit it into my siteEvery letter is written on an offscreen canvas with fillText and strokeText together, with a fat pen and round corners: the extra stroke is the puff. That silhouette gives five pictures: the lit foil (a top-to-bottom gradient, an inner shade low right and an inner light high left made with shadowBlur on the negative of the silhouette, the swell along the middle of the strokes, the seam as a ring just inside the edge), a bright copy for the reflections, a dark one for when the letter turns side-on, the blurred shadow on the wall and the place of the valve, found by reading the pixels: the lowest point of the silhouette near the middle.
Every balloon has two points: the one the helium pulls, straight above the valve, and the valve where the ribbon is tied. They are held at a fixed distance, and since the helium pulls the first up and the ribbon holds the second down, the balloon stands upright by itself. The ribbon is a chain of twelve points that can go slack but never stretch; on top of that every point is held within its own length of ribbon from the weight, so the ribbon never stretches out. Everything runs at 120 steps a second with position-based dynamics (Verlet with constraints), eight constraint passes per step.
The air is a field of velocities: a slow breeze made of two waves, the opening gust crossing the room and the pointer, which hands its speed to the air around it with a soft falloff and a little outward puff. Balloons and ribbons get no pushes: they are dragged towards the speed of the air, the balloon a little, the ribbon more. Wind passing harder on one side turns the foil on its ribbon, which has a torsion spring and brings it back face on.
Every balloon collides as a capsule (a segment with a radius) drawn inside its silhouette, thinner when the foil is turned side-on. Two capsules that touch are pushed apart in proportion to their weight, then the bounce is added, a turn from the sliding and an elastic squash. A new balloon rises straight above its weight: if a letter is above it or level with it, the weight moves to the nearest free lane (at the sides, between words), otherwise the balloon stays just under the words.
The opening is a single GSAP timeline: parcels dropping with bounce.out, each letter swelling with elastic.out while its ribbon unreels, the gust. GSAP only animates numbers (fill, ribbon length, position and strength of the wind); the physics runs in GSAP's ticker. With reduced motion nothing moves: the headline fades in already in place, and a new balloon quietly works out the new balance, which fades in over the old one.
| Name | File | Default | What it changes |
|---|---|---|---|
TITLE | script.js | 'BIG DAY' | The words on the balloons (up to sixteen letters): on a phone every word can get a line of its own. |
BLOW | script.js | 1 | How hard the pointer blows on the balloons. |
LIFT | script.js | 1 | How hard the helium pulls: more pulls the ribbons tighter and makes them sway quicker. |
AIR | script.js | 1 | How thick the air is: 0.4 lets them sway for a long time, 2.5 calms them at once. |
SPIN | script.js | 1 | How readily a foil balloon turns round on its ribbon. |
BREEZE | script.js | 0.3 | The faint draught that keeps them always moving a little (0 = still air). |
BOUNCE | script.js | 0.45 | How springy a knock between two balloons is. |
MAX_EXTRA | script.js | 6 | How many balloons can be added before the oldest is untied and floats away. |
For the first page of a balloon or party shop, a service that organises birthdays, weddings and launches, an online invitation, an event page or a seasonal promotion: a headline to play with that says party straight away.
The same physics with the sizes adapted: the words go one per line, bigger, and the weights of the two lines stand in two rows on the floor. You blow by dragging a finger across the letters; a tap on a letter pokes it, a tap on the sky ties on a new balloon.
Nothing moves and there is no wind: the headline fades in already hanging in place. A new balloon fades in where it ends up, with the letters already settled; the oldest, past the limit, disappears in the same fade.
GSAP 3.15.0, Fredoka (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 19 KB; the libraries: GSAP 28 KB.
Tested on 13 October 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.
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.