Skip to content
animorio
IT
All components

Get the app QR button

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

A black pill button, Get the app, on white: under the pointer it springs open into a small white card with the app icon, a QR code and two store buttons. The QR modules arrive in waves from the centre to the edges, after the three corner squares; then a viewfinder tightens, a blue scan line passes twice and the line below says the link has reached the phone. When the pointer leaves, the card folds back into the pill.

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>
<!--
  "Get the app QR 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 Get the app button that reveals a QR code</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>
    <!-- a black pill that springs open into a small card with a QR code: the modules arrive in waves from the centre,
         a scan line passes over them, and the card folds back into the pill when the pointer leaves -->
    <div class="slot" data-slot>
      <div class="app" data-app>
        <button class="app__pill" type="button" data-pill aria-expanded="false" aria-controls="app-card">
          <svg class="app__phone" viewBox="0 0 20 20" aria-hidden="true"><rect x="5.5" y="2.5" width="9" height="15" rx="2.4"></rect><path d="M8.6 14.6h2.8"></path></svg>
          <span class="app__label" data-label>Get the app</span>
          <svg class="app__chev" data-chev viewBox="0 0 20 20" aria-hidden="true"><path d="M7.5 5.5 12 10l-4.5 4.5"></path></svg>
        </button>

        <div class="card" id="app-card" data-card role="group" aria-label="Download Nimbli">
          <div class="card__head" data-row>
            <span class="card__icon" aria-hidden="true">
              <svg viewBox="0 0 32 32"><path d="M8 20.5c3.2-7.5 6.4-9.8 8-9.8 2.6 0 2 6.8 4.6 6.8 1.4 0 2.4-1.6 3.4-3.4"></path></svg>
            </span>
            <span class="card__name">
              <strong>Nimbli</strong>
              <small>Daily habits, kept light</small>
            </span>
            <button class="card__close" type="button" data-close aria-label="Close">
              <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M6 6l8 8M14 6l-8 8"></path></svg>
            </button>
          </div>

          <div class="qr" data-qr data-row>
            <svg class="qr__code" data-code viewBox="0 0 29 29" aria-hidden="true"></svg>
            <span class="qr__badge" data-badge aria-hidden="true">
              <svg viewBox="0 0 32 32"><path d="M8 20.5c3.2-7.5 6.4-9.8 8-9.8 2.6 0 2 6.8 4.6 6.8 1.4 0 2.4-1.6 3.4-3.4"></path></svg>
            </span>
            <span class="qr__scan" data-scan aria-hidden="true"></span>
            <svg class="qr__frame" data-frame viewBox="0 0 100 100" preserveAspectRatio="none" aria-hidden="true">
              <path d="M2 16V6a4 4 0 0 1 4-4h10M84 2h10a4 4 0 0 1 4 4v10M98 84v10a4 4 0 0 1-4 4H84M16 98H6a4 4 0 0 1-4-4V84"></path>
            </svg>
          </div>

          <p class="card__hint" data-row>
            <span class="card__say" data-say>Scan with your phone</span>
            <span class="card__sub" data-sub>Free on iOS and Android</span>
          </p>

          <div class="card__stores" data-row>
            <a class="store" href="#ios" data-store="ios">
              <svg viewBox="0 0 20 20" aria-hidden="true"><rect x="6" y="2.8" width="8" height="14.4" rx="2.2"></rect><path d="M9 4.9h2"></path></svg>
              <span>iOS</span>
            </a>
            <a class="store" href="#android" data-store="android">
              <svg viewBox="0 0 20 20" aria-hidden="true"><rect x="5.6" y="2.8" width="8.8" height="14.4" rx="1.6"></rect><path d="M8.4 14.9h3.2"></path></svg>
              <span>Android</span>
            </a>
          </div>
        </div>
      </div>
    </div>
    <p class="note" data-note>Nimbli · 4.8 from 12k ratings</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.

25 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 “Get the app QR 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 white background, in the middle, there is a black pill button with a line drawn phone, the words Get the app and a small chevron; below it, in light grey, Nimbli · 4.8 from 12k ratings. With the pointer over it the pill grows a touch, the letters widen on Mona Sans’s wdth axis and the chevron moves three pixels; pressed, it squeezes. On hover (or tap) the pill springs open, first in width and a moment later in height, and becomes a white card with a wide soft shadow: at the top the blue icon of the Nimbli app with its name and Daily habits, kept light, and a small close button; in the middle the QR code; below it Scan with your phone and Free on iOS and Android; at the bottom two grey buttons, iOS and Android, with a line drawn phone (no real brand marks). The rows rise one after the other. In the QR the three corner squares arrive first, with a bounce, then the modules in waves from the centre to the edges, each growing from zero with a small overshoot, and finally the app icon settles in the middle with a slight turn. A blue viewfinder with four corners tightens on the code, a scan line with a soft tail goes down and back up, the modules lighten as it passes, the viewfinder beats once and the line becomes Sent to your phone, with Tap the notification to install. Pressing iOS makes the button dip and stay darker, and the line says Opening the iOS store. When the pointer leaves, the rows vanish from the bottom, the card folds first in height and then in width and becomes the pill again, its label settling with a small bounce. A drawn pointer does it all by itself and starts again; it also really works, with mouse, touch and keyboard (Esc closes).

How it works

One box for GSAP

The pill and the card are the same black box: GSAP animates its width, height and corner radius, with back.out for the spring and the height starting six hundredths after the width. Inside, the white card is inset by one pixel and appears once the box, while growing, has already turned white: the pixel left on the edge then darkens slightly into a thin grey outline. Closing does the opposite, and the empty box turns black again as it shrinks.

The drawn QR

The code is a 29 by 29 grid in an SVG: the three corner squares with their eye, the alternating timing rows, the alignment square at the bottom right, a hole in the middle for the icon and the rest at random from a generator that always starts from the same seed. Each module is a rect with transform-box fill-box, so it scales from its own centre.

Waves from the centre

Each module knows its distance from the centre, divided by the corner’s distance; GSAP’s stagger is a function returning that distance times WAVE seconds, plus a small offset different for each module, so the wave never looks like a perfect circle. The corners arrive first, with a wider bounce.

The scan

The viewfinder tightens from 1.08 to 1 with back.out, the line goes down and up across the QR’s height measured in pixels, the modules lighten in a row as it passes and the viewfinder beats once before the line changes. Lines change by rising: they leave five pixels upwards and come in from six below on a spring.

Sizes and autopilot

The card takes its size from the window (at most 272 by 336) and the QR what is left, worked out again on resize even with the card open. The autopilot is a new timeline every round, with positions read at the right moment: it opens, watches the scan, presses iOS and leaves. At the first real touch it stops.

Values to change

NameFileDefaultWhat it changes
LABELscript.jsGet the appThe label of the closed button.
APP_NAMEscript.jsNimbliThe app’s name.
TAGLINEscript.jsDaily habits, kept lightThe grey line under the name.
HINTscript.jsScan with your phoneThe line under the QR code.
ACCENTscript.js#2f6bffThe colour of the scan line and the viewfinder.
SPRINGscript.js1.3How much the card bounces as it opens.
WAVEscript.js0.6The seconds the modules take from the centre to the edges.
SCAN_TIMEscript.js1.1The seconds of one pass of the scan line.

Try them in the Playground

When to use it

On an app’s landing page, in the header of a site that also has an app, in a service’s footer, next to a ticket or a booking to open on the phone.

On phones

The card takes the screen width minus 32 pixels and the height there is, the QR shrinks down to 96 pixels; it all works itself out again when the window changes. A tap opens and closes like a click, and a tap outside the card closes it.

With reduced motion

The pill becomes the card and back without a spring, the modules all fade in together, the scan line does not move: only the viewfinder lights up and the lines change with a fade.

Pitfalls

  • Animating width and height together on the same curve makes the card look like an inflating rectangle; six hundredths between the two and a slightly different bounce give it the spring of a real thing.
  • Without transform-box fill-box the SVG modules scaled from the drawing’s top left corner, and the wave started from there.
  • The autopilot’s positions are read when each move starts (function values and a new timeline every round): read once, after a resize the pointer pressed thin air.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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