Skip to content
animorio
IT
All components

Social login buttons

Buttons, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 7.1 KBGSAP 28 KBFreeDownload the zip

The sign-in card of Hollow, a made-up notes app: three stacked pills «Continue with Google», «Continue with Apple», «Continue with GitHub», an «or» line and «Continue with email». The services are written by name, without their logos: all three share the same neutral door icon, drawn by us. On tap the chosen pill squashes, narrows into an indigo circle with a ring spinning in the middle and the others step back; from the bottom of the card the «Choose an account» sheet rises with two made-up accounts, the initial in a circle. Once the account is picked the sheet drops, the circle opens again into «Signed in» with a tick and «Signed in as ana@hollow.app» arrives under the title; «Sign out» takes everything back to the start. On white, with a single indigo accent.

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>
<!--
  "Social login buttons" 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>Social login buttons</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 sign-in card of Hollow, a made-up notes app: three «Continue with» pills and email. The chosen pill closes
         into a circle with a ring, a small sheet asks which account, then the pill opens again into «Signed in».
         The services are named in words only: no logos, the same neutral door icon for all three -->
    <section class="card" data-card aria-label="Sign in to Hollow">
      <span class="card__edge" aria-hidden="true"></span>

      <div class="head">
        <span class="mark" aria-hidden="true">
          <svg viewBox="0 0 32 32"><rect class="mark__bg" width="32" height="32" rx="9"/><path class="mark__h" d="M11 9.5v13M21 9.5v13M11 16h10"/></svg>
        </span>
        <h1 class="name">Sign in to Hollow</h1>
        <p class="meta">
          <span class="meta__face" data-m="off">Notes that keep up with you.</span>
          <span class="meta__face" data-m="on" aria-hidden="true">
            <span data-who>Signed in as ana@hollow.app</span>
          </span>
        </p>
      </div>

      <div class="stack" data-stack>
        <div class="row" data-row>
          <button class="pill" type="button" data-pill data-prov="Google" data-autoclic aria-label="Continue with Google">
            <span class="pill__bg" aria-hidden="true"></span>
            <span class="pill__face" data-face="idle">
              <svg class="ico" viewBox="0 0 16 16"><path d="M9.6 2.6h2.6a1.2 1.2 0 0 1 1.2 1.2v8.4a1.2 1.2 0 0 1-1.2 1.2H9.6M2.6 8h7M7 5.2 9.8 8 7 10.8"/></svg>
              <span class="pill__txt">Continue with Google</span>
            </span>
            <span class="pill__face" data-face="wait" aria-hidden="true">
              <svg class="ring" viewBox="0 0 20 20" data-ring><circle class="ring__track" cx="10" cy="10" r="7"/><circle class="ring__arc" cx="10" cy="10" r="7" pathLength="1"/></svg>
            </span>
            <span class="pill__face" data-face="done" aria-hidden="true">
              <svg class="ico ico--tick" viewBox="0 0 16 16"><path d="M3.6 8.4 6.6 11.2 12.4 5" pathLength="1" data-tick/></svg>
              <span class="pill__txt">Signed in</span>
            </span>
          </button>
        </div>
        <div class="row" data-row>
          <button class="pill" type="button" data-pill data-prov="Apple" aria-label="Continue with Apple">
            <span class="pill__bg" aria-hidden="true"></span>
            <span class="pill__face" data-face="idle">
              <svg class="ico" viewBox="0 0 16 16"><path d="M9.6 2.6h2.6a1.2 1.2 0 0 1 1.2 1.2v8.4a1.2 1.2 0 0 1-1.2 1.2H9.6M2.6 8h7M7 5.2 9.8 8 7 10.8"/></svg>
              <span class="pill__txt">Continue with Apple</span>
            </span>
            <span class="pill__face" data-face="wait" aria-hidden="true">
              <svg class="ring" viewBox="0 0 20 20" data-ring><circle class="ring__track" cx="10" cy="10" r="7"/><circle class="ring__arc" cx="10" cy="10" r="7" pathLength="1"/></svg>
            </span>
            <span class="pill__face" data-face="done" aria-hidden="true">
              <svg class="ico ico--tick" viewBox="0 0 16 16"><path d="M3.6 8.4 6.6 11.2 12.4 5" pathLength="1" data-tick/></svg>
              <span class="pill__txt">Signed in</span>
            </span>
          </button>
        </div>
        <div class="row" data-row>
          <button class="pill" type="button" data-pill data-prov="GitHub" aria-label="Continue with GitHub">
            <span class="pill__bg" aria-hidden="true"></span>
            <span class="pill__face" data-face="idle">
              <svg class="ico" viewBox="0 0 16 16"><path d="M9.6 2.6h2.6a1.2 1.2 0 0 1 1.2 1.2v8.4a1.2 1.2 0 0 1-1.2 1.2H9.6M2.6 8h7M7 5.2 9.8 8 7 10.8"/></svg>
              <span class="pill__txt">Continue with GitHub</span>
            </span>
            <span class="pill__face" data-face="wait" aria-hidden="true">
              <svg class="ring" viewBox="0 0 20 20" data-ring><circle class="ring__track" cx="10" cy="10" r="7"/><circle class="ring__arc" cx="10" cy="10" r="7" pathLength="1"/></svg>
            </span>
            <span class="pill__face" data-face="done" aria-hidden="true">
              <svg class="ico ico--tick" viewBox="0 0 16 16"><path d="M3.6 8.4 6.6 11.2 12.4 5" pathLength="1" data-tick/></svg>
              <span class="pill__txt">Signed in</span>
            </span>
          </button>
        </div>
        <p class="or" data-row aria-hidden="true"><span>or</span></p>
        <div class="row" data-row>
          <button class="pill pill--ink" type="button" data-email>
            <span class="pill__bg" aria-hidden="true"></span>
            <span class="pill__face">
              <svg class="ico" viewBox="0 0 16 16"><rect x="2.4" y="3.6" width="11.2" height="8.8" rx="1.8"/><path d="m3 4.6 5 3.8 5-3.8"/></svg>
              <span class="pill__txt">Continue with email</span>
            </span>
          </button>
        </div>
      </div>

      <button class="undo" type="button" data-undo aria-hidden="true" tabindex="-1">Sign out</button>

      <!-- the account chooser, rising from the bottom of the card -->
      <div class="sheet" data-sheet aria-hidden="true">
        <p class="sheet__ask">Choose an account</p>
        <p class="sheet__sub">to continue to Hollow</p>
        <ul class="accts">
          <li><button class="acct" type="button" data-acct tabindex="-1">
            <span class="av av--a" aria-hidden="true"><span>A</span></span>
            <span class="acct__txt"><span class="acct__name">Ana Ruiz</span><span class="acct__mail">ana@hollow.app</span></span>
            <svg class="chev" viewBox="0 0 16 16" aria-hidden="true"><path d="m6 3.5 4.5 4.5L6 12.5"/></svg>
          </button></li>
          <li><button class="acct" type="button" tabindex="-1">
            <span class="av av--b" aria-hidden="true"><span>B</span></span>
            <span class="acct__txt"><span class="acct__name">Ben Ortega</span><span class="acct__mail">ben.ortega@mailbox.io</span></span>
            <svg class="chev" viewBox="0 0 16 16" aria-hidden="true"><path d="m6 3.5 4.5 4.5L6 12.5"/></svg>
          </button></li>
        </ul>
      </div>

      <p class="sr" aria-live="polite" data-live></p>
    </section>
  </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.

37 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Social login buttons” 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 hover the pill’s label widens on the width axis, the ground swells with a bounce and the door icon turns indigo and slides a hair. On tap the pill squashes and springs back, turns indigo and narrows into a circle with a white ring spinning in the middle, while the other rows fade and drop two pixels, one after another. Shortly after, the «Choose an account» sheet rises from the bottom of the card, its two accounts arriving in a row. Tap an account and the sheet drops, the circle opens again on a spring into «Signed in» with a tick drawing itself, the line under the title becomes «Signed in as …» with the chosen account’s address, and «Sign out» appears, which takes everything back to the start. «Continue with email» squashes and bounces. If nobody touches it, the demo does everything by itself and starts over.

How it works

Each pill’s three faces

The label, the ring and «Signed in» sit on top of each other in absolute position, centred with inset 0 and flex: when the pill narrows into a circle no hidden label can widen it or push the ring off centre.

The pill that becomes a circle

The width goes in measured pixels, from the row’s width to the pill’s height, and comes back on an elastic spring; at the end the inline width is cleared, so on resize the pill follows the card again. The ring spins on the whole svg with transformOrigin 50% 50%.

The account sheet

The sheet sits at the bottom of the card in absolute position, hidden with autoAlpha; it rises with yPercent from 112 to 0 and the card, with hidden overflow, clips it as it arrives. The accounts come in a row with a small rise.

Names yes, logos no

The services are written by name in the button; their logos are registered trademarks and are neither drawn nor imitated: in their place a neutral icon, the same for all, which lights up in the accent colour on hover.

Values to change

NameFileDefaultWhat it changes
SHRINK_TIMEscript.js0.5Seconds the chosen pill takes to close into a circle.
WAIT_TIMEscript.js0.9Seconds the ring spins before the account sheet rises.
SHEET_TIMEscript.js0.55Seconds the account sheet takes to rise from the bottom of the card.
DIMscript.js0.32How faint the other pills get while one is working (0 gone, 1 not at all).
SQUASHscript.js0.9How flat a pill gets when pressed (1 = not at all).
SPRINGscript.js0.45How springy the pills are (lower = more bounce).
HOLDscript.js2.6Seconds the signed-in state stays before the demo starts over.
IDLEscript.js7Seconds after your last touch before the demo plays by itself again.

Try them in the Playground

When to use it

On the sign-in or sign-up page of an app, a SaaS or a shop: signing in through an outside service, with a clear sign that it is working, the choice of account and the confirmation of who is in.

On phones

Everything is in em and the size depends on both the width and the height of the window, so the card fits whole in the phone box even with the sheet open. The pills are as wide as the card and tall enough for the thumb; the accounts are whole rows to tap.

With reduced motion

No springs, slides or spinning ring: the pill goes from wide to circle and back without motion, the sheet fades in and out, the other rows fade without dropping and the faces swap with a fade.

Pitfalls

  • The pill’s faces sit in absolute position with inset 0: «Continue with Google», the longest, in the flow would have kept the circle wide and the ring off centre.
  • The pill’s width goes in measured pixels, not percentages (GSAP doesn’t read percentages back from CSS), and is cleared at the end, otherwise on resize the old one stays.
  • The squash on tap is a GSAP transform on the pill, the swell on hover is a CSS transform on its ground: one element for GSAP, the child for CSS.
  • With pathLength 1 the tick needs autoRound off: GSAP would round stroke-dashoffset to 0 or 1 and it would pop in.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 2 December 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