Skip to content
animorio
IT
All components

Candle loader

Loading, IntroGSAP, CanvasMediumCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On black, in the middle, an ivory candle on a pewter dish, lit only by its own flame: the side towards the light is warm and pale, the side in shadow dark, the wax under the rim glows orange because the light goes into it, and at the top the rim melts into a cup of liquid wax that shines and reflects the flame. The flame has three layers, the orange edge, the yellow heart and the blue-white base near the wick; it trembles continuously and softly, leans to the draught and away from the pointer and straightens back on a spring, and the light around it breathes. Below, The Lantern Walk, Oct 31 · 9 pm, and a line saying what is happening (Lighting the candles, Carving the lanterns, Waking the guests) with the percentage. As the load goes on, in steps like a real one, the wax goes down: the hours cut into the candle, IX, X, XI and XII, each under its band, are eaten one by one; drips are born at the rim and run down the sides in soft surges, with beads where they paused, and set, more matte; one reaches the dish. The wax pool spreads on the dish and the wick, white at its foot, chars and curls. At a hundred the flame gasps and goes out, the ember on the wick cools, and the smoke rises: straight at first, then a wave that grows as it climbs, until it curls, spreads and vanishes under the word Boo, which arrives letter by letter from blurred and narrow to sharp and wide, with the orange dot. Then the candle fades and a new one is lit. A click blows on it; once it is out, a click lights a new one.

How it works

Everything follows one number

The 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 wax lit by the flame

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.

Drips that stop

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.

Real flame and smoke

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.

Values to change

NameFileDefaultWhat it changes
SECONDSscript.js5.6How long the candle takes to burn down, in seconds.
HOLDscript.js2.4How many seconds the word stays in the smoke.
WORDscript.js'Boo.'The word the smoke writes where the flame was.
EVENTscript.js'The Lantern Walk'The name of the event under the candle.
PHASESscript.js['Lighting the candles', 'Carving the lanterns', 'Waking the guests']The three phases of the load.
DONEscript.js'Ready. Mind the dark.'The line once loading is done.
FLICKERscript.js1How much the flame trembles: 0 still.
WINDscript.js1How much the flame bends in the draught: 0 upright.
DRIPSscript.js5How many wax drips run down the sides in one load.
MARKSscript.js['IX', 'X', 'XI', 'XII']The hours cut into the candle.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • The drips have no exit of their own: the drawing cuts the part above the wax line. Animating them separately would make them float over the rim.
  • The canvas light must fade before the canvas edges: a halo bigger than the canvas shows cut like a rectangle. That is why the canvas is as wide as the whole piece and the halo has a radius of 74.
  • Smoke drawn one segment at a time with round caps turns into beads: it has to be traced in long pieces with soft curves and flat caps.

Libraries

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.

Testing

Tested on 30 October 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components