Skip to content
animorio
IT
Back to the library

Login to dashboard

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

The transition from sign in to the app of Ledgerly, a made-up accounting software for a small studio: Sign in turns into Signing in with a turning ring, then the login card shrinks and flies on a precise spring to the top right corner, where it becomes Ada's avatar, while the dashboard composes behind it: the sidebar, the greeting typing itself, three stat tiles with counting numbers and the chart line drawing itself. Sign out, from the avatar's menu, plays the way back.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN.

<!doctype html>
<!--
  "Login to dashboard" 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>Ledgerly, from sign in to the dashboard</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>
  <!-- Ledgerly, a made-up accounting app for a small studio. The sign in card sits in the middle of the app window;
       Sign in turns into Signing in, then the card shrinks and flies on a spring to the top right corner, where it
       becomes Ada's avatar, while the dashboard composes behind it: the sidebar slides in, the greeting types itself,
       three stat tiles come in one after the other with their numbers counting, a cash flow line draws itself.
       Sign out, from the avatar's menu, plays the way back: the dashboard retreats and the avatar becomes the card -->
  <main class="stage">
    <div class="win" data-win>

      <!-- the sign in card -->
      <div class="login" data-login>
        <form class="card" data-card autocomplete="off" onsubmit="return false">
          <div class="card__in" data-card-in>
            <div class="card__brand">
              <svg class="mark" viewBox="0 0 20 20" aria-hidden="true"><rect x="1" y="1" width="18" height="18" rx="5.5"/><path d="M6 6.5v7h8M9.5 10h4.5"/></svg>
              <span>Ledgerly</span>
            </div>
            <h1 class="card__title">Welcome back</h1>
            <p class="card__sub">Sign in to the books of Lindqvist &amp; Co.</p>
            <label class="field">
              <span class="field__label">Email</span>
              <span class="field__box"><span class="field__value">ada@lindqvist.co</span></span>
            </label>
            <label class="field">
              <span class="field__label">Password <a class="field__link" href="#" tabindex="-1" onclick="return false">Forgot?</a></span>
              <span class="field__box field__box--pass" data-pass aria-label="Password, hidden"></span>
            </label>
            <button class="go" type="button" data-signin data-autoclic>
              <span class="go__face" data-go-face>
                <span class="go__words" data-go-words>Sign in</span>
                <span class="go__busy" data-go-busy aria-hidden="true">
                  <svg class="spin" data-spin viewBox="0 0 16 16"><circle class="spin__track" cx="8" cy="8" r="6"/><path class="spin__arc" d="M8 2a6 6 0 0 1 6 6"/></svg>
                  <span>Signing in</span>
                </span>
              </span>
            </button>
          </div>
        </form>
      </div>

      <!-- the dashboard -->
      <div class="app" data-app>
        <aside class="side" data-side>
          <div class="side__brand" data-side-item>
            <svg class="mark" viewBox="0 0 20 20" aria-hidden="true"><rect x="1" y="1" width="18" height="18" rx="5.5"/><path d="M6 6.5v7h8M9.5 10h4.5"/></svg>
            <span class="side__name">Ledgerly</span>
          </div>
          <nav class="nav" data-nav>
            <span class="nav__hover" data-nav-hover aria-hidden="true"></span>
            <a class="nav__item is-on" href="#" data-side-item data-nav-item onclick="return false">
              <svg viewBox="0 0 16 16" aria-hidden="true"><rect x="2" y="2" width="5" height="5" rx="1.4"/><rect x="9" y="2" width="5" height="5" rx="1.4"/><rect x="2" y="9" width="5" height="5" rx="1.4"/><rect x="9" y="9" width="5" height="5" rx="1.4"/></svg>
              <span>Overview</span>
            </a>
            <a class="nav__item" href="#" data-side-item data-nav-item onclick="return false">
              <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 1.8h5.4L12.5 5v9.2H4z"/><path d="M6.3 8.2h3.9M6.3 10.9h3.9"/></svg>
              <span>Invoices</span>
            </a>
            <a class="nav__item" href="#" data-side-item data-nav-item onclick="return false">
              <svg viewBox="0 0 16 16" aria-hidden="true"><rect x="1.8" y="3.6" width="12.4" height="8.8" rx="1.8"/><path d="M1.8 6.6h12.4M4.4 9.8h2.4"/></svg>
              <span>Expenses</span>
            </a>
            <a class="nav__item" href="#" data-side-item data-nav-item onclick="return false">
              <svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="6" cy="5.6" r="2.4"/><path d="M1.8 13.4c.6-2.4 2.2-3.6 4.2-3.6s3.6 1.2 4.2 3.6M10.6 3.4a2.3 2.3 0 0 1 0 4.4M12 9.9c1.2.5 1.9 1.7 2.2 3.5"/></svg>
              <span>Clients</span>
            </a>
            <a class="nav__item" href="#" data-side-item data-nav-item onclick="return false">
              <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2.4 13.6h11.2M4.6 11V7.6M8 11V4.4M11.4 11V8.8"/></svg>
              <span>Reports</span>
            </a>
          </nav>
        </aside>

        <section class="main" data-main>
          <header class="top">
            <p class="top__date" data-fade>Thursday, 19 November</p>
            <div class="top__right">
              <span class="top__search" data-fade>
                <svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="7" cy="7" r="4.4"/><path d="M10.4 10.4l3.2 3.2"/></svg>
                <span>Search</span>
              </span>
              <div class="who">
                <button class="avatar" type="button" data-avatar aria-haspopup="menu" aria-expanded="false" aria-label="Ada Lindqvist, account">
                  <span class="avatar__face">AL</span>
                </button>
                <div class="menu" data-menu role="menu" inert>
                  <div class="menu__who">
                    <span class="menu__name">Ada Lindqvist</span>
                    <span class="menu__mail">ada@lindqvist.co</span>
                  </div>
                  <span class="menu__rule" aria-hidden="true"></span>
                  <a class="menu__item" href="#" role="menuitem" onclick="return false">
                    <svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="2.2"/><path d="M8 1.8v2M8 12.2v2M1.8 8h2M12.2 8h2M3.6 3.6l1.4 1.4M11 11l1.4 1.4M3.6 12.4L5 11M11 5l1.4-1.4"/></svg>
                    <span>Settings</span>
                  </a>
                  <button class="menu__item menu__item--out" type="button" role="menuitem" data-signout data-autoclic>
                    <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6.4 2.4H3.6a1.2 1.2 0 0 0-1.2 1.2v8.8a1.2 1.2 0 0 0 1.2 1.2h2.8M10.4 5l3 3-3 3M13.2 8H6.6"/></svg>
                    <span>Sign out</span>
                  </button>
                </div>
              </div>
            </div>
          </header>

          <div class="hello">
            <h2 class="hello__line" data-hello aria-label="Good morning, Ada">Good morning, Ada</h2>
            <p class="hello__sub" data-fade>Here is how Lindqvist &amp; Co. stands today.</p>
          </div>

          <div class="tiles">
            <div class="tile-slot" data-tile><article class="tile">
              <p class="tile__label">Revenue</p>
              <p class="tile__value" data-count="48260" data-prefix="$">$48,260</p>
              <p class="tile__note"><span class="chip chip--up">+12.4%</span><span>on October</span></p>
            </article></div>
            <div class="tile-slot" data-tile><article class="tile">
              <p class="tile__label">Unpaid</p>
              <p class="tile__value" data-count="9415" data-prefix="$">$9,415</p>
              <p class="tile__note"><span class="chip">7 open</span><span>2 overdue</span></p>
            </article></div>
            <div class="tile-slot" data-tile><article class="tile">
              <p class="tile__label">Expenses</p>
              <p class="tile__value" data-count="17930" data-prefix="$">$17,930</p>
              <p class="tile__note"><span class="chip">&minus;3.1%</span><span>on October</span></p>
            </article></div>
          </div>

          <article class="chart" data-chart>
            <header class="chart__head" data-fade>
              <p class="chart__title">Cash flow</p>
              <p class="chart__range">Last 12 weeks</p>
            </header>
            <div class="chart__plot" data-plot>
              <svg class="chart__svg" data-svg aria-hidden="true">
                <defs>
                  <linearGradient id="ledgerly-area" x1="0" y1="0" x2="0" y2="1">
                    <stop class="stop-a" offset="0"/>
                    <stop class="stop-b" offset="1"/>
                  </linearGradient>
                </defs>
                <g data-grid></g>
                <path class="chart__area" data-area fill="url(#ledgerly-area)"/>
                <path class="chart__line" data-line/>
                <line class="chart__cursor" data-cursor x1="0" x2="0" y1="0" y2="0"/>
                <circle class="chart__point" data-point r="3.2" cx="0" cy="0"/>
              </svg>
              <span class="tip" data-tip><span data-tip-week>Week 12</span><b data-tip-value>$12,480</b></span>
            </div>
          </article>
        </section>
      </div>

      <!-- the surface that flies between the card and the avatar -->
      <div class="shell" data-shell aria-hidden="true"><span class="shell__face" data-shell-face>AL</span></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.

59 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 “Login to dashboard” 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

An app window on a warm white page. In the middle, the sign in card of Ledgerly, a made-up accounting software, for the books of Lindqvist & Co.: the green mark, «Welcome back», the email already written (ada@lindqvist.co) and the password as dots, which come in one after the other as if someone were typing it, then the dark «Sign in» button. On click the button gives under the finger and comes back with a small bounce, the words slide away and «Signing in» rises in their place with a ring turning on itself; the fields dim a little. After .9 s the words of the card go and a surface stays in its place that flies to the top right corner on a measured spring: it shrinks, rounds into a circle and changes from paper white to the green of the accent; x starts a moment before y, so the flight makes a soft arc, and on arrival it passes the mark by a pixel and settles. There it becomes Ada's avatar with the initials AL, which light up with a halo that fades. Behind it the dashboard composes: the sidebar slides in from the left with its items (Overview, Invoices, Expenses, Clients, Reports), «Good morning, Ada» types itself letter by letter, three tiles (November revenue, unpaid invoices, expenses) come in one after the other while their numbers count up to their value, and the cash flow line of the last twelve weeks draws itself and fills its area with green. On hover a soft pill follows the sidebar item, the tiles rise by two pixels with their shadow growing, on the chart a hairline, a ring on the week and the figure in a dark label follow the pointer, and the avatar takes a green ring. The avatar opens its menu with name, email, Settings and Sign out: Sign out withdraws the dashboard (the chart, the tiles, the greeting erasing itself, the sidebar) and the avatar flies back to the middle, grows and turns into the card again with its words.

How it works

A surface that flies in place of the card

The card is not transformed with a scale, which would stretch its corners and its words: its words go and .shell appears in its place, a single element measured on the card and on the avatar (getBoundingClientRect relative to the window) that writes position, width, height, radius, colour and shadow every frame. It is a FLIP done by hand: from the first box to the last, interpolating every property.

The spring as a curve

The curve of the flight is a spring written as a function: 1 - e^(-k t) (cos(w t) + k/w sin(w t)), divided by its value at 1 so it lands exactly. It leaves at rest, passes the mark by a hair and settles; SPRING_DAMPING and SPRING_SPEED are k and w. x, y and the size have three tweens with slightly different durations: x leaves first and the flight makes an arc.

The dashboard behind, staggered

In the same timeline, from the moment the flight starts: the sidebar from xPercent -101 with expo.out, its items, the greeting split into letters that appear at TYPE_SPEED letters a second, the three tiles with back.out(1.15) (16 pixels of travel, one pixel too far), the numbers counting with plain objects and toLocaleString, the chart line with stroke-dashoffset on its real length.

The chart measured in pixels

The cash flow path is built in JavaScript on the real size of its box (Catmull-Rom turned into Bézier curves), with no stretched viewBox: the line stays 1.8 pixels. It is rebuilt on resize and the drawing is a progress from 0 to 1, so even halfway the line picks up at the right point.

The way back

Sign out withdraws the dashboard in reverse (the chart, the tiles from the last, the letters of the greeting from the end, the sidebar) and puts the surface back on the avatar, already green with the initials: the initials fade, the surface flies to the middle, turns white again and when it reaches the card's box the card's words come back. If the pilot presses Sign out with the menu closed, the menu opens first, as a hand would do.

Values to change

NameFileDefaultWhat it changes
SIGNINGscript.js0.9Seconds of «Signing in» before the card leaves.
FLIGHTscript.js1Seconds of the card's flight to the avatar.
SPRING_DAMPINGscript.js9The damping of the flight's spring: lower passes the mark further and comes back.
SPRING_SPEEDscript.js6.5How quickly the spring swings.
TYPE_SPEEDscript.js26Letters per second of the greeting typing itself.
COUNT_TIMEscript.js1.3Seconds the numbers of the tiles take to count.
TILE_STAGGERscript.js0.09Seconds between one tile and the next.
LINE_TIMEscript.js1.2Seconds the chart line takes to draw.
GREETINGscript.jsGood morning, AdaThe greeting on the dashboard.

Try them in the Playground

When to use it

For the sign in of a web app, a management tool, a subscription software or the customer area of a site: the moment between login and the first screen, when the sign in card becomes the user's avatar and it is clear at once where the account went. It works for signing out too.

On phones

The same, with the same flight. The window is sized on width and height; below 620 pixels of width the sidebar keeps only its icons, the search goes and the tiles stay three in a row with smaller numbers. There are no hovers (there is no pointer).

With reduced motion

No flight and no movement: Sign in turns into Signing in with a fade, then the card fades away and the dashboard appears already laid out, with the numbers at their value and the line already drawn. Sign out does the same in reverse.

Pitfalls

  • A scale on the card to make it a circle stretches its corners and its words: it needs a separate surface that really changes width, height and radius.
  • The tiles move with GSAP and rise on hover with CSS: GSAP writes translate: none inline and would wipe the hover, so GSAP moves the slot and the hover is on the tile inside.
  • The Signing in ring turns as a whole svg: transformOrigin '50% 50%', never svgOrigin, which on the svg itself moves the pivot and makes it orbit.
  • The pilot presses Sign out even with the menu closed: the handler opens the menu first and then signs out, otherwise the exit starts from an invisible menu.
  • The card comes in rising by 14 pixels: its box is measured without that y, otherwise the surface on the way back stops lower than the card.

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