Skip to content
animorio
IT
Back to the library

Pricing cards line-up

ScrollGSAP, CSS onlyMediumCompressed weight: Demo 7.1 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The pricing section of a made-up invoicing app, in the clean style of product interfaces: as you scroll, three plan cards arrive scattered and tilted and line up in a row with a small settle, the middle one rises and takes the accent, then the switch goes from monthly to yearly and every price rolls, digit by digit, to the new one.

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>
<!--
  "Pricing cards line-up" 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>Tallyfold pricing</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>
  <!-- the pricing section of a made-up invoicing app, Tallyfold. The stage sticks while you scroll: three plan cards
       arrive scattered and tilted, from different sides, and line up in a row with a small settle; their ticks draw
       themselves, the middle one rises and takes the accent with its badge; halfway the switch slides from Monthly to
       Yearly and every price rolls, digit by digit, to the yearly one. -->
  <main>
    <section class="corsa" data-corsa>
      <div class="palco" data-palco>
        <div class="spazio" data-spazio>
          <div class="tavola" data-tavola>

            <header class="testa" data-testa>
              <span class="testa__marchio">
                <svg viewBox="0 0 20 20" aria-hidden="true"><rect x="3" y="3" width="14" height="14" rx="4" /><path d="M7 8 H13 M7 12 H11" /></svg>
                <span data-marchio>Tallyfold</span>
              </span>
              <h1 class="testa__titolo">Plans that grow with your invoices</h1>
              <div class="interruttore" data-interruttore role="group" aria-label="Billing period">
                <i class="interruttore__pillola" data-pillola></i>
                <span class="interruttore__voce" data-voce="mese">Monthly</span>
                <span class="interruttore__voce" data-voce="anno">Yearly <b class="sconto" data-sconto>Save 17%</b></span>
              </div>
            </header>

            <div class="fila" data-fila>
              <article class="card" data-card>
                <div class="card__luce" aria-hidden="true"></div>
                <h2 class="card__nome">Solo</h2>
                <p class="card__per">For freelancers</p>
                <p class="prezzo"><span class="prezzo__valuta">$</span><span class="prezzo__cifre" data-prezzo="12,10"></span><span class="prezzo__mese">/mo</span></p>
                <p class="card__nota" data-nota><span data-nota-mese>Billed monthly</span><span data-nota-anno>Billed $120 yearly</span></p>
                <ul class="lista">
                  <li><svg viewBox="0 0 12 12" aria-hidden="true"><path data-spunta d="M2.5 6.2 L5 8.5 L9.5 3.5" /></svg>50 invoices a month</li>
                  <li><svg viewBox="0 0 12 12" aria-hidden="true"><path data-spunta d="M2.5 6.2 L5 8.5 L9.5 3.5" /></svg>Card payments</li>
                  <li><svg viewBox="0 0 12 12" aria-hidden="true"><path data-spunta d="M2.5 6.2 L5 8.5 L9.5 3.5" /></svg>Email reminders</li>
                </ul>
                <span class="pulsante">Start free</span>
              </article>

              <article class="card card--scelta" data-card data-scelta>
                <div class="card__luce" aria-hidden="true"></div>
                <span class="badge" data-badge>Most popular</span>
                <h2 class="card__nome">Studio</h2>
                <p class="card__per">For small teams</p>
                <p class="prezzo"><span class="prezzo__valuta">$</span><span class="prezzo__cifre" data-prezzo="29,24"></span><span class="prezzo__mese">/mo</span></p>
                <p class="card__nota" data-nota><span data-nota-mese>Billed monthly</span><span data-nota-anno>Billed $288 yearly</span></p>
                <ul class="lista">
                  <li><svg viewBox="0 0 12 12" aria-hidden="true"><path data-spunta d="M2.5 6.2 L5 8.5 L9.5 3.5" /></svg>Unlimited invoices</li>
                  <li><svg viewBox="0 0 12 12" aria-hidden="true"><path data-spunta d="M2.5 6.2 L5 8.5 L9.5 3.5" /></svg>Five seats</li>
                  <li><svg viewBox="0 0 12 12" aria-hidden="true"><path data-spunta d="M2.5 6.2 L5 8.5 L9.5 3.5" /></svg>Recurring billing</li>
                </ul>
                <span class="pulsante pulsante--pieno" data-cta>Choose Studio</span>
              </article>

              <article class="card" data-card>
                <div class="card__luce" aria-hidden="true"></div>
                <h2 class="card__nome">Firm</h2>
                <p class="card__per">For growing firms</p>
                <p class="prezzo"><span class="prezzo__valuta">$</span><span class="prezzo__cifre" data-prezzo="79,66"></span><span class="prezzo__mese">/mo</span></p>
                <p class="card__nota" data-nota><span data-nota-mese>Billed monthly</span><span data-nota-anno>Billed $792 yearly</span></p>
                <ul class="lista">
                  <li><svg viewBox="0 0 12 12" aria-hidden="true"><path data-spunta d="M2.5 6.2 L5 8.5 L9.5 3.5" /></svg>Everything in Studio</li>
                  <li><svg viewBox="0 0 12 12" aria-hidden="true"><path data-spunta d="M2.5 6.2 L5 8.5 L9.5 3.5" /></svg>Unlimited seats</li>
                  <li><svg viewBox="0 0 12 12" aria-hidden="true"><path data-spunta d="M2.5 6.2 L5 8.5 L9.5 3.5" /></svg>Audit trail</li>
                </ul>
                <span class="pulsante">Talk to sales</span>
              </article>
            </div>

            <div class="invito" data-invito>
              <span>Scroll to compare</span>
              <svg viewBox="0 0 12 16" aria-hidden="true"><path d="M6 2 V13 M2 9 L6 13 L10 9" /></svg>
            </div>
          </div>
        </div>
      </div>
    </section>
  </main>

  <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.

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 “Pricing cards line-up” 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 warm white background there is the mark of Tallyfold, an invoicing app, the headline Plans that grow with your invoices and underneath a Monthly and Yearly switch. As you scroll, three white cards arrive from different sides, scattered, smaller and tilted, one after another: the first from the left and below, the middle one from underneath, the third from the right and above. They line up going a hair past their place and coming back, and meanwhile the feature ticks draw themselves card after card. Then the middle plan, Studio, rises a few pixels with a small bounce: its border and shadow take the blue, the Most popular badge appears, a sheen of light crosses it and its button fills with blue, while the other two cards get slightly smaller. Halfway the switch pill slides from Monthly to Yearly stretching a little on the way, Save 17% pops in and every price rolls, digit by digit and card after card, to the yearly price, with the line underneath going from Billed monthly to the yearly total. Scroll back up and everything returns.

How it works

Each card comes from its own side

The three cards start from different places, shifted, tilted a few degrees, at 90% and transparent, and reach their place in the row with back.out(1.25): they go a hair past it and come back. They start a third of a second apart, so the row builds up instead of snapping in all at once.

The chosen plan takes the accent

The middle card rises RISE pixels plus two and comes back with a bounce; its border and shadow turn to the accent colour, the badge comes in with back.out(2.6), a slanted sheen crosses it and its button fills. The other two cards scale down slightly, so the difference shows without shouting.

Prices that roll digit by digit

Each price is made of columns of digits from 0 to 9 inside a window whose edges are faded by a mask; scrolling takes each column from the digit of the monthly price to the digit of the yearly one, with the right-hand digit a moment after the left one. Each column has a fixed width, so the price does not wobble while it turns.

A board that fits every box

Everything is drawn on a 640 by 420 pixel board (500 when the stage is narrow), scaled to fit the stage on both width and height. The switch pill is measured in board pixels once the typeface has loaded, and measured again on resize.

Values to change

NameFileDefaultWhat it changes
BRANDscript.jsTallyfoldThe name of the app at the top.
RIDEscript.js1How much scroll the whole section takes: 2 is twice as long.
SPREADscript.js1How far apart the cards are when they arrive.
TILTscript.js14How many degrees the cards are tilted when they arrive.
RISEscript.js14How many pixels the chosen plan rises.
ROLLscript.js1How long the prices take to roll: 2 is twice as slow.

Try them in the Playground

When to use it

For the pricing page of a software product, an app or a subscription service: whoever scrolls sees the plans line up, understands straight away which one is recommended and discovers the yearly saving without touching anything.

On phones

The same animation with adapted sizes: the board gets narrower, the cards move closer and everything scales down to fit the screen.

With reduced motion

The cards are already in a row, on the yearly price, with the middle plan highlighted, and everything simply fades in, with no movement.

Pitfalls

  • The switch pill is measured after document.fonts.ready: measured before, with the fallback font, it would end up under a shorter word.
  • Never once: true on a timeline with a ScrollTrigger: opening the page already scrolled down would freeze everything.
  • The price uses fixed-width columns and not tabular-nums: in Mona Sans the tabular digits have a slashed zero.

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 7.1 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

Tested on 27 October 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