Skip to content
animorio
IT
All components

Glass login form

Forms, Transitions, HoverGSAP, CSS onlyMediumCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

The login page of an analytics app, like a Dribbble shot: a card of dark frosted glass with email, password, Remember me, Sign in and Continue with SSO, and behind the glass, blurred, the dashboard waiting. The active field catches the light on its edge right where the text caret is; a wrong password shakes the field on a spring; with the right one the button squeezes into a loader with a light running around it, draws a check, the glass unlocks from the middle and the dashboard comes into focus and comes alive.

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>
<!--
  "Glass login form" 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 dashboard sign in form with the glass that unlocks</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 window of an analytics app: behind a pane of frosted glass the dashboard waits, out of focus.
         Signing in, the glass unlocks from the middle and the dashboard comes into focus and comes alive -->
    <div class="app" data-app>

      <!-- the dashboard, drawn by us: sidebar, header, three figures, the revenue line and the weekly bars -->
      <div class="dash" data-dash aria-hidden="true">
        <aside class="dash__side">
          <span class="dash__logo">
            <svg viewBox="0 0 20 20"><path d="M5 14V10M10 14V6M15 14V8"/></svg>
          </span>
          <span class="dash__ico is-on"><svg viewBox="0 0 20 20"><path d="M4 4h5v5H4zM11 4h5v5h-5zM4 11h5v5H4zM11 11h5v5h-5z"/></svg></span>
          <span class="dash__ico"><svg viewBox="0 0 20 20"><path d="M3 15l4.5-5 3 3L17 6"/></svg></span>
          <span class="dash__ico"><svg viewBox="0 0 20 20"><circle cx="10" cy="7" r="3"/><path d="M4 16c1-3 3.4-4.4 6-4.4s5 1.4 6 4.4"/></svg></span>
          <span class="dash__ico"><svg viewBox="0 0 20 20"><path d="M10 3v14M3 10h14"/><circle cx="10" cy="10" r="7"/></svg></span>
        </aside>
        <section class="dash__main">
          <header class="dash__top">
            <div>
              <p class="dash__hello" data-hello>Welcome back, Ines</p>
              <p class="dash__title">Overview</p>
            </div>
            <span class="dash__range">Last 30 days
              <svg viewBox="0 0 12 12"><path d="M3 4.5L6 7.5 9 4.5"/></svg>
            </span>
          </header>
          <div class="dash__kpis">
            <div class="kpi">
              <p class="kpi__label">Revenue</p>
              <p class="kpi__value" data-count="84210" data-format="money">$84,210</p>
              <p class="kpi__delta is-up"><svg viewBox="0 0 10 10"><path d="M2 6.5L5 3.5 8 6.5"/></svg>12.4%</p>
            </div>
            <div class="kpi">
              <p class="kpi__label">Active users</p>
              <p class="kpi__value" data-count="12480" data-format="int">12,480</p>
              <p class="kpi__delta is-up"><svg viewBox="0 0 10 10"><path d="M2 6.5L5 3.5 8 6.5"/></svg>8.1%</p>
            </div>
            <div class="kpi kpi--third">
              <p class="kpi__label">Conversion</p>
              <p class="kpi__value" data-count="3.42" data-format="pct">3.42%</p>
              <p class="kpi__delta is-down"><svg viewBox="0 0 10 10"><path d="M2 3.5L5 6.5 8 3.5"/></svg>0.3%</p>
            </div>
          </div>
          <div class="dash__charts">
            <div class="chart">
              <p class="chart__label">Revenue <span>daily</span></p>
              <svg class="chart__svg" viewBox="0 0 300 110" preserveAspectRatio="none" data-chart>
                <defs>
                  <linearGradient id="nw-area" x1="0" y1="0" x2="0" y2="1">
                    <stop offset="0" stop-color="var(--accent)" stop-opacity=".34"/>
                    <stop offset="1" stop-color="var(--accent)" stop-opacity="0"/>
                  </linearGradient>
                  <clipPath id="nw-reveal"><rect data-reveal x="-4" y="-10" width="308" height="130"/></clipPath>
                </defs>
                <path class="chart__grid" d="M0 27.5H300M0 55H300M0 82.5H300"/>
                <g clip-path="url(#nw-reveal)">
                <path class="chart__area" data-area fill="url(#nw-area)" d="M0 86 C18 84 26 74 40 76 S66 88 80 80 S104 58 120 62 S146 76 160 66 S186 40 200 46 S226 58 240 44 S266 22 280 26 S294 18 300 14 V110 H0Z"/>
                <path class="chart__line" data-line d="M0 86 C18 84 26 74 40 76 S66 88 80 80 S104 58 120 62 S146 76 160 66 S186 40 200 46 S226 58 240 44 S266 22 280 26 S294 18 300 14"/>
                </g>
              </svg>
              <span class="chart__dot" data-dot></span>
              <span class="chart__tip" data-tip>Today <b>$4,812</b></span>
            </div>
            <div class="bars">
              <p class="chart__label">Sessions <span>week</span></p>
              <div class="bars__row">
                <span class="bar" style="--h: .46"></span>
                <span class="bar" style="--h: .62"></span>
                <span class="bar" style="--h: .54"></span>
                <span class="bar" style="--h: .78"></span>
                <span class="bar" style="--h: .7"></span>
                <span class="bar" style="--h: .92"></span>
                <span class="bar is-today" style="--h: .84"></span>
              </div>
            </div>
          </div>
        </section>
      </div>

      <!-- the frosted veil over the dashboard: it opens from the middle when the glass unlocks -->
      <div class="veil" data-veil aria-hidden="true"></div>
      <span class="ring" data-ring aria-hidden="true"></span>

      <!-- the sign in card, a pane of dark frosted glass -->
      <div class="lock" data-lock>
        <form class="card" data-card novalidate>
          <span class="card__sheen" aria-hidden="true"></span>
          <div class="card__brand">
            <span class="card__mark" aria-hidden="true">
              <svg viewBox="0 0 20 20"><path d="M5 14V10M10 14V6M15 14V8"/></svg>
            </span>
            <span class="card__name">Northwind Analytics</span>
          </div>
          <h1 class="card__title">Sign in to your workspace</h1>
          <p class="card__sub">Welcome back. Your dashboards are waiting.</p>

          <label class="field" data-field="email">
            <span class="field__top"><span class="field__label">Email</span></span>
            <span class="field__box" data-box>
              <input class="field__input" data-email type="email" name="email" autocomplete="username" placeholder="you@company.com" spellcheck="false">
            </span>
          </label>

          <div class="field" data-field="password">
            <span class="field__top">
              <label class="field__label" for="nw-pass">Password</label>
              <span class="field__note" data-note>
                <span class="field__forgot">Forgot?</span>
                <span class="field__error" data-error>Wrong password</span>
              </span>
            </span>
            <span class="field__box" data-box data-shake>
              <input class="field__input" id="nw-pass" data-pass type="password" name="password" autocomplete="current-password" placeholder="Your password">
              <button class="field__eye" type="button" data-eye aria-label="Show password" aria-pressed="false">
                <svg viewBox="0 0 20 20" aria-hidden="true">
                  <path class="eye__lid" d="M2.5 10s2.8-5 7.5-5 7.5 5 7.5 5-2.8 5-7.5 5-7.5-5-7.5-5z"/>
                  <circle class="eye__pupil" data-pupil cx="10" cy="10" r="2.3"/>
                  <path class="eye__slash" data-slash pathLength="1" d="M4 16L16 4"/>
                </svg>
              </button>
            </span>
          </div>

          <label class="remember">
            <input class="remember__input" type="checkbox" data-remember>
            <span class="remember__box" aria-hidden="true">
              <svg viewBox="0 0 12 12"><path data-tick pathLength="1" d="M2.6 6.3l2.2 2.2 4.6-4.9"/></svg>
            </span>
            <span class="remember__text">Remember me</span>
          </label>

          <div class="submit">
            <button class="signin" type="submit" data-signin>
              <span class="signin__beam" data-beam aria-hidden="true"></span>
              <span class="signin__face">
                <span class="signin__words" data-words>Sign in</span>
                <svg class="signin__done" viewBox="0 0 16 16" aria-hidden="true"><path data-done pathLength="1" d="M3.6 8.4l2.9 2.9 5.9-6.3"/></svg>
              </span>
            </button>
          </div>

          <p class="or" aria-hidden="true"><span>or</span></p>

          <button class="sso" type="button" data-sso>
            <svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="7" cy="10" r="3.2"/><path d="M10.2 10H17M14.5 10v2.6M16.6 10v1.8"/></svg>
            <span>Continue with SSO</span>
          </button>
        </form>
      </div>

      <!-- the pointer of the walk on its own -->
      <svg class="pointer" data-pointer viewBox="0 0 20 22" aria-hidden="true">
        <path d="M4 2.5v15.2l3.9-3.7 2.6 5.8 2.7-1.2-2.6-5.7h5.4z"/>
      </svg>
    </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.

50 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 “Glass login form” 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 the window of an analytics app, Northwind Analytics, rises slowly: behind, blurred and veiled, the dashboard shows through with its sidebar, three figures, the revenue chart and the weekly bars, all asleep. In the middle a card of dark frosted glass, with a very fine grain and a line of light on its top edge: the logo, ‘Sign in to your workspace’, the Email and Password fields, Remember me, the light ‘Sign in’ button, a rule with ‘or’ and ‘Continue with SSO’. A pointer comes in and taps the email: the field's edge catches the light and a violet halo, and the light sits right over the text caret, moving on letter by letter as ‘ines@northwind.io’ is typed. Then the password, a wrong one, and Sign in: the button squeezes on a spring into a dark circle with a light running around its edge. After a moment it springs back wide, the password field turns red and shakes on a spring, and ‘Wrong password’ takes the place of ‘Forgot?’. The pointer erases, types the right one, opens the eye to show it (the pupil widens, the bar draws itself) and closes it, ticks Remember me and presses again. This time a green check draws itself in the circle: a ring of light widens from the middle, the glass dissolves, the veil opens from the centre to the edges and the dashboard comes into focus with a small settle: ‘Welcome back, Ines’, the figures count up to $84,210 and 12,480, the revenue line draws itself, the bars rise on a spring one after another and today's tooltip pops in. Shortly after, the glass closes again and the loop starts over. The fields, the eye, Remember me and the buttons really work: the right password is harbor-light-7.

How it works

Three layers in the window

At the back the dashboard, drawn in HTML and SVG, blurred with a filter and scaled up 4.5%; above it the veil, a dark fill with a radial mask whose radius is a CSS variable; on top the glass card with backdrop-filter, an SVG grain and a one pixel edge made with a mask.

The light on the text caret

The field's edge is a radial gradient masked to a ring. On every letter an off-screen canvas measures the typed text (for the password the dots, with the letter spacing) and moves the gradient's centre there through a CSS variable: the light follows the caret.

The button that squeezes

GSAP takes the button's width from the form's down to its own height, and a conic gradient, masked to a ring on the edge, spins through a variable in degrees. If the answer is no it springs back wide on an elastic; if it is yes it stays round and draws the check with stroke-dashoffset.

The spring of the error

The field starts nine pixels off and comes back to zero on a very lively elastic.out: two or three swings that die away. The edge turns red with a class, and ‘Forgot?’ and ‘Wrong password’ swap vertically in the same place, without changing the form's height.

The unlock

One timeline: the ring of light widens, the card grows 5% and blurs as it fades, the radius of the veil's mask goes from zero to the diagonal on expo.inOut, the dashboard's filter goes to zero and its scale back to one on a back.out. Then the figures count on a tween of a number, the line draws itself and the bars rise staggered.

Values to change

NameFileDefaultWhat it changes
EMAILscript.jsines@northwind.ioThe email the walk on its own types.
WRONGscript.jsnorthwind24The wrong password it tries first.
PASSWORDscript.jsharbor-light-7The password that opens the dashboard, also for whoever types it.
TYPE_SPEEDscript.js14Letters per second when it types on its own.
BLURscript.js9How blurred the dashboard is behind the glass, in pixels.
LOADINGscript.js1.1Seconds of loading before the answer.
SHAKEscript.js9How far the wrong field shakes, in pixels.
BOUNCEscript.js0.32The springs: lower is more elastic.
HOLDscript.js3.4Seconds the dashboard stays open before the glass closes again.
LOOPscript.jstrueRepeats the walk on its own.

Try them in the Playground

When to use it

For the login page of a dashboard, a SaaS app, an admin panel or an analytics tool: the sign in that lets you glimpse what is behind it and hands it over with a small moment of celebration.

On phones

The same animation with adapted sizes: the window is almost as wide as the screen and at most 94% of its height, the fields and margins shrink with the height, the line under the title steps aside on short screens and the dashboard keeps two figures and the revenue chart. With a finger everything works as with a mouse.

With reduced motion

Nothing moves: the pointer is hidden, the wrong field does not shake but turns red, the button changes at once, and the unlock is a fade of the glass and the veil while the dashboard turns sharp; figures, line and bars appear already in place.

Pitfalls

  • A blur filter on an element filling the window leaves its edges transparent and pale: the dashboard is scaled up 4.5% while it is blurred, so the soft edges stay outside the window, and the scale goes back to one only during the unlock.
  • An error message under the field would have made the form taller and everything would jump: it takes the place of ‘Forgot?’ on the label's row.
  • The walk on its own is a new timeline on every loop, not a repeat: the pointer's positions are read again from the real elements, so they stay right even if the window changes size halfway.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 12 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