Skip to content
animorio
IT
All components

Molten metal Upscale button

Buttons, HoverGSAP, Canvas, CSS onlyMediumCompressed weight: Demo 8.9 KBGSAP 28 KBFreeDownload the zip

The «Upscale 4x» button of an app that enlarges photos with artificial intelligence, on near black: a thread of chrome runs along the rim towards the pointer and the button tilts slightly. Pressed, molten metal pours into the pill from the left, white and orange at its swaying front, while the real photo of the dunes at sunset above sharpens behind a line of light at the same pace; then the metal cools down to polished chrome, a reflection sweeps across it and the label turns into «Upscaled» with a tick.

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>
<!--
  "Molten metal Upscale button" 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>The Upscale button with molten metal that cools to chrome</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" data-stage>
    <!-- an AI image upscaler: press Upscale and molten metal is poured into the button from the left, glowing hot at its
         front while the photo above sharpens behind the same front; then it cools down to polished chrome and says Upscaled -->
    <section class="tool" data-card aria-label="Image upscaler">
      <header class="tool__head">
        <p class="tool__brand">
          <span class="tool__logo" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M4 18.5h16"></path><path d="M6.5 18.5V11a5.5 5.5 0 0 1 11 0v7.5"></path><path d="M10 18.5c0-2.4 1-3.4 2-4.6 1 1.2 2 2.2 2 4.6"></path></svg></span>
          <span data-brand>Kilnwave</span>
        </p>
        <span class="tool__chip">Upscaler</span>
      </header>

      <figure class="shot" data-shot>
        <canvas class="shot__lo" data-lo aria-hidden="true"></canvas>
        <canvas class="shot__hi" data-hi aria-hidden="true"></canvas>
        <span class="shot__scan" data-scan aria-hidden="true"></span>
        <figcaption class="shot__cap">
          <span class="shot__name">dune-study.png</span>
          <span class="roll" data-size-roll><span class="roll__in" data-size>1024 × 683</span></span>
        </figcaption>
      </figure>

      <div class="cast-wrap" data-wrap>
        <button class="cast" type="button" data-btn aria-live="polite">
          <span class="cast__glow" data-glow aria-hidden="true"></span>
          <canvas class="cast__metal" data-metal aria-hidden="true"></canvas>
          <span class="cast__ripple" data-ripple aria-hidden="true"></span>
          <span class="cast__label cast__label--light" data-label>
            <svg class="ic" viewBox="0 0 24 24" aria-hidden="true">
              <g class="ic__up"><path d="M4 9V4h5"></path><path d="M4 4l5.5 5.5"></path><path d="M20 15v5h-5"></path><path d="M20 20l-5.5-5.5"></path><rect x="9.5" y="9.5" width="5" height="5" rx="1"></rect></g>
              <path class="ic__ok" d="M5 12.5l4.2 4.2L19 7"></path>
            </svg>
            <span class="roll"><span class="roll__in" data-word>Upscale 4x</span></span>
          </span>
          <span class="cast__label cast__label--dark" data-label aria-hidden="true">
            <svg class="ic" viewBox="0 0 24 24">
              <g class="ic__up"><path d="M4 9V4h5"></path><path d="M4 4l5.5 5.5"></path><path d="M20 15v5h-5"></path><path d="M20 20l-5.5-5.5"></path><rect x="9.5" y="9.5" width="5" height="5" rx="1"></rect></g>
              <path class="ic__ok" d="M5 12.5l4.2 4.2L19 7"></path>
            </svg>
            <span class="roll"><span class="roll__in" data-word>Upscale 4x</span></span>
          </span>
        </button>
      </div>

      <p class="tool__hint"><span class="roll" data-hint-roll><span class="roll__in" data-hint>2 credits · about 6 seconds</span></span></p>
    </section>

    <svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3l14 8.2-6.2 1.4 3.6 6.8-2.6 1.4-3.6-6.8L5 18.6z"></path></svg>
  </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 “Molten metal Upscale button” 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 near black sits the card of Kilnwave, an invented app that enlarges photos with artificial intelligence: the mark with its little kiln, the Upscaler tag, the real photo of sand dunes at sunset, the sun low in the haze, with the file name and its size, 1024 × 683, and under it the dark «Upscale 4x» button with arrows at the corners. Moving over it, the chrome rim of the button lights up where the pointer is and the pill tilts towards it; pressing squashes it and a ring of light spreads from the point touched. On click, molten metal pours into the pill from the left: the front is white, orange just behind, it sways and bulges in the middle like an advancing drop, and a warm glow travels around the button; behind the front the metal is already chrome. At the same pace a line of light crosses the photo from left to right and leaves the sharp photo behind it, with the wind ripples in the sand and the crests of the far dunes, in place of the blocky one. The label says «Upscaling» with the percentage, and where the metal passes it turns dark to stay readable on the chrome. At the end the front calms down with a last wobble, the metal cools from orange to chrome, the button swells slightly and settles, a white reflection sweeps across the chrome and the label rolls to «Upscaled» with the tick drawing itself; the size rolls to 4096 × 2732 and «Saved to Library» appears below. After a moment the chrome fades and the button turns dark again. A drawn pointer moves over the button and presses it; you can also use it by hand.

How it works

The metal in a canvas inside the button

Inside the pill there is a canvas the same size. Every frame a path is built from the left edge to the front: a vertical line moved by two sines running in time and by a belly in the middle, the advancing drop. The path masks a vertical gradient of light and dark bands, the chrome, and on top a horizontal gradient that is white at the front, turns orange and fades further back: the heat.

The sharp photo and the blocky one

The photo is real, a 1024 × 683 webp. Once it has loaded it is drawn twice, cropped like object-fit: cover: once in the sharp canvas the size of the figure, and once in a canvas 40 pixels wide that is then stretched without smoothing (imageSmoothingEnabled set to false): those are the blocks of the still-small photo. Both are redrawn on resize.

One front for everything

The state is an object with progress, heat, wave and belly, animated by a GSAP timeline. The same front position cuts the sharp photo over the blocky one (clip-path), moves the line of light and the glow and uncovers the dark copy of the label: so photo, button and text move together.

The cooling

Once the front has left the button, the wave and the belly go back to zero with an elastic, the hot stretch extends over the whole pill and the heat drops to zero: the button turns from orange to chrome all at once. Then a slanted white band crosses the canvas once, and the same band runs along the rim.

The chrome rim

The rim is a pseudo-element with a gradient, masked with two masks in exclusion so that only a one-pixel ring is left. The light band of the gradient sits in a CSS variable that follows the pointer, while the button tilts with rotateX and rotateY inside a box with perspective.

Values to change

NameFileDefaultWhat it changes
BRANDscript.jsKilnwaveThe name of the invented app that enlarges photos.
HOTscript.js#ff7a1aThe colour of the still-hot metal, the glow and the line on the photo.
SCALEscript.js4How many times larger the photo becomes.
CASTscript.js2.8The seconds of the pour, from left to right.
COOLscript.js1.4The seconds the metal takes to cool into chrome.
WAVEscript.js1How much the metal’s front sways while it flows.
HOLDscript.js2.4The seconds the button stays on Upscaled before going back.
PAUSEscript.js1.2The seconds the autopilot waits between one round and the next.

Try them in the Playground

When to use it

For an artificial intelligence action that takes a few seconds and changes something visible: enlarging or cleaning up a photo, generating an image, exporting a video, refining a file. The button itself becomes the progress bar, and the result arrives at the same pace.

On phones

The card takes the full width minus the margins; the photo and the button are also sized on the height with min() and vh, and the canvases are redrawn on resize, even halfway through the pour. On phones the rim and the tilt follow the finger only while touching.

With reduced motion

No pour, no waves, no tilt and no drawn pointer: on click the chrome and the sharp photo fade in and the texts change at once.

Pitfalls

  • The light label on the dark fill would not read on the chrome: there are two identical copies, and the dark one is uncovered by a clip-path that follows the same front as the metal, pixel by pixel.
  • The front has to leave the button entirely even where it sways and bulges: the progress runs from a little before the left edge to a little past the right one, and the belly and the waves die down only afterwards.
  • A canvas measured with getBoundingClientRect on a tilted or squashed button would take the transformed size: offsetWidth and offsetHeight are used instead.
  • The photo can be drawn into the canvases only once it has loaded: drawShot checks complete and naturalWidth and runs again on the load event, otherwise the canvases stay empty on the first round.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.9 KB; the libraries: GSAP 28 KB.

Testing

Tested on 5 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 components