Skip to content
animorio
IT
All components

Banking app tabs

Tabs, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 10 KBGSAP 28 KBFreeDownload the zip

The money card of a made-up bank, Fernhold, dark on black like a Dribbble shot: on top three tabs, Spending, Saving and Investing. Choosing one, the cream pill runs on two springs, its leading edge leaving first and the trailing one catching up, and the label turns dark exactly where the pill covers it, even halfway through a letter. Below, the balance rolls digit by digit with the comma standing still, the euro sign dips and settles, the chart line redraws itself as a wave starting from the side the pill comes from and the price line follows a beat later. Dragging across the chart reads any day.

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>
<!--
  "Banking app tabs" 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>The banking app tabs with the chart wave and the label that inverts under the pill</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 money card of a made-up bank: Spending / Saving / Investing tabs. The cream pill runs between the tabs
         on two springs (the leading edge first), the label turns dark exactly where the pill covers it, the balance
         rolls digit by digit, the euro sign dips and settles and the chart line morphs as a wave that starts from the
         side the pill came from. Drag across the chart to read any day -->
    <section class="card" data-card aria-label="Fernhold money overview">
      <span class="card__grain" aria-hidden="true"></span>
      <span class="card__rim" aria-hidden="true"></span>

      <header class="head">
        <span class="brand">
          <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M4 16V9.2a6 6 0 0 1 12 0V16"></path><path d="M7.4 16v-5.6a2.6 2.6 0 0 1 5.2 0V16"></path></svg>
          <span class="brand__name">Fernhold</span>
        </span>
        <span class="head__acct">Main account · EUR</span>
      </header>

      <div class="tabs" role="tablist" aria-label="Money view" data-tabs>
        <span class="tabs__hover" data-hover aria-hidden="true"></span>
        <span class="pill" data-pill aria-hidden="true"><span class="pill__in" data-pillin><span class="pill__shine"></span></span></span>
        <button class="tab" type="button" role="tab" id="t-0" aria-selected="true" aria-controls="panel" tabindex="0" data-tab="0">Spending</button>
        <button class="tab" type="button" role="tab" id="t-1" aria-selected="false" aria-controls="panel" tabindex="-1" data-tab="1">Saving</button>
        <button class="tab" type="button" role="tab" id="t-2" aria-selected="false" aria-controls="panel" tabindex="-1" data-tab="2">Investing</button>
        <span class="tabs__ink" data-ink aria-hidden="true">
          <span class="ink" data-inkfor="0">Spending</span><span class="ink" data-inkfor="1">Saving</span><span class="ink" data-inkfor="2">Investing</span>
        </span>
      </div>

      <div class="panel" id="panel" role="tabpanel" aria-labelledby="t-0" data-panel>
        <div class="stat">
          <p class="stat__label" data-swap="label"><span class="sw">Spent this month</span></p>
          <div class="stat__row">
            <p class="amount" aria-live="polite"><span class="sr" data-sr>€1,284.50</span><span class="amount__cur" data-cur aria-hidden="true">€</span><span class="amount__digits" data-digits aria-hidden="true"></span></p>
            <span class="chip" data-chip>
              <svg class="chip__arrow" data-arrow viewBox="0 0 12 12" aria-hidden="true"><path d="M6 9.4V2.8M3 5.6 6 2.6l3 3"></path></svg>
              <span class="chip__txt" data-swap="delta"><span class="sw">6.2%</span></span>
            </span>
          </div>
          <p class="stat__note" data-swap="note"><span class="sw">less than October</span></p>
        </div>

        <div class="chart" data-chart>
          <svg class="chart__svg" data-svg aria-hidden="true">
            <defs>
              <linearGradient id="fh-area" x1="0" y1="0" x2="0" y2="1">
                <stop offset="0" stop-color="var(--accento)" stop-opacity="0.26"></stop>
                <stop offset="0.7" stop-color="var(--accento)" stop-opacity="0.04"></stop>
                <stop offset="1" stop-color="var(--accento)" stop-opacity="0"></stop>
              </linearGradient>
              <linearGradient id="fh-line" x1="0" y1="0" x2="1" y2="0">
                <stop offset="0" stop-color="var(--accento)" stop-opacity="0.35"></stop>
                <stop offset="0.35" stop-color="var(--accento)" stop-opacity="1"></stop>
                <stop offset="1" stop-color="var(--accento)" stop-opacity="1"></stop>
              </linearGradient>
            </defs>
            <g class="chart__grid" data-grid></g>
            <path class="chart__area" data-area fill="url(#fh-area)"></path>
            <path class="chart__line" data-line stroke="url(#fh-line)"></path>
            <line class="chart__level" data-level></line>
            <line class="chart__scrub" data-scrub></line>
          </svg>
          <span class="tag" data-tag aria-hidden="true"><span class="tag__txt" data-tagtxt>€1.3k</span></span>
        </div>
        <div class="axis" aria-hidden="true"><span>Nov 1</span><span>Nov 8</span><span>Today</span></div>

        <div class="foot">
          <div class="foot__row">
            <span class="foot__k" data-swap="fk"><span class="sw">Monthly budget</span></span>
            <span class="foot__v" data-swap="fv"><span class="sw">€1,284 of €1,900</span></span>
          </div>
          <span class="foot__track" aria-hidden="true"><span class="foot__fill" data-fill></span></span>
        </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.

37 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 “Banking app tabs” 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 black ground sits Fernhold's dark card, with a one-pixel rim catching light on top and a fine grain: the brand, the account, then the recessed track with the three tabs Spending, Saving and Investing and the cream pill under the chosen one. Below, the label, the big balance with a small euro in front and the decimals in grey, the mint chip with the arrow and the change, the chart of the first sixteen days of November with its faded area, the dashed price line and the tag on the right, and at the bottom the budget or goal line with its thin bar. Choosing a tab, the pill stretches towards it, the leading edge arrives first and goes one pixel too far, the trailing edge catches up, the pill dips slightly while stretched, a highlight crosses it, and the dark label shows only inside the pill. The balance rolls from the units to the thousands and the digits it no longer needs close up, the euro takes a small dive, the lines rise squeezed and widen, the chip's arrow turns if the figure went down, the bar at the bottom grows or shrinks, the line redraws point by point like a wave while the area breathes, then the price line and the tag catch up on a spring. Hovering or dragging across the chart, a thin hairline stops on the day and the balance rolls to that day's figure; letting go, it goes back to today. Pressed, the pill squashes and springs back; from the keyboard the arrows change tab.

How it works

The pill on two springs

The pill's two edges are two damped springs integrated on every frame of the GSAP ticker, in steps of a two-hundred-and-fortieth of a second. The edge facing the direction of travel has the stiff spring, the other the soft one: so the pill stretches, then shortens, and a damping of 0.8 leaves one pixel too far. The more it stretches, the lower the pill gets.

The label that inverts

Over the tabs sits a second row of the same labels, dark, with the same size and spacing. It has an inset clip-path recomputed on every frame from the pill's two edges: it only shows inside the pill, so the colour changes exactly where the edge passes, even in the middle of a letter.

The nine-slot balance

The balance is made of nine slots aligned from the right, so the point and the comma always stay in place: each digit is a column from 0 to 9 moved with yPercent, with a delay starting from the right side, and the slots it does not need shrink to zero.

The chart wave

Each view has sixteen days normalised between zero and one; each point has its own tween with a 32-millisecond delay from the side the pill comes from, and the ticker redraws a monotone curve (Fritsch-Carlson) that invents no bumps. The price line and the tag come after, on an elastic.out.

Values to change

NameFileDefaultWhat it changes
LEADscript.js420The stiffness of the spring on the pill edge that leaves first.
TRAILscript.js190The stiffness of the trailing edge: lower, and the pill stretches more.
DAMPscript.js0.8The damping of the two springs: 1 no bounce, 0.6 plenty.
WAVEscript.js0.032The seconds between one point and the next in the chart wave.
MORPHscript.js0.95The seconds each chart point takes to arrive.
ROLLscript.js0.72The seconds the balance digits roll for.
HOLDscript.js2.8The seconds the autopilot stays on each tab.
--pillolastyle.css#efe9dcThe cream colour of the pill.
--accentostyle.css#8fe3b4The mint green of the line, the chip and the bar.

Try them in the Playground

When to use it

In the app or site of a bank, a savings or investing app, a personal finance dashboard: to move between spending, savings and investments without losing your place, with a chart you can read day by day.

On phones

The card narrows to the screen width, the tabs lose a few pixels of padding and the chart gets shorter with the height; the finger picks tabs like the mouse and, dragged across the chart, reads the days.

With reduced motion

The pill jumps straight to the chosen tab without stretching, the digits and lines change with a fade, the chart fades out and back in already redrawn, no euro dive or highlight; the autopilot does not drag across the chart.

Pitfalls

  • The tag follows the price line on every frame through a hand-written transform, which wiped out GSAP's bounce on the tag: the scale goes on the child, the position on the parent.
  • With tabular figures Mona Sans draws a slashed zero: plain figures in slots as wide as the zero keep the columns still without the slash.
  • The second row of labels must have the same size, weight and spacing as the tabs: with a different weight the letters widen and the colour change no longer falls on the pill's edge.
  • With reduced motion the chart changes with a fade: the tag's text must be changed there too, or it kept the previous tab's figure.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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