
The elastic button
Buttons, Hover, Text
A Halloween loader: a real ivory candle on a pewter dish is the progress bar. Its three-layer flame lights it: the rim melts into a glowing cup, drips run down the sides in soft surges and set, the pool spreads on the dish, the wick chars and curls, and the hours cut from IX to XII vanish one by one. At a hundred the flame goes out, the smoke rises, curls and writes Boo. Then a new candle is lit.
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>
<!--
"Candle loader" 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, viewport-fit=cover">
<title>The candle that burns down loader</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 candle loader: an ivory candle on a pewter dish, lit by its own flame, is the progress bar. The wax burns
down as the percentage climbs: the rim melts into a glowing cup, drips run down the sides in soft surges and set,
the pool spreads on the dish, the wick chars and curls and the hour marks are eaten one by one. At 100 the flame
goes out, the smoke rises and curls into the word. Then a new candle is lit and it starts over -->
<section class="loader" aria-label="Halloween night loading" data-candela>
<div class="loader__scene" role="progressbar" aria-label="Loading" aria-valuemin="0" aria-valuemax="100"
aria-valuenow="0" aria-valuetext="Lighting the candles" data-scene>
<canvas class="candle" aria-hidden="true" data-canvas></canvas>
<p class="word" aria-hidden="true" data-word></p>
</div>
<div class="loader__meta">
<p class="event"><span class="event__name" data-event>The Lantern Walk</span><span class="event__date">Oct 31 · 9 pm</span></p>
<p class="status" aria-live="polite">
<span class="status__text" data-status>Lighting the candles</span>
<span class="status__num" data-num>0%</span>
</p>
</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.
23 values to change
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 “Candle loader” from Animorio and fit it into my siteThe state lives in one object: how much has loaded (p), how lit the flame is, the gust, the breath, the ember and how black the wick is. GSAP tweens these numbers and a draw in the ticker repaints the canvas every frame: the wax line is TOP_FULL + (TOP_END − TOP_FULL) × p, and from it come the body, the cup, the hours, the drips, the wick and the flame hung at its tip.
The body is a horizontal gradient from the shadowed side to the lit side, mixed between the colours of unlit wax and lit wax by how strongly the flame burns; over it, a veil that darkens downwards and an orange light added with «lighter» just under the rim, like light going into the wax. The cup is an ellipse with an amber radial gradient and a reflection of the flame.
Each drip is born at a threshold of p on the rim and grows in three pushes (power2.out, a pause, power2.inOut, another pause, power3.out), wider at the neck, with beads where it paused and its shadow on the wax; its heat drops over 2.6 s and makes it more matte. The drawing cuts the part above the wax line, so the wax going down eats them.
The flame is a teardrop drawn in three layers (orange edge, yellow heart, blue-white base) whose tip bends more than its base. Flicker, draught and the breathing light come from smooth noise, never from random numbers; the lean is a spring (stiffness 70, damping 8) chasing the draught, the pointer and the gusts. The smoke is a chain of puffs born at the wick: as it climbs, a wave travelling up the column grows with height, as real smoke does, and the chain is drawn in soft pieces that widen and vanish under the word.
| Name | File | Default | What it changes |
|---|---|---|---|
SECONDS | script.js | 5.6 | How long the candle takes to burn down, in seconds. |
HOLD | script.js | 2.4 | How many seconds the word stays in the smoke. |
WORD | script.js | 'Boo.' | The word the smoke writes where the flame was. |
EVENT | script.js | 'The Lantern Walk' | The name of the event under the candle. |
PHASES | script.js | ['Lighting the candles', 'Carving the lanterns', 'Waking the guests'] | The three phases of the load. |
DONE | script.js | 'Ready. Mind the dark.' | The line once loading is done. |
FLICKER | script.js | 1 | How much the flame trembles: 0 still. |
WIND | script.js | 1 | How much the flame bends in the draught: 0 upright. |
DRIPS | script.js | 5 | How many wax drips run down the sides in one load. |
MARKS | script.js | ['IX', 'X', 'XI', 'XII'] | The hours cut into the candle. |
For a wait of a few seconds on a Halloween page or the page of a night out: tickets for an event, a party, a night walk, a shop opening its autumn collection. The candle shows how far along things are without reading the number, and the smoke with the word ends on a joke. For a load of a blink it is too much: a plain bar is better.
The candle sits in a canvas between 170 and 360 pixels tall, depending on the height of the screen (56vh), as wide as the rest, at most 300: it fits whole in the phone box, with the word above and the lines below. The canvas follows the screen density. With a finger a tap blows on it. The animations are the same as on a computer.
No flicker, gusts, spring or smoke: the flame is still and upright, the wax goes down like a bar, the drips appear already run, the flame fades out and the word fades in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.
Tested on 30 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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
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.