
The wrecking-ball logo
Intro, Physics, SVG, Text
NewFree
In the minimal style: the letters of a word threaded like beads on a hair-thin string between two small pegs, hanging as a true catenary. The pointer pulls the string down and the letters slide towards the lowest point; a click lets it go slack and the letters bunch up in the middle, the next one pulls it tight in one go, the string rings and the letters fly back into line.
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>Strand</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/bricolage-grotesque@5.3.0/standard.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- one thread between two pegs, the letters of one word threaded on it like beads; the whole room is the button -->
<main class="stage" data-stage data-autoclic tabindex="0" role="button" aria-label="The letters of a word threaded on a thread. Press to let the thread go slack or pull it tight.">
<svg class="lines" data-lines aria-hidden="true">
<path class="chord" data-chord d="" />
<path class="ext" data-ext d="" />
<path class="dim" data-dim d="" />
<path class="thread" data-thread d="" />
<g class="letters" data-letters></g>
<g class="peg" data-peg-a><circle r="4.5" /><path class="peg__slot" d="M-2.8 0H2.8" /></g>
<g class="peg" data-peg-b><circle r="4.5" /><path class="peg__slot" data-slot d="M-2.8 0H2.8" /></g>
</svg>
<p class="hint" data-hint>Pull the thread down. Click to let it go slack, again to pull it tight.</p>
<p class="read" data-readout><span class="read__label">Sag</span> <b class="read__value" data-read>0 px</b></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.
17 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 letters threaded on a string” from Animorio and fit it into my siteThe curve of the string is the true one of a hanging chain, y = a·cosh(x/a): from the distance between the pegs and the length of the string the parameter a comes out of a bisection (the length is 2a·sinh(D/2a)), and the rest follows. SAG says how much it hangs at rest, and the length is worked out from that; the click that lets the string out only makes it longer, and the curve is rebuilt every frame. Writing the difference of two cosh as a product of two sinh keeps the sum exact even when the string is almost straight.
When the pointer presses on the string, the string becomes two pieces of catenary, from the peg to the pointer and from the pointer to the other peg. The pointer only pushes down and the string slides over it, so the horizontal pull is the same on both sides: one parameter a for both pieces, found by a bisection until the two lengths add up to the string. If the two straight pieces are already longer than the string, it is taut and stretches; beyond STRETCH it slips off.
On top of its resting curve the string can vibrate in its natural shapes, twelve sines between the pegs, each a damped spring with its own frequency (TWANG for the first, twice that for the second and so on). When the resting curve jumps (the string slips off the pointer, the click pulls it tight) the difference between the old and the new one is broken down into those sines: the string starts from where it was and swings towards its new shape. A letter landing or two letters knocking give a small blow at their point.
Every letter is a bead: it only has a position along the string and a speed, moved in steps of a two-hundred-and-fortieth of a second. The slope of the string where it sits gives the pull of gravity and the force pressing on the string gives the friction: while the slope stays under FRICTION the letter holds, then it slides with a slightly lower friction. Letters never pass each other: contacts are solved in pairs, with a small bounce only for hard knocks, and the distance grows when two neighbours are turned differently, so their feet never touch. Each letter is drawn turned like the string, and narrows on the wdth axis when it runs.
The first click is a GSAP timeline that lengthens the string (the peg turns by as much string as it lets go) and hands the letters over to physics. The second shortens the string at once, hands the jump to the vibration, and takes every letter home with one expo.out tween, the same for all, so none overtakes another; then the nods from the middle outwards and the string going back to its curve with power2.inOut. In the end everything is exactly as before. With reduced motion the two scenes swap with a fade.
| Name | File | Default | What it changes |
|---|---|---|---|
WORD | script.js | 'STRAND' | The word threaded on the string (up to 12 letters; capitals look best, since the string runs through the middle of their height). |
SAG | script.js | 0.05 | How much the string sags at rest, as a share of the span between the pegs: 0 is pulled straight. |
SLACK | script.js | 0.2 | How deep it hangs when a click lets it out: the deeper, the faster the letters slide to the middle. |
SPREAD | script.js | 0.78 | How much of the string the word covers at rest: the higher, the more spaced out the letters and the further they slide. |
GRAVITY | script.js | 2400 | How hard the letters slide down, in pixels per second squared. |
FRICTION | script.js | 0.16 | How much the letters grip the string: 0.04 they slide at once, 0.5 they hardly move even on a steep string. |
STRETCH | script.js | 0.1 | How far the string stretches under the pointer before it slips off and rings (0.1 = a tenth). |
TWANG | script.js | 3 | The pitch of the vibration, in swings per second: low is a soft rubber band, high a guitar string. |
--weight | style.css | 640 | The weight of the letters, from 200 to 800. |
For a heading or a brand name you can touch: the opening of a portfolio or a design studio, the cover of a collection (jewellery, yarn, beads), an empty state or the 404 of an app, a playful moment in a landing page. It works with any short word.
The same physics with the sizes adapted: the letters cover a bigger share of the string and the pegs sit a few pixels from the edges. You grab and drag the string with a finger, a tap lets it go slack and the next tap pulls it tight.
Nothing moves: the string, the pegs and the word fade in, and the pointer does not pull the string. A click fades out the string and the letters and brings them back with the string hanging low and the letters bunched in the middle; the next click brings back, again with a fade, the spaced-out word on the resting string.
GSAP 3.15.0, Bricolage Grotesque (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.
Tested on 14 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.