Skip to content
animorio
IT
All components

New sign-in alert

Notifications, SVG, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 9.4 KBGSAP 28 KBFreeDownload the zip

The security alert of a password manager, Keyline, in a dark glass pill with an amber shield: a new sign-in from a MacBook Air in Lisbon. It opens on a spring into a card with the laptop, the place, the time and two answers. Pressing Secure account switches the laptop's screen off like an old monitor, three steps spin and tick one after the other, a mint light crosses the card and the shield turns from amber to mint with a check; then the card closes back into Account secured.

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>
<!--
  "New sign-in alert" 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 new sign-in alert that secures the account</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 security alert of Keyline, an invented password manager: a dark glass pill says a new device signed in.
         It opens on a spring into a card with the laptop, the place and two answers. Secure account switches the
         laptop's screen off, ticks three steps one after the other and turns the shield from amber to mint -->
    <div class="note" data-note role="alertdialog" aria-labelledby="note-title" aria-describedby="note-sub">
      <div class="note__shell" data-shell>
        <span class="note__sweep" data-sweep aria-hidden="true"></span>
        <div class="note__head">
          <div class="tile" data-tile aria-hidden="true">
            <span class="tile__glint" data-glint></span>
            <svg class="tile__icon" viewBox="0 0 24 24">
              <path class="tile__shield" d="M12 2.6l7.2 2.7v5.6c0 4.6-3 8.4-7.2 10.2-4.2-1.8-7.2-5.6-7.2-10.2V5.3z"/>
              <g data-bang>
                <path class="tile__mark" d="M12 7.6v4.8"/>
                <path class="tile__mark" d="M12 15.7v0.2"/>
              </g>
              <path class="tile__check" data-tile-check d="M8.4 12.3l2.5 2.5 4.9-5.3" pathLength="1" stroke-dasharray="1" stroke-dashoffset="1"/>
            </svg>
          </div>
          <div class="note__body">
            <div class="note__top">
              <p class="note__title" id="note-title" data-title>New sign-in detected</p>
              <span class="note__when">
                <span data-when>now</span>
                <svg class="note__done" viewBox="0 0 16 16" aria-hidden="true"><path data-done d="M3.2 8.5l3 3 6.6-7" pathLength="1" stroke-dasharray="1" stroke-dashoffset="1"/></svg>
              </span>
            </div>
            <p class="note__sub" id="note-sub" data-sub>MacBook Air · Lisbon, Portugal</p>
          </div>
        </div>

        <div class="note__more" data-more>
          <div class="device" data-part>
            <svg class="laptop" viewBox="0 0 72 46" aria-hidden="true">
              <defs>
                <linearGradient id="lid" x1="0" y1="0" x2="0" y2="1">
                  <stop offset="0" stop-color="#3a3f48"/>
                  <stop offset="1" stop-color="#1f232a"/>
                </linearGradient>
                <linearGradient id="glow" x1="0" y1="0" x2="1" y2="1">
                  <stop offset="0" stop-color="#3b5a88"/>
                  <stop offset="0.55" stop-color="#1e2a44"/>
                  <stop offset="1" stop-color="#5c3d22"/>
                </linearGradient>
                <linearGradient id="base" x1="0" y1="0" x2="0" y2="1">
                  <stop offset="0" stop-color="#5a606b"/>
                  <stop offset="1" stop-color="#2a2e35"/>
                </linearGradient>
              </defs>
              <rect x="9" y="2" width="54" height="36" rx="3.4" fill="url(#lid)" stroke="rgba(255,255,255,0.14)" stroke-width="0.8"/>
              <rect x="11.6" y="4.6" width="48.8" height="30.8" rx="1.6" fill="#07080a"/>
              <g class="laptop__screen" data-screen>
                <rect x="11.6" y="4.6" width="48.8" height="30.8" rx="1.6" fill="url(#glow)"/>
                <rect x="27" y="11" width="18" height="18" rx="3" fill="rgba(255,255,255,0.06)" stroke="rgba(255,255,255,0.14)" stroke-width="0.5"/>
                <path d="M36 14.4l3.6 1.3v2.8c0 2.3-1.5 4.2-3.6 5.1-2.1-0.9-3.6-2.8-3.6-5.1v-2.8z" fill="none" stroke="rgba(242,180,90,0.9)" stroke-width="0.8"/>
                <rect x="29.5" y="25.2" width="13" height="1.6" rx="0.8" fill="rgba(255,255,255,0.22)"/>
                <path d="M11.6 4.6h24l-12 30.8h-12z" fill="rgba(255,255,255,0.045)"/>
              </g>
              <rect class="laptop__line" data-line x="11.6" y="19.6" width="48.8" height="0.8" fill="#dfe8ff" opacity="0"/>
              <path d="M2 38.6h68l-2.4 4.2c-0.5 0.8-1.3 1.2-2.2 1.2H6.6c-0.9 0-1.7-0.4-2.2-1.2z" fill="url(#base)"/>
              <path d="M30 38.6h12c0 1-0.8 1.6-1.8 1.6h-8.4c-1 0-1.8-0.6-1.8-1.6z" fill="#1d2026"/>
              <path d="M2.4 38.6h67.2" stroke="rgba(255,255,255,0.35)" stroke-width="0.5"/>
            </svg>
            <div class="device__text">
              <p class="device__name">MacBook Air</p>
              <p class="device__meta"><span data-meta>Safari · Lisbon, Portugal · 2:41 PM</span></p>
            </div>
            <span class="device__badge" data-badge>Signed out</span>
          </div>

          <p class="note__ask" data-part><span data-ask>Was this you? If not, we will sign this device out and lock your vault.</span></p>

          <div class="act" data-part data-act>
            <div class="act__buttons" data-buttons>
              <button class="btn btn--ghost" type="button" data-me>
                <span class="btn__face"><span data-me-words>It was me</span></span>
              </button>
              <button class="btn btn--main" type="button" data-secure>
                <span class="btn__face" data-secure-face>
                  <svg class="btn__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8l4.8 1.8v3.7c0 3.1-2 5.6-4.8 6.9-2.8-1.3-4.8-3.8-4.8-6.9V3.6z"/></svg>
                  <span>Secure account</span>
                </span>
              </button>
            </div>
            <ul class="act__list" data-list aria-label="Securing your account">
              <li class="row" data-row>
                <svg class="row__icon" viewBox="0 0 20 20" aria-hidden="true">
                  <circle class="row__track" cx="10" cy="10" r="8"/>
                  <circle class="row__arc" data-arc cx="10" cy="10" r="8" pathLength="1" stroke-dasharray="0.28 0.72"/>
                  <path class="row__check" data-check d="M6.3 10.3l2.4 2.4 5-5.3" pathLength="1" stroke-dasharray="1" stroke-dashoffset="1"/>
                </svg>
                <span class="row__text">Signed out of MacBook Air</span>
              </li>
              <li class="row" data-row>
                <svg class="row__icon" viewBox="0 0 20 20" aria-hidden="true">
                  <circle class="row__track" cx="10" cy="10" r="8"/>
                  <circle class="row__arc" data-arc cx="10" cy="10" r="8" pathLength="1" stroke-dasharray="0.28 0.72"/>
                  <path class="row__check" data-check d="M6.3 10.3l2.4 2.4 5-5.3" pathLength="1" stroke-dasharray="1" stroke-dashoffset="1"/>
                </svg>
                <span class="row__text">Vault locked on every device</span>
              </li>
              <li class="row" data-row>
                <svg class="row__icon" viewBox="0 0 20 20" aria-hidden="true">
                  <circle class="row__track" cx="10" cy="10" r="8"/>
                  <circle class="row__arc" data-arc cx="10" cy="10" r="8" pathLength="1" stroke-dasharray="0.28 0.72"/>
                  <path class="row__check" data-check d="M6.3 10.3l2.4 2.4 5-5.3" pathLength="1" stroke-dasharray="1" stroke-dashoffset="1"/>
                </svg>
                <span class="row__text">Password reset link sent</span>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </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.

28 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 “New sign-in alert” 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 page a graphite glass pill drops in from the top on a spring, with a thin edge that catches the light, a light grain and a sheen along the top. On the left a round tile holds the amber shield with an exclamation mark: arriving it trembles slightly and a glint crosses it. Beside it ‘New sign-in detected’, ‘now’ and ‘MacBook Air · Lisbon, Portugal’. The pill opens on a spring into a card: a panel with the drawn laptop, its screen on with the Keyline screen, the name ‘MacBook Air’ and under it the browser, the place and the time; under it the question ‘Was this you?’ and two buttons, a glass ‘It was me’ and an amber ‘Secure account’, crossed by a glint. When Secure account is pressed the button gives and comes back, the two buttons leave and a list of three steps opens in their place, each with a spinning amber arc. The laptop's screen squeezes into a bright line and goes off, ‘Signed out’ appears beside it and under the name it reads ‘Offline now’. The three steps close one after the other: the arc goes all the way round, the mint check draws itself and the line lights up. Then everything turns from amber to mint: the shield takes its check with a small jolt, a mint light crosses the card the title becomes ‘Account secured’ and the line below says the vault is locked and the reset link is in the email. The card closes back into the pill, a check draws itself in the corner and the next alert arrives. ‘It was me’ instead closes at once with ‘Device trusted’. With the pointer over it, a soft light follows it across the glass.

How it works

Two colours in one variable

Amber and mint live in :root; the card has a --t variable from 0 to 1 and a --tone computed with color-mix(in oklab, amber, mint calc(var(--t) * 100%)). The shield tile, the button, the coloured shadow and the glow in the corner all use --tone: GSAP animates one number and the whole card changes colour together, through a warm tone with no grey.

The screen that switches off

The laptop's screen is an SVG group over a black rectangle. GSAP squeezes it with scaleY down to 0.02 around its centre (transformOrigin in viewBox pixels), hides it and lights a bright 0.8 unit line in its place that narrows with scaleX until it is gone: an old monitor switching off in half a second.

From the buttons to the steps without a jump

Buttons and list live in the same container, the list absolutely positioned and hidden. On the tap both heights are measured, the container goes from one to the other on the spring while the buttons fade and the rows rise staggered; the card's height is auto, so it follows by itself.

Arcs that spin and close

Each step has a circle with pathLength 1 and stroke-dasharray 0.28 0.72: an arc spun by an endless tween on its rotation. On its turn the tween stops, the dasharray (the attribute) goes to 1 0 and the arc becomes the full ring, then fades while the check draws itself by animating the stroke-dashoffset attribute and the row steps two pixels and comes back on a spring.

A real spring as an ease

Opening, closing and presses use a hand written ease function: the response of a damped spring (damping 0.74) normalised between 0 and 1, passing the mark by a pixel and settling. The pill's height is read from the head (76 or 68 pixels) and the closing starts from the height measured at that moment.

Values to change

NameFileDefaultWhat it changes
HOLDscript.js2.4The seconds the card waits for an answer before the pilot presses Secure account.
STEPscript.js0.75The seconds each of the three steps spins before it ticks.
BOUNCEscript.js0.74The springs: lower bounces more (0.5), higher settles without passing the mark (1).
GLOWscript.js1How visible the mint light that crosses the card is.
LOOPscript.jstrueThe pilot presses Secure account and a new alert arrives after each one.

Try them in the Playground

When to use it

For an app or a site with an account to protect: a password manager, a bank, an online shop, a subscription service, a work dashboard. It warns about a new sign-in and lets you answer without opening the settings, and shows the security at work. It also works on a landing page to present a product's security features, or as a model for any alert that asks for a choice and then runs some steps.

On phones

The same animation with adapted sizes: the card is 92% of the screen wide, under 380 pixels of width or 520 of height the head goes down to 68 pixels and the words and buttons tighten a little; the open card stays under 300 pixels tall and the buttons are tapped with a finger.

With reduced motion

Nothing moves: the pill fades in, the card opens at once with its parts fading in, the arcs stay still, the screen goes off at once, the checks draw themselves, the colours go from amber to mint with a fade and the light that crosses the card is not there.

Pitfalls

  • With overflow hidden on the pill the closed card's buttons could still be reached with Tab: the hidden part is inert until the card is open.
  • The arc's dasharray has to be animated as an attribute: set in CSS the style wins over the attribute and the arc never closes.
  • The screen squeezes towards its centre only with a transformOrigin in viewBox pixels: in percent GSAP takes it from the group's box, which changes as it shrinks.
  • The words that change are inline-block, otherwise GSAP's y does not move them.
  • The list stays absolutely positioned until it is needed, and the open card's height is measured as head plus content (offsetHeight), not with scrollHeight: the hidden list stuck out under the buttons and scrollHeight counted it, so the card opened with a sixty pixel gap at the bottom.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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