Skip to content
animorio
IT
All components

Forgot password card

Forms, Transitions, TextGSAP, CSS onlyMediumCompressed weight: Demo 9.0 KBGSAP 28 KBFreeDownload the zip

The «Forgot password?» card of Northdesk, a made-up notes app: the email being typed, a soft check that shakes the field by two pixels and says what to add when something is missing, then the tick lights up. Send reset link turns into Sending with a spinning ring, and the card moves to «Check your inbox»: the letter slides into a line-drawn envelope, the flap closes, the envelope flies off and comes back sealed with a tick. «Resend in 0:30» counts down digit by digit and becomes the Resend link. On white, with a single cobalt blue 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>
<!--
  "Forgot password card" 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>Forgot password card</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 forgot password card of Northdesk, a made-up notes app: the email, a soft check that says what is missing,
         Send reset link that turns into Sending with a ring, then Check your inbox with an envelope that closes and leaves,
         and Resend in 0:30 counting down until it becomes a link -->
    <section class="card" data-card aria-label="Reset your Northdesk password">
      <span class="card__edge" aria-hidden="true"></span>
      <span class="card__glow" aria-hidden="true" data-glow></span>

      <header class="brand">
        <span class="brand__mark" aria-hidden="true">
          <svg viewBox="0 0 20 20"><path d="M5 15V5l10 10V5"/></svg>
        </span>
        <span class="brand__name">Northdesk</span>
      </header>

      <div class="views" data-views>
        <!-- the request -->
        <form class="view view--ask" data-ask novalidate>
          <span class="badge" aria-hidden="true">
            <svg viewBox="0 0 24 24" class="badge__lock">
              <rect x="5" y="10.5" width="14" height="10" rx="2.6"/>
              <path d="M8.3 10.5V8a3.7 3.7 0 0 1 7.4 0v2.5"/>
              <path d="M12 14.6v2.2" class="badge__hole"/>
            </svg>
          </span>
          <h1 class="title">Forgot password?</h1>
          <p class="sub">Enter the email you signed up with and we’ll send you a link to reset it.</p>

          <label class="label" for="email">Email</label>
          <div class="field" data-field>
            <svg class="field__icon" viewBox="0 0 20 20" aria-hidden="true"><rect x="2.8" y="4.6" width="14.4" height="10.8" rx="2.2"/><path d="M3.4 5.6 10 10.6l6.6-5"/></svg>
            <input class="field__input" id="email" name="email" type="email" inputmode="email" autocomplete="email" spellcheck="false" placeholder="you@company.com" data-input aria-describedby="email-msg">
            <span class="field__ok" aria-hidden="true" data-ok>
              <svg viewBox="0 0 20 20"><path d="M6 10.3 8.7 13l5.3-5.6" pathLength="1" data-ok-tick/></svg>
            </span>
          </div>
          <p class="msg" id="email-msg" role="status" aria-live="polite" data-msg></p>

          <button class="send" type="submit" data-send>
            <span class="send__face send__face--idle" data-face-idle>Send reset link</span>
            <span class="send__face send__face--busy" data-face-busy aria-hidden="true">
              <span class="send__group" data-busy-group>
                <svg class="ring" viewBox="0 0 20 20" data-ring><circle cx="10" cy="10" r="7" pathLength="1"/></svg>
                <span>Sending</span>
              </span>
            </span>
          </button>
          <button class="back" type="button" data-back>
            <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M9.6 4 5.6 8l4 4"/></svg>
            <span>Back to sign in</span>
          </button>
        </form>

        <!-- the link is on its way -->
        <div class="view view--sent" data-sent aria-hidden="true">
          <div class="mail" aria-hidden="true">
            <svg class="env" viewBox="0 0 96 66" data-env>
              <g data-env-fly>
                <path class="trail" d="M12 44H3M15 52H7M13 36H6" data-trail/>
                <rect class="env__back" x="18" y="24" width="60" height="38" rx="5"/>
                <path class="env__flap" d="M18 24H78L48 46Z" data-flap/>
                <g data-letter>
                  <rect class="letter" x="26" y="8" width="44" height="34" rx="3"/>
                  <path class="letter__line" d="M33 16h22M33 22h30M33 28h16"/>
                </g>
                <path class="env__front" d="M18 24 48 46 78 24v33a5 5 0 0 1-5 5H23a5 5 0 0 1-5-5z"/>
              </g>
            </svg>
            <span class="mail__done" data-done>
              <svg viewBox="0 0 20 20"><path d="M6 10.3 8.7 13l5.3-5.6" pathLength="1" data-done-tick/></svg>
            </span>
          </div>
          <h2 class="title">Check your inbox</h2>
          <p class="sub">We sent a reset link to <strong data-email-out>mara.lind@fieldmail.com</strong>. It expires in 30 minutes.</p>

          <p class="again">
            <span>Didn’t get it?</span>
            <span class="again__slot" data-slot>
              <span class="again__wait" data-wait>Resend in <span class="clock" data-clock>0:30</span></span>
              <button class="again__link" type="button" data-resend tabindex="-1">Resend link</button>
            </span>
          </p>
          <button class="back" type="button" data-back-2>
            <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M9.6 4 5.6 8l4 4"/></svg>
            <span>Back to sign in</span>
          </button>
        </div>
      </div>
    </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.

34 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 “Forgot password card” 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

The card arrives and a thread of light runs along its top edge. The field lights up blue and the email is typed, but without its ending: Send reset link does not go, the field shakes by two pixels and turns a soft red, and «Add the ending after the dot, like .com.» appears below. As soon as «.com» is typed the message goes and a blue circle with a tick drawing itself lights up on the right. Send reset link: the label rises and fades, Sending comes in with a spinning ring, then the card shortens to «Check your inbox». The letter slides into the envelope, the flap flips over and closes, the envelope hops and flies off to the top right with three trail lines, then comes back down sealed on a spring and a circle with a tick snaps onto it. Below, the email in bold and «Resend in 0:30», its digits rolling every second; at zero the line becomes the Resend link link, and the slot shrinks to fit it. Back to sign in brings back the first card.

How it works

The check that says what is missing

On Send reset link the email is checked piece by piece: is there an @, a name before it, a domain after it, does the domain end with a dot and at least two letters. The first missing piece becomes the line under the field, and the field shakes with two-pixel x keyframes. From then on the check rewrites the line on every letter, without shaking, and when everything is in place it removes it and lights up the tick.

The two faces of the button

Send reset link and Sending sit in the same place, absolutely positioned, each centred on its own with place-items: the hidden label never widens the button, and the ring with Sending stays centred. The ring is a circle with a 0.3 of 1 dash spinning on its own centre with transformOrigin at 50%.

The switch between the two cards

The two views share one box: the second sits over the first, absolutely positioned, and the box takes the first one’s height in pixels and goes to the second one’s in 0.55 seconds, so the card shortens without jumping.

The envelope

The envelope is a line SVG: the back, the letter, the front pocket and the flap. The flap starts flipped (scaleY -1 around its fold, with svgOrigin) and sits behind the letter; it closes to scaleY 0, halfway it moves in front of the letter by going to the end of the group, and ends at 1 with a back.out. Then the group flies off with x, y, rotation and scale and comes back down on a spring.

The countdown

A timeline repeated thirty times calls a step every second; the digits of 0:30 are windows on a 0 to 9 column that rolls with yPercent. At zero the line changes face and the slot of the two faces takes the measured width of the one on show, so Resend link is not left as wide as the sentence before it.

Values to change

NameFileDefaultWhat it changes
EMAILscript.js"mara.lind@fieldmail.com"The email the demo types, and the one shown in Check your inbox.
RESEND_SECONDSscript.js30The seconds before the link can be sent again.
SEND_TIMEscript.js1.5The seconds the ring spins while the link is sent.
TYPE_SPEEDscript.js0.055The seconds between two letters when the demo types by itself.
SHAKEscript.js2How far the field shakes when the email is wrong, in pixels.
SPRINGscript.js0.55How springy the tick, the envelope and the button are (lower means more bounce).
AUTO_PAUSEscript.js1.2The seconds the demo waits before it starts over.
IDLEscript.js7The seconds after your last touch before the demo plays by itself again.

Try them in the Playground

When to use it

On the sign-in page of any app or site with accounts: the step before the new password, the one that says right away what is missing from the email, confirms the link has gone and only lets you resend it after a while.

On phones

Everything is in em and the size depends on both the width and the height of the window, so the whole card fits the phone box; the field uses the email inputmode, so the keyboard with the @ opens.

With reduced motion

No springs or movement: the field does not shake (the colour and the line stay), the digits change without rolling, the envelope is already closed and the card changes with a fade.

Pitfalls

  • The button faces are absolutely positioned: a hidden label in the flow would keep it wide and the ring with Sending would end up off centre.
  • The two faces of Resend get a slot as wide as the one on show, measured: if the slot took the wider one, Resend link would sit shifted left in the centred line.
  • With autoRound off the ticks at pathLength 1 draw themselves instead of popping in.
  • The envelope flap has to move in front of the letter halfway through closing: it moves to the end of the SVG group exactly when scaleY is zero.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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