Skip to content
animorio
IT
All components

Install ring button

Buttons, Hover, SVGGSAP, CSS onlyEasyCompressed weight: Demo 5.1 KBGSAP 28 KBFreeDownload the zip

One button, one gesture, the way app stores do it: on tap the light grey «Install» pill tightens into a circle as tall as itself, a thin blue arc spins inside while the download gets ready and then fills the ring in uneven chunks, the way data really arrives. When the ring closes it tightens once more and opens back into the «Open» pill, a pixel too wide before it settles.

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>
<!--
  "Install ring 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 Install button that tightens into a ring</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>
    <!-- one button, one gesture: the pill tightens into a ring, the ring fills, the ring opens into Open -->
    <button class="install" type="button" data-install data-autoclic aria-label="Install">
      <span class="install__body" data-body>
        <span class="install__label" aria-hidden="true">
          <span class="install__word" data-word="get">Install</span>
          <span class="install__word" data-word="open">Open</span>
        </span>
        <span class="install__ring" aria-hidden="true">
          <svg viewBox="0 0 60 60">
            <circle class="install__track" data-track cx="30" cy="30" r="27.5"/>
            <circle class="install__arc" data-arc cx="30" cy="30" r="27.5"/>
            <rect class="install__stop" data-stop x="25" y="25" width="10" height="10" rx="2.2"/>
          </svg>
        </span>
      </span>
    </button>
    <p class="install__status" role="status" data-status></p>
  </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 “Install ring 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 white, alone in the middle, there is a light grey pill with the word «Install» in blue. Hovering brings the pill a touch closer and the word widens on its width axis; pressing darkens the fill by a step. On tap the pill gives and springs back, the word leaves narrowing, and the pill tightens into a circle as tall as itself: it lands a pixel too narrow and settles. The grey fill fades and only a thin ring is left, with a small blue rounded square in the middle, the stop. First a short blue arc spins in the ring while the download gets ready, slows down and parks at the top; from there it fills the ring in uneven chunks, with two short pauses, the way data really arrives. When the ring closes the square goes, the ring tightens once more on a spring and the circle opens into the «Open» pill, which lands a pixel too wide and settles, with the word coming in narrow and opening up. Tapping the square during the download cancels it: the circle opens back into «Install». Until someone touches it, the button plays the gesture by itself.

How it works

A pixel past

The pill’s width goes with power3.out to a pixel past the right size (a pixel narrower than the circle, a pixel wider than the new word) and comes back with sine.inOut: that is the one-pixel bounce, without an ease that overdoes it over long distances.

The ring from a dash

The arc is an SVG circle with stroke-dasharray «length circumference»: an object with len is tweened by GSAP and rewrites the dash on every update. Rotated by minus 90 degrees around the centre (svgOrigin 30 30), the arc starts from the top.

The spin that parks at the top

While getting ready, the short arc does two full turns with power1.inOut and shortens on the way: it ends exactly at minus 90 degrees, at the top, and that is where the filling starts, with no jump between waiting and progress.

The chunks of the download

The filling is a row of six tweens with different lengths and durations and two short pauses, each with power2.out: the ring moves like a real download, not like a linear bar. DOWNLOAD stretches or shortens all the pieces together.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#2f6bffThe colour of the word, the ring and the stop square.
LABEL_GETscript.jsInstallThe word before installing.
LABEL_OPENscript.jsOpenThe word once the app is installed.
DOWNLOADscript.js2.6How many seconds the ring takes to fill.
SPRINGscript.js1How springy the press and the ring are: 0.4 calm, 2 very bouncy.
SPEEDscript.js1The speed of everything: 2 twice as fast, 0.5 half.
HOLDscript.js2.2How many seconds «Open» stays when the button plays by itself.
AUTOscript.jstrueThe button plays the gesture by itself until someone touches it.

Try them in the Playground

When to use it

For the button that installs an app, an extension, a plugin or a theme: whoever presses it sees at once that the work has started, how much is left and when it is done, with no extra bar.

On phones

On the phone the pill, the circle and the word take their size from the screen (clamp on the shorter side); there is no hover, the press and everything else are the same.

With reduced motion

No springs or movement: the pill takes its new shape at once, the words and the ring swap with a fade and the ring fills without the waiting spin.

Pitfalls

  • With stroke-linecap round a dash of zero length still draws a little dot: the arc starts from half a pixel and stays transparent until needed, or a speck would appear at the top of the ring.
  • back.out on the width overshoots in proportion to the distance: from 120 to 60 pixels the pill went six pixels below the circle. Two tweens, one to a pixel past and one back, always give the same single pixel.
  • When the grey fill fades the pill’s hairline shadow has to fade too, or a second faint circle is left around the ring.
  • The demo’s window changes height while you watch: the circle is as wide as the pill is tall, so on resize the width is measured again, during the download too.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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