Skip to content
animorio
IT
All components

Update firmware button

Buttons, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 5.2 KBGSAP 28 KBFreeDownload the zip

The update button in a device’s app: a dark pill with a chip and the installed version. Pressed, the pill fills with blue from the left while the tag counts the percentage, then the chip turns once on itself for the restart, a tick draws itself inside it and the tag rolls to the new version, in green.

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>
<!--
  "Update firmware 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>Update firmware button with the version that climbs and the chip that restarts</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 firmware update button of a device's app: pressed, the pill fills from the left while the tag on the
         right counts the percentage; at the end the chip turns on itself for the restart, then a tick draws itself
         in it, the tag rolls to the new version and the label says the device is up to date -->
    <button class="fw" type="button" data-fw>
      <span class="fw__body" aria-hidden="true"><span class="fw__fill" data-fill></span><span class="fw__light"></span></span>
      <span class="fw__edge" aria-hidden="true"></span>

      <span class="seat" data-seat aria-hidden="true">
        <svg viewBox="0 0 24 24">
          <g data-chip><rect x="6.4" y="6.4" width="11.2" height="11.2" rx="2.4"></rect><path d="M9.6 3.6v2.8M14.4 3.6v2.8M9.6 17.6v2.8M14.4 17.6v2.8M3.6 9.6h2.8M3.6 14.4h2.8M17.6 9.6h2.8M17.6 14.4h2.8"></path><rect class="seat__core" data-core x="9.8" y="9.8" width="4.4" height="4.4" rx="1"></rect></g>
          <path class="seat__tick" data-tick pathLength="1" d="M8.8 12.3 11 14.5 15.2 9.9"></path>
        </svg>
      </span>

      <span class="label"><span class="label__word" data-word>Update firmware</span></span>
      <span class="ver" aria-hidden="true"><span data-ver>v2.3</span></span>
    </button>
    <p class="sr" data-live aria-live="polite"></p>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.

14 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 “Update firmware 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

In the centre, on white, a dark pill 60 pixels tall whose edge catches the light: on the left, in a round seat, a chip drawn in outline with a small blue square in the middle, then the label “Update firmware” and on the right a tag with the installed version, v2.3. Pressed, the label rolls to “Installing”, the pill fills with blue from the left with a brighter line on its front, the tag counts from 0 to 100% and the chip’s core blinks slowly. At the end the label says “Restarting” and the chip makes one full turn on itself. Then everything goes green: the chip’s core closes, a tick draws itself in its place, the seat bounces, the tag rolls to v2.4 and the label says “Up to date”. After a couple of seconds it goes back.

How it works

The fill

Inside the pill there is a layer as wide as the pill, with transform-origin on the left: a number goes from 0 to 100 in INSTALL seconds with the slow(0.5, 0.6) ease, and at each step it updates both the layer’s scaleX and the tag’s text. So bar and percentage can never say two different things.

The chip

The chip is an SVG group with its origin in the centre of the drawing (svgOrigin 12 12): during the install the small central square fades in and out, at the restart the group rotates 360 degrees with power2.inOut.

The end

The square scales to zero, the tick draws itself with stroke-dashoffset from 1 to 0, the seat and the pill make a small elastic bounce, label and tag roll in from below with back.out. The colour goes from blue to green with a class on the button.

Values to change

NameFileDefaultWhat it changes
FROMscript.jsv2.3The installed version.
TOscript.jsv2.4The new version.
INSTALLscript.js2.4How many seconds the install takes.
RESTARTscript.js0.9How many seconds the restart takes.
ACCENTscript.js#35c6f4The colour while updating.
OKscript.js#3ddc97The colour when the update is done.
HOLDscript.js2.4On its own: how many seconds it stays on “Up to date” before going back.
LOOPscript.jstrueLeft alone, a pointer tries it by itself.

Try them in the Playground

When to use it

For a device’s app: headphones, router, thermostat, e-bike, camera, watch. The button itself says how far it is and which version is there, without a separate dialog. In a real product the percentage comes from the device and at the end the button stays on “Up to date”.

On phones

The same button: the pill takes at most the screen width minus the margins; it is pressed with a finger and there is no light under the pointer.

With reduced motion

No sliding fill, chip turn or bounces: the pill is tinted at once, the percentage climbs in steps and labels, tick and version change with a fade.

Pitfalls

  • Bar and percentage move from the same number: two separate tweens, with different eases, end up disagreeing.
  • During the update the button takes no other press (aria-busy) and a line for screen readers says not to unplug the device.
  • The chip rotates with svgOrigin at the centre of the viewBox: with a percentage transform-origin the group would turn around the centre of its own outline, which is not the centre of the drawing.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 15 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