Skip to content
animorio
IT
Back to the library

Card into wallet scroll

Scroll, Transitions, HoverGSAP, CSS onlyMediumCompressed weight: Demo 8.9 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The card onboarding of Orrowe, a made-up bank, told in three steps as you scroll. The card arrives face down and turns over with a small lift while a light sweeps it; then it takes a finish, graphite, sand or cobalt, with the ring sliding under the swatches, and the holder’s name is engraved letter by letter; at last a drawn phone gathers around it, the card shrinks into the wallet, the two cards already there step down to make room and a note says it is ready to pay. Everything follows the scroll backwards too, and the card leans towards the pointer while it is out of the phone.

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>
<!--
  "Card into wallet scroll" 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>Orrowe, set up your 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>
  <!-- a made-up bank, Orrowe, and the onboarding of its new card told on scroll: the card arrives face down and turns
       over, takes a finish and the holder's name letter by letter, then a phone gathers around it and the card slots
       into the wallet in front of the other two -->
  <section class="corsa" data-corsa>
    <div class="palco" data-palco>
      <div class="alone" data-alone aria-hidden="true"></div>

      <header class="testa">
        <div class="marchio">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.5 17.5 10 10 17.5 2.5 10z"/><path d="M10 6.5 13.5 10 10 13.5 6.5 10z"/></svg>
          <span>Orrowe</span>
        </div>
        <div class="barre" data-barre aria-hidden="true">
          <span class="barra"><i></i></span><span class="barra"><i></i></span><span class="barra"><i></i></span>
        </div>
      </header>

      <div class="passi" aria-live="polite">
        <div class="passo" data-passo>
          <p class="passo__titolo">Your card has landed</p>
          <p class="passo__riga">Turn it over. It’s yours from today.</p>
        </div>
        <div class="passo" data-passo>
          <p class="passo__titolo">Make it yours</p>
          <p class="passo__riga">Pick a finish. We engrave the name.</p>
        </div>
        <div class="passo" data-passo>
          <p class="passo__titolo">Ready to tap</p>
          <p class="passo__riga">In your phone before the plastic arrives.</p>
        </div>
      </div>

      <div class="scena" data-scena>
        <!-- the phone that gathers around the card at the end -->
        <div class="telefono" data-telefono aria-hidden="true">
          <div class="telefono__schermo">
            <div class="telefono__stato"><span>16:30</span><span class="telefono__isola"></span><span class="telefono__icone"><i></i><i></i><i></i></span></div>
            <p class="telefono__titolo">Wallet</p>
            <div class="altra altra--due" data-altra></div>
            <div class="altra altra--una" data-altra></div>
            <div class="avviso" data-avviso>
              <svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="8"/><path class="avviso__spunta" data-spunta d="M6.2 10.3l2.6 2.6 5-5.4"/></svg>
              <span><b>Added to wallet</b><em>Tap to pay is on</em></span>
            </div>
          </div>
        </div>

        <!-- the card, two faces -->
        <div class="ombra" data-ombra aria-hidden="true"></div>
        <div class="carta" data-carta role="img" aria-label="Orrowe debit card in the name of Elin Varga, ending in 4821">
          <div class="faccia faccia--retro">
            <div class="banda"></div>
            <div class="firma"><span>Authorised signature</span><b>482</b></div>
            <p class="retro__testo">Orrowe Bank. This card remains our property. If found, return it to any branch.</p>
          </div>
          <div class="faccia faccia--fronte">
            <div class="grana"></div>
            <div class="riflesso" data-riflesso></div>
            <div class="fronte__alto">
              <span class="fronte__marchio">
                <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.5 17.5 10 10 17.5 2.5 10z"/><path d="M10 6.5 13.5 10 10 13.5 6.5 10z"/></svg>
                Orrowe
              </span>
              <svg class="contactless" viewBox="0 0 24 24" aria-hidden="true"><path d="M8 8.5c1.3 2.2 1.3 4.8 0 7"/><path d="M11.5 6.5c2.2 3.4 2.2 7.6 0 11"/><path d="M15 4.5c3 4.6 3 10.4 0 15"/></svg>
            </div>
            <svg class="chip" viewBox="0 0 44 34" aria-hidden="true">
              <defs><linearGradient id="oro" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#f3dfa6"/><stop offset=".5" stop-color="#c9a65a"/><stop offset="1" stop-color="#e9cf8a"/></linearGradient></defs>
              <rect x="1" y="1" width="42" height="32" rx="6" fill="url(#oro)"/>
              <path d="M1 12h13M1 22h13M30 12h13M30 22h13M14 1v32M30 1v32M14 17h16" stroke="rgba(90,64,20,.45)" stroke-width="1" fill="none"/>
            </svg>
            <div class="fronte__basso">
              <div>
                <p class="nome" data-nome aria-hidden="true"></p>
                <p class="numero">Ending in <b>4821</b></p>
              </div>
              <span class="tipo">Debit</span>
            </div>
          </div>
        </div>
      </div>

      <div class="finiture" data-finiture aria-hidden="true">
        <span class="finiture__anello" data-anello></span>
        <span class="finitura" style="--c:var(--grafite-a)"></span>
        <span class="finitura" style="--c:var(--sabbia-a)"></span>
        <span class="finitura" style="--c:var(--cobalto-a)"></span>
        <em class="finiture__nome" data-finitura-nome>Graphite</em>
      </div>

      <p class="invito" data-invito>Scroll to set up your card</p>
    </div>
  </section>
  <footer class="piede">Orrowe is a made-up bank. The card and its numbers are illustrative.</footer>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.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.

41 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 “Card into wallet scroll” 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 an almost black background with a glow the colour of the card, at the top the brand of Orrowe, a made-up bank, and three thin bars telling which step you are on. Below, one line per step: «Your card has landed», «Make it yours», «Ready to tap». As you scroll the card comes up face down, showing the back with the magnetic stripe and the signature panel, and turns over: halfway it lifts and comes closer, the shadow underneath narrows, then it settles and a light crosses its face. In the second step three swatches appear, graphite, sand and cobalt: the ring slides from one to the next with a small spring, the card blends into the new colour and its ink goes from light to dark, the finish name below changes rising. Meanwhile the holder’s name, ELIN VARGA, is engraved one letter at a time, each letter landing larger and lighter. In the third step a drawn phone gathers around the card, the card shrinks and rises into the wallet with a small overshoot, the two cards already there step down to make room and at the bottom the note «Added to wallet» arrives with its tick drawing itself. While the card is out of the phone it leans towards the pointer and the light follows. Everything goes back as you scroll up.

How it works

One ride, three steps

The section is 460vh tall with a sticky stage one screen high. A single scrubbed ScrollTrigger takes a number from 0 to 1 and one function draws everything from it: the card, the phone, the bars and the step lines. So scrolling back replays it all in reverse.

The two-sided card

The card has transform-style: preserve-3d and two faces with backface-visibility: hidden; the back is already turned by 180 degrees. GSAP takes rotationY from 180 to 0 and lifts it halfway with z and scale: the sine of the turn gives the lift.

The finish

The colours of the three finishes live in :root and the card gets them as CSS variables mixed with gsap.utils.interpolate: base, shade and ink move together, and the glow behind too.

The engraved name

The name is one span per letter: each letter has its own slice of scroll and arrives larger and lighter, then settles. The relief is a light text-shadow above and a dark one below.

Into the phone

Sizes are in pixels and are redone on resize: the final scale is the width of the phone screen divided by the card width, and the move brings the card centre into the wallet slot, with a back.out for the small overshoot.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the three steps take: 2 is twice as long.
NAMEscript.js'ELIN VARGA'The name engraved on the card.
FLIP_LIFTscript.js1.05How much the card lifts while it turns over.
TILTscript.js7How many degrees the card leans towards the pointer.
SHINEscript.js0.8How bright the light that sweeps the card is (0 none).
SCRUBscript.js0.6How far the stage lags behind the scroll, in seconds.

Try them in the Playground

When to use it

For a banking or payments app onboarding, the page presenting a new card or the launch of a metal card: whoever scrolls sees it arrive, be chosen and end up in the phone, without a single click.

On phones

The same animation with adapted sizes: stage, card and phone are sized on the screen height and the card on the width too, so everything fits in the phone frame.

With reduced motion

No motion: each third of the scroll shows a finished step, and the stage changes with a fade.

Pitfalls

  • Both faces need backface-visibility: hidden with the -webkit- prefix too, otherwise Safari shows the back through the front.
  • The card and the phone are measured in pixels and remeasured on resize: with percentages GSAP would not move the card into the right slot.
  • The pointer tilt runs on the ticker and redraws only while the pointer moves, so at rest it costs nothing.
  • The entrance opacity goes on the two faces and never on the card: with an opacity below 1 the browser flattens the 3D of the preserve-3d element and the mirrored front shows through the back.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.9 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

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