Skip to content
animorio
IT
Back to the library

Savings year in review

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

Scroll inside the preview

A scroll animation in the premium style of product pieces: the yearly recap of a made-up savings app, Pennant, on a white card and a warm white page. Scrolling down the months go by from January to December: the piggy bank is a cobalt area chart that fills month by month, the month rolls on a dark pill, the total counts up and a tag says how much came in that month. Three dashed lines are the goals: when the savings touch one, the line turns solid and its badge below unlocks, with the ring closing, the padlock opening and dropping, the coin flipping to its blue face, a glint of light and six thin rays. In December the auto-save switch becomes ‘Year complete’.

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>
<!--
  "Savings year in review" 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>Pennant savings recap</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 yearly recap of a made-up savings app, Pennant, on a light card. The stage sticks while you scroll and the
       scroll is the year: month by month the jar of savings, an area chart, fills up to three goal lines, the month
       rolls on a pill, and each goal the savings reach unlocks its badge below: the ring closes, the padlock opens and
       the coin flips to its bright face. -->
  <main>
    <section class="year" data-year>
      <div class="stage" data-stage>
        <div class="halo" data-halo aria-hidden="true"></div>
        <div class="grain" aria-hidden="true"></div>

        <div class="frame" data-frame>
          <article class="card" data-card>
            <span class="card__glow" aria-hidden="true"></span>
            <span class="card__sweep" data-sweep aria-hidden="true"></span>

            <header class="head">
              <span class="head__mark" aria-hidden="true">
                <svg viewBox="0 0 16 16"><path d="M4 3.5v9"/><path d="M4 3.8h7.2l-1.8 2.6 1.8 2.6H4"/></svg>
              </span>
              <div class="head__text">
                <p class="head__title">Pennant</p>
                <p class="muted">Savings recap &middot; 2026</p>
              </div>
              <span class="chip" data-chip>
                <span class="chip__sw" data-chip-sw aria-hidden="true"><span class="chip__knob"></span></span>
                <span class="chip__words" data-chip-words>Auto-save on</span>
              </span>
            </header>

            <div class="total">
              <p class="total__label muted">Saved this year</p>
              <div class="total__row">
                <p class="total__num" data-total>&euro;0</p>
                <span class="delta" data-delta-box><span class="delta__words" data-delta>+&euro;0 in Jan</span></span>
              </div>
            </div>

            <div class="chart">
              <div class="plot" data-plot>
                <span class="cols" aria-hidden="true">
                  <i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i>
                </span>
                <span class="base" data-base></span>
                <span class="gl" data-gl="1000"><span class="gl__hit" data-gl-hit></span><em>&euro;1k</em></span>
                <span class="gl" data-gl="2500"><span class="gl__hit" data-gl-hit></span><em>&euro;2.5k</em></span>
                <span class="gl" data-gl="4000"><span class="gl__hit" data-gl-hit></span><em>&euro;4k</em></span>

                <svg class="plot__svg" viewBox="0 0 400 160" preserveAspectRatio="none" aria-hidden="true">
                  <defs>
                    <linearGradient id="fill" x1="0" y1="0" x2="0" y2="1">
                      <stop offset="0" stop-color="var(--accent)" stop-opacity="0.34"/>
                      <stop offset="0.7" stop-color="var(--accent)" stop-opacity="0.08"/>
                      <stop offset="1" stop-color="var(--accent)" stop-opacity="0.02"/>
                    </linearGradient>
                  </defs>
                  <path class="area" data-area d=""/>
                  <path class="ln" data-ln d=""/>
                </svg>

                <span class="cursor" data-cursor aria-hidden="true">
                  <span class="cursor__line"></span>
                  <span class="cursor__pt" data-pt></span>
                  <span class="pill" data-pill><span class="pill__win"><span class="pill__strip" data-months><b>Jan</b><b>Feb</b><b>Mar</b><b>Apr</b><b>May</b><b>Jun</b><b>Jul</b><b>Aug</b><b>Sep</b><b>Oct</b><b>Nov</b><b>Dec</b></span></span></span>
                </span>
              </div>
              <div class="axis muted" aria-hidden="true"><span>Jan</span><span>Apr</span><span>Jul</span><span>Oct</span><span>Dec</span></div>
            </div>

            <ul class="badges">
              <li class="badge" data-badge="1000" data-name="Rainy day">
                <button class="badge__tilt" type="button" data-tilt aria-label="Rainy day goal, 1,000 euros">
                  <svg class="ring" viewBox="0 0 64 64" aria-hidden="true"><circle class="ring__track" cx="32" cy="32" r="29"/><circle class="ring__fill" data-ring cx="32" cy="32" r="29" pathLength="1"/></svg>
                  <span class="coin" data-coin>
                    <span class="coin__face coin__face--off" aria-hidden="true">
                      <svg viewBox="0 0 24 24"><path d="M3.5 12.5a8.5 8.5 0 0 1 17 0Z"/><path d="M12 4v.6"/><path d="M12 12.5v5.2a1.8 1.8 0 0 1-3.6 0"/></svg>
                    </span>
                    <span class="coin__face coin__face--on" aria-hidden="true">
                      <span class="coin__shine" data-shine></span>
                      <svg viewBox="0 0 24 24"><path d="M3.5 12.5a8.5 8.5 0 0 1 17 0Z"/><path d="M12 4v.6"/><path d="M12 12.5v5.2a1.8 1.8 0 0 1-3.6 0"/></svg>
                    </span>
                  </span>
                  <span class="lock" data-lock aria-hidden="true">
                    <svg viewBox="0 0 16 16"><path class="lock__shackle" data-shackle d="M5.3 7.4V5.6a2.7 2.7 0 0 1 5.4 0v1.8"/><rect x="3.8" y="7.2" width="8.4" height="6.2" rx="1.6"/></svg>
                  </span>
                  <span class="rays" data-rays aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i></span>
                </button>
                <p class="badge__name">Rainy day</p>
                <p class="badge__state muted"><span data-state>&euro;1,000</span></p>
              </li>
              <li class="badge" data-badge="2500" data-name="Weekend away">
                <button class="badge__tilt" type="button" data-tilt aria-label="Weekend away goal, 2,500 euros">
                  <svg class="ring" viewBox="0 0 64 64" aria-hidden="true"><circle class="ring__track" cx="32" cy="32" r="29"/><circle class="ring__fill" data-ring cx="32" cy="32" r="29" pathLength="1"/></svg>
                  <span class="coin" data-coin>
                    <span class="coin__face coin__face--off" aria-hidden="true">
                      <svg viewBox="0 0 24 24"><rect x="4" y="8" width="16" height="11" rx="2.4"/><path d="M9.2 8V6.2a1.2 1.2 0 0 1 1.2-1.2h3.2a1.2 1.2 0 0 1 1.2 1.2V8"/><path d="M8.4 8v11M15.6 8v11"/></svg>
                    </span>
                    <span class="coin__face coin__face--on" aria-hidden="true">
                      <span class="coin__shine" data-shine></span>
                      <svg viewBox="0 0 24 24"><rect x="4" y="8" width="16" height="11" rx="2.4"/><path d="M9.2 8V6.2a1.2 1.2 0 0 1 1.2-1.2h3.2a1.2 1.2 0 0 1 1.2 1.2V8"/><path d="M8.4 8v11M15.6 8v11"/></svg>
                    </span>
                  </span>
                  <span class="lock" data-lock aria-hidden="true">
                    <svg viewBox="0 0 16 16"><path class="lock__shackle" data-shackle d="M5.3 7.4V5.6a2.7 2.7 0 0 1 5.4 0v1.8"/><rect x="3.8" y="7.2" width="8.4" height="6.2" rx="1.6"/></svg>
                  </span>
                  <span class="rays" data-rays aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i></span>
                </button>
                <p class="badge__name">Weekend away</p>
                <p class="badge__state muted"><span data-state>&euro;2,500</span></p>
              </li>
              <li class="badge" data-badge="4000" data-name="New bike">
                <button class="badge__tilt" type="button" data-tilt aria-label="New bike goal, 4,000 euros">
                  <svg class="ring" viewBox="0 0 64 64" aria-hidden="true"><circle class="ring__track" cx="32" cy="32" r="29"/><circle class="ring__fill" data-ring cx="32" cy="32" r="29" pathLength="1"/></svg>
                  <span class="coin" data-coin>
                    <span class="coin__face coin__face--off" aria-hidden="true">
                      <svg viewBox="0 0 24 24"><circle cx="6.2" cy="15.6" r="3.6"/><circle cx="17.8" cy="15.6" r="3.6"/><path d="M6.2 15.6l3.6-6.4h5.6l2.4 6.4"/><path d="M9.8 9.2l2.8 6.4H6.2"/><path d="M12.6 15.6l2.8-6.4"/><path d="M8.6 7.2h2.6M14.6 6.6h2.2"/></svg>
                    </span>
                    <span class="coin__face coin__face--on" aria-hidden="true">
                      <span class="coin__shine" data-shine></span>
                      <svg viewBox="0 0 24 24"><circle cx="6.2" cy="15.6" r="3.6"/><circle cx="17.8" cy="15.6" r="3.6"/><path d="M6.2 15.6l3.6-6.4h5.6l2.4 6.4"/><path d="M9.8 9.2l2.8 6.4H6.2"/><path d="M12.6 15.6l2.8-6.4"/><path d="M8.6 7.2h2.6M14.6 6.6h2.2"/></svg>
                    </span>
                  </span>
                  <span class="lock" data-lock aria-hidden="true">
                    <svg viewBox="0 0 16 16"><path class="lock__shackle" data-shackle d="M5.3 7.4V5.6a2.7 2.7 0 0 1 5.4 0v1.8"/><rect x="3.8" y="7.2" width="8.4" height="6.2" rx="1.6"/></svg>
                  </span>
                  <span class="rays" data-rays aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i></span>
                </button>
                <p class="badge__name">New bike</p>
                <p class="badge__state muted"><span data-state>&euro;4,000</span></p>
              </li>
            </ul>
          </article>
        </div>
      </div>
    </section>
    <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="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.

47 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 “Savings year in review” 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 page, with a soft cobalt halo underneath and a light grain, a white card rises with layered shadows. At the top the Pennant mark, a small blue square with a drawn pennant, ‘Savings recap · 2026’ and a tag with a small switch turned on, ‘Auto-save on’; under it, ‘Saved this year’ with the total in large type and next to it a blue tag that says how much came in that month. On arrival the baseline and the three dashed goal lines draw one after the other and the three grey coins of the badges settle in on a spring. Scrolling down the months go by: the blue line of the savings moves on over the barely visible month columns and a soft area fills underneath, like a piggy bank filling up; the thin cursor walks with its point on the curve and the month sits on a dark pill that rolls from Jan to Dec and lands a hair past the mark, while the months of the axis step aside as it passes. The total counts and the month tag changes with a small blur. Meanwhile the thin ring around each badge slowly closes as its goal gets near. When the savings touch 1,000, 2,500 and 4,000 euros, a solid blue stroke runs along that line from the left and the figure on the right lights up; below, the badge unlocks: the shackle of the padlock lifts, the padlock drops and fades, the coin narrows edge-on like a spinning coin and comes back wide on its blue face with a white icon (the umbrella of Rainy day, the suitcase of Weekend away, the bicycle of New bike), with a bounce, a blade of light crossing it and six thin rays snapping out and vanishing; the words below become ‘Unlocked’. In December the top tag becomes ‘Year complete’ on an elastic and a band of light crosses the card. Scrolling back the badges lock again one after the other. With the mouse the badges lean towards the pointer; pressed they give and spring back: the unlocked ones catch a glint of light, the locked ones shake their padlock.

How it works

The month of the year

The scroll drives a single GSAP timeline with ScrollTrigger and scrub: it carries a number from 0 to 12, the months from January to December. The stage is sticky and 100lvh tall, Lenis smooths the scroll and hands every step to ScrollTrigger.update.

A curve that never goes down

The month-end savings are twelve points: between them the curve is a monotone cubic Hermite (the tangents are the harmonic mean of the two slopes), so between two months the piggy bank never seems to lose money. The line and the area are two SVG paths rebuilt on every update up to the current month, one point every tenth of a month.

Goals found once

At the start each goal looks for the month, even halfway, where the curve reaches it; the scroll only decides whether it is there. The ring around the badge is a circle with pathLength 1: its stroke-dashoffset is what is still missing, read on every step.

The flipping coin

The unlock is a small timeline: the shackle lifts, the padlock drops and fades, the coin goes to scaleX 0 as if seen edge-on, halfway the class that lights the blue face is switched and it comes back to 1 with back.out; a blade of light crosses it and six rays fly out in a burst with two keyframes. Backwards the same coin flips back to grey and the padlock returns on a spring.

The rolling month

The pill is a window on a strip of the twelve months: when the month changes GSAP carries the index to the new one with back.out and the strip moves 1.25em per month. Near the edges the pill slides inwards so it never leaves the chart.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the twelve months take: 2 is twice as long.
ROLLscript.js0.45The seconds the month on the pill takes to roll.
FLIPscript.js0.5The seconds the coin of a badge takes to flip when it unlocks.
POPscript.js2.4How far a badge passes its size before it settles: 0 none.
TILTscript.js14The degrees a badge leans towards the pointer.
GLOWscript.js1How strong the blue halo under the card is.

Try them in the Playground

When to use it

For the landing page of a savings app, an online bank, a savings account or a personal finance app: the section that tells, as you scroll, how a piggy bank fills up over a year and how the goals get reached; also for the year-end recap inside an app.

On phones

The same animation with adapted sizes: the total, the chart and the badges are sized on the height too and the whole card fits in the box; under 340 pixels the switch loses its words. The lean towards the pointer is for the mouse only, a tap does the press.

With reduced motion

No long scroll and no movement: the card fades in with the year already full, the three lines solid and the three badges already unlocked; the top tag says ‘Year complete’.

Pitfalls

  • With a plain curve (Catmull-Rom) between two lean months and a rich one the line dips for a moment below the month before: with a piggy bank it looks like losing money. The monotone Hermite never dips.
  • The coin is flipped by GSAP with scaleX, so the two faces have no transform in the CSS: only a class changes halfway, when the coin is edge-on and the swap cannot be seen.
  • The hover lean uses quickTo on the button's rotationX and rotationY, the press its scale: they are different parts of the same GSAP transform and do not cancel each other.

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

Testing

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