Skip to content
animorio
IT
All components

Plan usage card

Cards, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.5 KBGSAP 28 KBFreeDownload the zip

The usage card of a subscription, for an app’s settings: three bars (requests, storage, seats) fill on a spring while their numbers count up. Over a row, a paler striped bar shows where the month is heading and the number becomes the forecast. When the first bar passes the mark of the limit it turns amber, the mark takes the knock and a line opens below with the warning and the ‘Upgrade’ button.

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>
<!--
  "Plan usage 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>Plan usage card with bars that fill and a warning near the limit</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 usage card of a plan: three bars fill on a spring while their numbers count up; over a row a paler bar
         shows where the month is heading; when the first bar passes the mark of the limit it turns amber, the mark
         takes the knock and a line opens below with the way out -->
    <section class="card" data-card aria-label="Plan usage">
      <header class="head">
        <h2>Usage</h2>
        <span class="head__plan">Pro plan</span>
        <span class="head__reset">Resets in 12 days</span>
      </header>

      <div class="meter" data-meter data-used="84200" data-max="100000" data-pace="118" data-unit="">
        <div class="meter__top">
          <span class="meter__name">API requests</span>
          <span class="meter__val"><span class="meter__now"><b data-n>0</b> of 100,000</span><span class="meter__pace" data-pace-text>On pace for 118%</span></span>
        </div>
        <div class="meter__track"><i class="meter__proj" data-proj></i><i class="meter__fill" data-fill></i><i class="meter__mark" data-mark></i></div>
      </div>

      <div class="meter" data-meter data-used="31.4" data-max="50" data-pace="81" data-unit=" GB">
        <div class="meter__top">
          <span class="meter__name">Storage</span>
          <span class="meter__val"><span class="meter__now"><b data-n>0</b> of 50 GB</span><span class="meter__pace" data-pace-text>On pace for 81%</span></span>
        </div>
        <div class="meter__track"><i class="meter__proj" data-proj></i><i class="meter__fill" data-fill></i><i class="meter__mark" data-mark></i></div>
      </div>

      <div class="meter" data-meter data-used="7" data-max="10" data-pace="70" data-unit="">
        <div class="meter__top">
          <span class="meter__name">Seats</span>
          <span class="meter__val"><span class="meter__now"><b data-n>0</b> of 10</span><span class="meter__pace" data-pace-text>3 seats free</span></span>
        </div>
        <div class="meter__track"><i class="meter__proj" data-proj></i><i class="meter__fill" data-fill></i><i class="meter__mark" data-mark></i></div>
      </div>

      <div class="warn" data-warn>
        <div class="warn__in">
          <svg class="warn__icon" viewBox="0 0 18 18" aria-hidden="true"><path d="M9 2.6 16 15H2Z"></path><path d="M9 7.4v3.4M9 12.9v.2"></path></svg>
          <span class="warn__text">Near the request limit</span>
          <button class="warn__go" type="button" data-go>Upgrade</button>
        </div>
      </div>
    </section>
    <p class="sr" data-live aria-live="polite"></p>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
  </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.

29 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 “Plan usage 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

In the middle, on white, a card with round corners and a soft shadow. At the top ‘Usage’, the ‘Pro plan’ tag and on the right ‘Resets in 12 days’. Below, three rows: ‘API requests’, ‘Storage’ and ‘Seats’, each with its number on the right and a thin bar with a vertical mark at 90%. On opening the three blue bars fill one after the other, slightly overshoot and come back, while the numbers count up: 84,200 of 100,000, 31.4 of 50 GB, 7 of 10. Then a pointer moves onto the storage row: the row takes a pale background, the bar grows a hair taller, a paler bar with slanted stripes stretches past the full one to where the month is heading, and the number gives way to ‘On pace for 81%’. It moves to the requests row: ‘On pace for 118%’, and the striped bar reaches the end. The pointer leaves and the requests keep climbing, in three pushes: at the last one the bar passes the mark, turns amber with its number, the mark stretches and takes a sideways knock, and under the rows the card opens with a small bounce on an amber line: the triangle, ‘Near the request limit’ and the dark ‘Upgrade’ button arriving last. After a few seconds the bars empty and the round starts again. With a real hand the card stays at its highest point, with the warning open, and each row shows its forecast on hover or touch.

How it works

One number per bar

Each row is an object with the used value, the maximum and the forecast, read from the HTML’s data attributes. GSAP animates a single number, the value: one function turns it into the bar’s width and the text, with thousands separators or one decimal.

The fill on a spring

The bars fill with back.out, 0.14 seconds apart: they overshoot and come back. The limit only counts once they have settled, otherwise the first one’s bounce would trip the warning.

The forecast on hover

Under the full bar sits a striped one (repeating-linear-gradient): on hover it starts from the current width and reaches the forecast. The number and the ‘On pace for’ text share one grid cell and swap with opacity and six pixels of movement.

Past the mark

When the value passes LIMIT the row takes the is-near class, which changes one CSS variable: bar, number and mark turn amber with their transitions. The mark stretches and comes back with elastic.out.

The warning that opens the card

The warning is a container of zero height: GSAP takes the height to auto with back.out, so the card grows with a small bounce, and the button arrives later, from 0.7 to 1.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#4a5cffThe colour of the bars.
WARNscript.js#f08c00The colour near the limit.
LIMITscript.js90The percentage where the limit mark sits.
PEAKscript.js93How high the first bar climbs, in percent: below the mark, the warning never opens.
FILLscript.js1.1How many seconds a bar takes to fill.
BOUNCEscript.js1.6How far the bar overshoots and comes back: 0 = no bounce.
LOOPscript.jstrueLeft alone, the card tells itself again.

Try them in the Playground

When to use it

For the plan or billing page in an app’s settings, or a corner of the dashboard: how much has been used, where the month will end up and what to do when the limit is near.

On phones

The same component: the card takes the screen width minus the margins and the gaps between rows also follow the window’s height. Tapping a row shows its forecast; tapping it again brings the number back.

With reduced motion

No fills and no springs: the card fades in already at its highest point, with the warning open. The forecast fades in and out.

Pitfalls

  • With back.out the fill goes past its final value: a bar at 84% touches 90% for a moment and trips the warning. The limit is checked only once the bars are still.
  • The full bar has its width written by the function that shows the value, and GSAP’s vertical scale on hover: two different properties, so they do not clash.
  • The warning’s height goes to auto, not to a number of pixels: on a narrow screen the text is cut with an ellipsis and the height stays right.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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