
The liquid grid
Hover, Transitions
A card’s monthly spending limit, in a dark card: a bar with what is spent in green and a pale handle, the limit, to drag with its tag above. What is left recounts in large figures as the handle moves, with the spend per day until the new month. When the limit gets close to what is spent the card turns amber, “Close to limit”; when it drops under, the extra stretch turns red, the number says how far over you are, the bar shakes its head and new payments will be declined. Three ready limits to tap.
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>
<!--
"Spending limit" 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>Spending 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">
<!-- a card's monthly spending limit: the bar shows what is spent, the handle is the limit to drag; what is left
recounts, and when the limit goes under what is already spent the card turns to its warning state -->
<section class="sp" data-sp aria-label="Card spending limit">
<header class="sp__head">
<svg class="sp__card" viewBox="0 0 34 24" aria-hidden="true"><rect x="1" y="1" width="32" height="22" rx="5"></rect><path d="M1 8.500h32"></path><path class="sp__chipline" d="M6 16.500h7"></path></svg>
<div class="sp__what"><strong>Everyday card</strong><span>Ending in 4821</span></div>
<span class="sp__pill"><span class="sp__clip"><span data-outpill>On track</span></span></span>
</header>
<div class="sp__read">
<strong class="sp__big"><b data-outleft>$412</b><span class="sp__clip sp__clip--word"><span data-outword>left</span></span></strong>
<span class="sp__clip sp__clip--sub"><span data-outsub>$788 spent of $1,200</span></span>
</div>
<div class="sp__meter" data-meter>
<span class="sp__tag" data-tag aria-hidden="true"><b data-outtag>$1,200</b></span>
<div class="sp__bar" data-bar>
<i class="sp__room" data-room></i>
<i class="sp__spent" data-spent></i>
<i class="sp__over" data-over></i>
</div>
<span class="sp__handle" data-handle role="slider" tabindex="0" aria-label="Monthly spending limit" aria-valuemin="200" aria-valuemax="2000" aria-valuenow="1200" aria-valuetext="1,200 dollars"><i></i></span>
<div class="sp__scale" aria-hidden="true"><span>$0</span><span>$1k</span><span>$2k</span></div>
</div>
<div class="sp__presets" role="group" aria-label="Quick limits">
<button type="button" class="sp__preset" data-preset="800" aria-pressed="false">$800</button>
<button type="button" class="sp__preset" data-preset="1200" aria-pressed="true">$1,200</button>
<button type="button" class="sp__preset" data-preset="1600" aria-pressed="false">$1,600</button>
</div>
<p class="sp__foot"><span class="sp__clip"><span data-outfoot>About $34 a day until it resets</span></span><span class="sp__days">12 days</span></p>
</section>
<span class="live" aria-live="polite" data-live></span>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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>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.
28 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Spending limit” from Animorio and fit it into my siteWhat is spent and the limit. From the limit asked for comes the state: over if it is under what is spent, close if what is left is less than fifteen per cent, otherwise fine.
The drawn limit chases the one asked for; from it come the handle’s position, the tinted stretch, the red piece past the limit, the tag and the large number.
A class on the card changes one variable, `--tone`: pill, tinted stretch and the card’s small line read it and fade together.
Only on entering the “over” state the bar shakes once; the texts roll in the direction the limit moved.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #3ddc97 | The colour of all being well: what is spent, the chosen preset, the pill. |
SPENT | script.js | 788 | How many dollars have already been spent this month. |
LIMIT | script.js | 1200 | The spending limit at the start, in dollars (200 to 2000). |
NEAR | script.js | 15 | Under this percentage of the limit still free, the card warns you are close. |
DAYS | script.js | 12 | How many days are left until the new month: it gives the spend per day. |
LOOP | script.js | true | Left alone, the demo’s pointer lowers the limit to under what is spent and then raises it again. |
In the card controls of a banking or fintech app, in company cards with a cap per employee, in a teen account run by parents; the same pattern, a used share and a cap to move with a warning when they cross, carries phone data, cloud storage, a campaign budget or an API limit.
The card is at most 348 pixels wide and about 300 tall. The handle is grabbed on a 32 by 30 pixel area, with `touch-action: none`; you can also tap the bar at a point or use the three ready limits. The tag always stays inside the bar, at both ends too.
No glides, bounces or shake: handle, bar and numbers go straight to the limit asked for, the colours change without fading and the texts without rolling. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.9 KB; the libraries: GSAP 28 KB.
Tested on 3 December 2026
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.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.