
Falling tools
Physics, Hover
NewFree
A rainbow toy spring walks down the rows of a little page as if they were stairs: the top lifts and arches over, the coils stretch out and pile up on the step below, ringing at every landing. At the bottom it drops, bounces and settles; a toy crane picks it up and takes it back to the top. The pointer pushes it, a click calls the crane at once.
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>Spring down the stairs</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 whole page is the button: a click sends the crane to bring the spring back to the top -->
<button class="catch" type="button" aria-label="Send the crane to bring the spring back to the top" data-catch></button>
<!-- the rows of a little toy shop page: each row is a step of the stairs -->
<ol class="stairs" data-stairs>
<li class="step step--brand"><span class="step__name">Tumble & Twirl</span></li>
<li class="step"><span class="step__name">New in</span><span class="step__note">this week</span></li>
<li class="step"><span class="step__name">Spinning tops</span><span class="step__note">from $4</span></li>
<li class="step"><span class="step__name">Wind-up robots</span><span class="step__note">from $12</span></li>
<li class="step"><span class="step__name">Marbles by the jar</span><span class="step__note">from $6</span></li>
<li class="step"><span class="step__name">Rainbow springs</span><span class="step__note">back in stock</span></li>
<li class="step"><span class="step__name">Paper kites</span><span class="step__note">from $9</span></li>
<li class="step"><span class="step__name">Puzzles and board games</span><span class="step__note">from $15</span></li>
</ol>
<div class="floor" data-floor><span class="floor__text">Free gift wrap on every order</span></div>
<canvas class="spring" aria-hidden="true" data-canvas></canvas>
<p class="hint" data-hint>Click to send the crane. Push the spring with the pointer.</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.
39 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 spring down the stairs” from Animorio and fit it into my siteThe rows are real elements of the page, placed by the script: the first is as wide as the shop's name (measured in its typeface), every row below is one step wider, and the step depends on the width of the screen and on the number of steps. The spring is a little narrower than the step, so it stands on the uncovered piece of row. A function tells how high a row is under a point: it keeps the coils from going through the steps.
A step goes from 0 to 1 and has three parts. In the flight the top leaves the stack and follows an arc down to the step below, turning its direction from up to down; in the pour the stack behind gets shorter and the one in front taller, with a fixed number of coils on the arch; in the flip the tail lets go, goes over and lands on top of the new stack. The arch is a cubic curve between the tops of the two stacks, sampled by length: every coil has a number (with decimals too) and falls in the stack behind, on the arch or in the stack in front. After every step the order turns round, as in a real spring.
Every coil chases its place on a lightly damped spring (STIFFNESS sets its strength) and also pulls its neighbours: the offset of one passes to the others and runs along the spring as a wave. So the top lags behind when it sets off, overshoots when it lands and the stack rings. At every landing the coils near that end get a push downwards, and the step dips a few pixels with elastic.out. The pointer pushes away the coils it touches, in the direction it is moving.
The spring is drawn on a canvas: every coil is an ellipse turned square to the axis, first all the back halves (darker), then the front ones, then a short highlight on the left. The colour goes from one tint to the next along the spring (five colours in :root) and, where a coil is tilted, it lightens towards a pearly sheen: on the arch the spring changes colour like a metal ribbon.
The direction is one GSAP timeline per round: the crane sets the spring down, the steps one after another, the bounce on the floor (squash and jump with tweens, then elastic.out), the pause, the crane coming back. Hanging, coil number r sits at r times the pitch plus the stretch times 1 − (1 − r/N)²: at the top the coils carry the weight of all the others and spread the most. While the spring touches the ground the stretch is limited by the step, so it stretches before it leaves. While the crane travels, the spring swings like a pendulum pushed by the crane's acceleration.
| Name | File | Default | What it changes |
|---|---|---|---|
COILS | script.js | 48 | How many coils the spring has: more coils make a denser ribbon and a fuller arch. |
STEPS | script.js | 6 | How many rows of the page it walks down (up to eight): the extra rows are hidden. |
STIFFNESS | script.js | 1 | How stiff the coils are: low is loose and wobbly, high is tight and quick. |
SPEED | script.js | 1 | The speed of everything: the steps, the bounce and the crane. 2 is twice as fast. |
PUSH | script.js | 1 | How hard the pointer pushes the coils (0 = it does not touch them). |
REST | script.js | 1 | How many seconds the spring rests on the floor before the crane comes. |
--coil-1 | style.css | #ff4f81 | The first colour of the spring's rainbow (the others are --coil-2 to --coil-5, the pearly sheen is --sheen). |
--crane | style.css | #ff6a3d | The colour of the crane's claw. |
For the site of a toy shop or a children's brand, a 404 or "coming soon" page people stay to watch, a list of categories that becomes a game, a long loading screen: anywhere a page can become a little playground.
The same scene with the sizes adapted: the rows are taller and the steps narrower, so the spring is smaller and the steps steeper, and the last jump to the floor is shorter. A finger pushes the coils (the page does not scroll) and a tap sends the crane.
Nothing moves: the rows and the spring fade in, with the spring standing still halfway through a step, arched between two steps. A click fades it out and back in on the next step. No crane, no ringing, and the pointer does not push it.
GSAP 3.15.0, Fredoka (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.
Tested on 10 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.