Skip to content
animorio
IT
All components

Sync now button

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

The Sync now button of a made-up notes app, Quillnote, dark on black. On tap the pill gives, widens and slides down, and above it a glass plate rises with three devices drawn in thin lines, a phone, a laptop and a tablet, joined by a wire. A sea green light runs along the wire like a packet of data, from the phone to the laptop and on to the tablet: each device lights up as it arrives, with a small bounce, its screen fills with lines and its note count rolls up to 12. The arrows in the pill really speed up, run and brake. At the end the devices settle, the plate sinks back and the pill closes narrow again as Synced just now with the tick drawing itself.

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>
<!--
  "Sync now 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 Sync now button with the light running between the devices</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 Sync now button of a made-up notes app. On tap the pill widens and slides down, a glass plate rises
         above it with three line-drawn devices joined by a wire; a light runs along the wire from the phone to the
         laptop to the tablet, each device lights up with a small bounce while its note count rolls up, the arrows
         in the pill spin up and slow down, and the pill closes again as Synced just now with a drawn tick -->
    <div class="sync" data-sync>
      <div class="plate" data-plate aria-hidden="true">
        <span class="plate__grain"></span>
        <span class="plate__edge"></span>
        <div class="plate__head" data-head>
          <span class="plate__brand">
            <svg viewBox="0 0 24 24" class="plate__quill">
              <path d="M19.6 3.6c-5.4.6-9.6 4.3-11.4 9.6l-1.4 4.3"/>
              <path d="M19.6 3.6c.4 5.2-3.6 9.4-9.3 10.3"/>
              <path d="M5.2 20.4l1.6-2.9"/>
            </svg>
            <span data-brand>Quillnote</span>
          </span>
          <span class="plate__meta" data-meta>3 devices</span>
        </div>

        <svg class="wires" data-wires>
          <defs>
            <filter id="haze" x="-50%" y="-200%" width="200%" height="500%">
              <feGaussianBlur stdDeviation="3.2"/>
            </filter>
          </defs>
          <g data-seg>
            <path class="wire" data-wire/>
            <path class="trail" data-trail pathLength="1"/>
            <path class="beam beam--haze" data-beam filter="url(#haze)"/>
            <path class="beam beam--tail" data-beam/>
            <path class="beam beam--mid" data-beam/>
            <path class="beam beam--head" data-beam/>
          </g>
          <g data-seg>
            <path class="wire" data-wire/>
            <path class="trail" data-trail pathLength="1"/>
            <path class="beam beam--haze" data-beam filter="url(#haze)"/>
            <path class="beam beam--tail" data-beam/>
            <path class="beam beam--mid" data-beam/>
            <path class="beam beam--head" data-beam/>
          </g>
        </svg>

        <div class="devs">
          <div class="dev" data-dev data-edge="16.5,31.5">
            <div class="dev__icon" data-icon>
              <svg viewBox="0 0 48 40">
                <g class="dev__off">
                  <rect x="17" y="3.5" width="14" height="29" rx="3.6"/>
                  <path d="M22.4 6.4h3.2"/>
                </g>
                <g class="dev__on" data-on>
                  <rect class="dev__glass" x="17" y="3.5" width="14" height="29" rx="3.6"/>
                  <rect x="17" y="3.5" width="14" height="29" rx="3.6"/>
                  <path d="M22.4 6.4h3.2"/>
                  <path class="dev__note" data-note pathLength="1" d="M20 12.5h8"/>
                  <path class="dev__note" data-note pathLength="1" d="M20 16h6"/>
                  <path class="dev__note" data-note pathLength="1" d="M20 19.5h7"/>
                </g>
                <path class="dev__shadow" d="M16 37.5h16"/>
              </svg>
            </div>
            <span class="dev__name">Phone</span>
            <span class="dev__count"><span class="num" data-num>12</span> notes</span>
          </div>

          <div class="dev" data-dev data-edge="4,44">
            <div class="dev__icon" data-icon>
              <svg viewBox="0 0 48 40">
                <g class="dev__off">
                  <rect x="8" y="6" width="32" height="21.5" rx="2.6"/>
                  <path d="M3.5 30.5h41l-1.8 2.6a2 2 0 0 1-1.6.8H6.9a2 2 0 0 1-1.6-.8z"/>
                  <path d="M21 30.5v.9h6v-.9"/>
                </g>
                <g class="dev__on" data-on>
                  <rect class="dev__glass" x="8" y="6" width="32" height="21.5" rx="2.6"/>
                  <rect x="8" y="6" width="32" height="21.5" rx="2.6"/>
                  <path d="M3.5 30.5h41l-1.8 2.6a2 2 0 0 1-1.6.8H6.9a2 2 0 0 1-1.6-.8z"/>
                  <path d="M21 30.5v.9h6v-.9"/>
                  <path class="dev__note" data-note pathLength="1" d="M13 12h14"/>
                  <path class="dev__note" data-note pathLength="1" d="M13 16h20"/>
                  <path class="dev__note" data-note pathLength="1" d="M13 20h11"/>
                </g>
                <path class="dev__shadow" d="M7 37.5h34"/>
              </svg>
            </div>
            <span class="dev__name">Laptop</span>
            <span class="dev__count"><span class="num" data-num>0</span> notes</span>
          </div>

          <div class="dev" data-dev data-edge="11,37">
            <div class="dev__icon" data-icon>
              <svg viewBox="0 0 48 40">
                <g class="dev__off">
                  <rect x="12" y="2.5" width="24" height="31" rx="3.4"/>
                  <path d="M22.6 30.4h2.8"/>
                </g>
                <g class="dev__on" data-on>
                  <rect class="dev__glass" x="12" y="2.5" width="24" height="31" rx="3.4"/>
                  <rect x="12" y="2.5" width="24" height="31" rx="3.4"/>
                  <path d="M22.6 30.4h2.8"/>
                  <path class="dev__note" data-note pathLength="1" d="M16.5 9h12"/>
                  <path class="dev__note" data-note pathLength="1" d="M16.5 13h15"/>
                  <path class="dev__note" data-note pathLength="1" d="M16.5 17h9"/>
                </g>
                <path class="dev__shadow" d="M12 37.5h24"/>
              </svg>
            </div>
            <span class="dev__name">Tablet</span>
            <span class="dev__count"><span class="num" data-num>0</span> notes</span>
          </div>
        </div>
      </div>

      <button class="pill" type="button" data-pill aria-label="Sync now">
        <span class="pill__glow" data-glow aria-hidden="true"></span>
        <span class="pill__skin" aria-hidden="true">
          <span class="pill__grain"></span>
          <span class="pill__light" data-light></span>
          <span class="pill__edge"></span>
          <span class="pill__progress" data-progress></span>
        </span>
        <span class="pill__row" aria-hidden="true">
          <span class="pill__icon">
            <svg class="arrows" viewBox="0 0 24 24" data-arrows>
              <path d="M19.4 9.2A7.8 7.8 0 0 0 5.9 7.1"/>
              <path d="M5.3 3.4v4.3h4.3"/>
              <path d="M4.6 14.8a7.8 7.8 0 0 0 13.5 2.1"/>
              <path d="M18.7 20.6v-4.3h-4.3"/>
            </svg>
            <svg class="tick" viewBox="0 0 24 24" data-tickbox>
              <circle data-tick-ring cx="12" cy="12" r="10" pathLength="1"/>
              <path data-tick d="M7.6 12.3l3 3 5.8-6.3" pathLength="1"/>
            </svg>
          </span>
          <span class="pill__words" data-words>
            <span class="word" data-word>Sync now</span>
            <span class="word" data-word>Syncing <em data-total>12 notes</em></span>
            <span class="word" data-word>Synced <em>just now</em></span>
          </span>
        </span>
      </button>
    </div>
    <p class="sr" aria-live="polite" data-live></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.

31 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 “Sync now 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 a black background there is only a dark pill, with the two sync arrows and Sync now. Hovering lifts it by a pixel, widens the label, gives the arrows a quarter turn on a spring and lights its thin edge sea green where the pointer is. On tap the pill gives, the label becomes Syncing 12 notes, the pill widens and slides to the bottom, while the arrows start turning slowly and then faster and faster. A dark glass plate rises out of the pill with Quillnote and 3 devices on top, and below it three devices drawn in thin lines come in one after another, Phone, Laptop and Tablet, joined by a dotted wire that hangs a little. The phone has the notes: it lights up first, with a small hop and the lines writing themselves on its screen. Then a light leaves the phone and runs along the wire, with a bright head, a fading tail and a haze, leaving the wire lit behind it: it reaches the laptop, which lights up with a bounce while its 0 notes rolls up to 12 notes, and sets off again towards the tablet, which does the same. Meanwhile a thin line at the bottom of the pill fills up. The arrows brake and stop upright, the devices settle with a small give and dim, the plate sinks back into the pill, the pill rises to the middle, narrows and says Synced just now with the circle and the tick drawing themselves. After a couple of seconds it is Sync now again and the round starts over. A tap, a click or Enter makes it sync.

How it works

The width from three weights

The pill has no CSS states: two numbers, the weight of Syncing and that of Synced, blend the measured widths of the three labels. GSAP pushes them with back.out and the pill widens or narrows a pixel too far and comes back, even if the window changes halfway, because the widths are measured again on resize.

The wire worked out from the icons

Each wire goes from the right edge of one device to the left edge of the next, read from the real drawing of each icon (the phone is narrow, the laptop wide), with a quadratic curve that hangs a little. The places are read with offsetLeft, which ignores the transforms of the rising plate.

The light in four strokes

The light is four copies of the same path with stroke-dasharray of different lengths (a haze blurred with feGaussianBlur, tail, body, bright head), all with the head at the same point: the stroke-dashoffset of each is its length minus the head position. Behind them a fifth copy with pathLength 1 fills up and leaves the wire lit.

The arrows with a real speed-up and brake

The arrows turn with a speed integrated every frame: the speed rises with power2.in. To stop them the arrival angle is chosen, a multiple of half a turn, and the duration is three times the distance over the speed, so power3.out starts exactly at the speed they had and there is no jolt.

The rolling number

A tween from 0 to 12 with power2.inOut, and at each new whole number the old number goes up and the new one comes in from below in an overflow hidden window: slow first, then fast, then slow again.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js'#46e3c6'The colour of the light, the lit devices and the tick.
NOTESscript.js12How many notes travel from the phone to the other devices.
APPscript.js'Quillnote'The app named on the plate.
TRAVELscript.js0.75How many seconds the light takes from one device to the next.
BOUNCEscript.js1How high a device jumps when the light reaches it: 0 none, 2 double.
SPEEDscript.js12 is twice as fast, 0.5 half as fast.
HOLDscript.js2.4How many seconds Synced just now stays before the button is ready again.
AUTOscript.jstrueThe sync plays by itself until someone touches the button.

Try them in the Playground

When to use it

In the settings of a notes, photos or files app, in the bar of a dashboard that keeps several devices in step, on the page of a cloud service: anywhere the moment the data reaches every device is worth showing.

On phones

The same pill, 60 pixels tall, and the same plate, almost as wide as the screen and at most two thirds of the box tall: the three devices fit in a row. A tap syncs, and another tap on Synced just now makes it ready again.

With reduced motion

No springs, no running light, no spinning arrows: the plate fades in with the three devices already lit and 12 notes on each, then the pill fades back in with Synced just now and the tick already drawn.

Pitfalls

  • The light ended its run with its tail still resting at the end of the wire: the position now goes from zero to the wire's length plus the longest tail, so at 1 the light has fully left.
  • The arrows stopped with a plain tween started again from standstill and the jolt showed: the braking time comes from the speed they had, so power3.out starts at that same speed.
  • Measuring the icons with getBoundingClientRect while the plate rises scaled made the wire short and off: the places are read with offsetLeft and offsetTop, which ignore transforms.
  • When the plate emptied the lit wires stayed alone on empty glass for a moment: they now leave together with the devices.

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 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