Skip to content
animorio
IT
Back to the library

Melting wax label

Scroll, Images, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.0 KBGSAP + ScrollTrigger 45 KBFreeDownload the zip

Scroll inside the preview

A candle’s product page: a wax-coloured label covers the real photo of the product and, as you scroll, it melts and runs down. The edge drops faster in some places and leaves thin strands of wax behind, it has its own darker thickness, and the pointer melts it first where it passes. Once it is gone the photo, the name, the price and “Add to bag” remain.

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>
<!--
  "Melting wax label" 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">
  <title>Melting label</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>
    <!-- the scene is taller than the screen: the stage holds still while the wax label melts -->
    <section class="scene" data-scene>
      <div class="stage" data-stage>
        <!-- underneath: the real photo of the candle, with what you need to buy it -->
        <figure class="shot">
          <img src="candela-ambra.webp" width="960" height="665" alt="A lit amber candle in a glass jar on a wooden table by a window">
          <i class="shot__shade" aria-hidden="true"></i>
        </figure>
        <div class="buy" data-buy>
          <p class="buy__name"><span data-in>Amber &amp; Cedar</span></p>
          <p class="buy__meta"><span data-in>Soy wax, 60 hours</span></p>
          <a class="buy__btn" href="#" data-in><span>Add to bag</span><b>$38</b></a>
        </div>
        <!-- on top: the wax. The rim is the same shape a few pixels higher, so the edge has a thickness -->
        <i class="wax wax--rim" data-rim aria-hidden="true"></i>
        <div class="wax" data-wax>
          <div class="label" data-label>
            <p class="label__brand">Halden Candle Co.</p>
            <h1 class="label__title"><span>Amber</span><span>&amp; Cedar</span></h1>
            <ul class="label__notes">
              <li><span>Top</span>Bergamot</li>
              <li><span>Heart</span>Amber resin</li>
              <li><span>Base</span>Cedarwood</li>
            </ul>
            <p class="label__hint"><svg viewBox="0 0 14 20" aria-hidden="true"><path d="M7 2v15m-4.500-4.500L7 17l4.500-4.500"></path></svg>Scroll to melt the label</p>
          </div>
        </div>
      </div>
    </section>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.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.

25 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Melting wax label” 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

At first only the label shows, pale wax with a fine grain: the maker’s name in small type, the huge two-line title (“Amber” narrow and dark, “& Cedar” wide and amber), the three notes of the scent on a thin rule and the invitation to scroll. As you scroll the stage holds still and the wax starts running from the top: the edge comes down wavy, faster in five places, and in nine places it leaves a thin strand behind that stretches and then pulls back. A darker band a few pixels thick runs along the whole edge, the thickness of the wax, and the edge never quite stands still. The title goes down with the wax, more slowly, until the edge catches it and takes it away. Underneath the real photo appears: an amber candle lit in a glass jar, on a wooden table by a window. With the pointer on it, the wax melts first where you pass. Towards the end the name, “Soy wax, 60 hours” and the dark glass pill “Add to bag” with its amber price come in from below, one after the other; scrolling back up, the wax climbs again and covers them.

How it works

The edge is a function

For every point across the width the script works out how high the wax begins: the scroll progress times a speed that changes along the width (three waves added up), plus five drips running ahead, minus the strands that stay behind.

The strands that stay

Every strand is a narrow bell: it stretches until halfway through the melt and then pulls back, each one a little later than the others, swaying slightly over time.

Two layers, one cut

The edge becomes a polygon for the clip-path, recomputed every frame. The same polygon, a few pixels higher, cuts a darker layer placed underneath: that is the thickness of the wax.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#c66f24The amber colour: the second line of the title, the price, the arrow.
STRANDSscript.js9How many strands of wax stay behind.
LENGTHscript.js0.3How far the strands stretch, as a share of the height.
RIMscript.js7The thickness of the wax along the edge, in pixels.
WOBBLEscript.js0.5How much the edge moves by itself.
BITEscript.js0.11How much the pointer melts the wax under it.

Try them in the Playground

When to use it

At the top of a product page that has to do with heat or with something that runs: candles, chocolate, honey, cosmetics, ice cream, a sauce. The same cut uncovers a collection’s photo on a landing page or a campaign’s opening image.

On phones

The stage is as tall as the screen and the title is sized on the shorter of width and height, so it fits a short window too. Below 520 pixels the button wraps under the name. The melt follows the scrolling finger; the pointer’s bite is there with a mouse only.

With reduced motion

No running wax: the label stays whole and fades out as you scroll, the title does not move, and name, description and button fade in.

Pitfalls

  • The clip-path is a polygon in pixels: when the window changes size, width and height are measured again, even halfway through the melt.
  • At the end the edge has to be below the stage at every point: the lowest speed along the width, times the final progress, still exceeds the height.
  • The title is moved by its own container, not by the clipped layer: a transform on the layer would move the cut too.
  • Name, price and button live in the real page under the wax, not inside the photo: they can be read and used without the script as well.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 5.0 KB; the libraries: GSAP + ScrollTrigger 45 KB.

Testing

Tested on 28 November 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 animations