
The elastic button
Buttons, Hover, Text
The card a shop uses to answer a card payment dispute (chargeback): three pieces of evidence to add, each with its plus turning into a tick and the file name rolling in place of the hint. With every piece a bar fills and the case goes from “Weak case” to “Strong case”, from amber to green. “Submit evidence” sends it to the bank: the days bar fills with blue and the state becomes “Under review”.
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>
<!--
"Payment dispute 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>Payment dispute card</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 merchant answers a card dispute (chargeback): each piece of evidence added makes the case stronger,
the meter says how strong, and submitting sends it to the bank for review -->
<section class="dp" data-dp aria-labelledby="dp-title">
<header class="dp__head">
<span class="dp__ico" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M12 3.500 5 6v5.500c0 4.200 2.800 7.500 7 9 4.200-1.500 7-4.800 7-9V6Z"></path><path d="M12 8.500v4.500M12 16v.200"></path></svg></span>
<span class="dp__name"><b id="dp-title">Payment disputed</b><span>Not received, Visa 4417</span></span>
<b class="dp__sum">€184.00</b>
</header>
<p class="dp__due"><span class="dp__dueroll"><span data-due>Respond within 6 days</span></span><i class="dp__clock" aria-hidden="true"><i data-clock></i></i></p>
<ul class="dp__list">
<li class="dp__row" data-row data-file="UPS_1Z44A7.pdf">
<span class="dp__what"><b>Tracking number</b><span class="dp__sub"><span data-sub>Carrier and tracking code</span></span></span>
<button class="dp__add" type="button" data-add aria-label="Add tracking number"><svg viewBox="0 0 16 16" aria-hidden="true"><path class="pl" d="M4 8h8M8 4v8"></path><path class="ck" pathLength="1" d="m3.500 8.300 3 3 6-6.600"></path></svg></button>
</li>
<li class="dp__row" data-row data-file="signature_03Nov.jpg">
<span class="dp__what"><b>Delivery proof</b><span class="dp__sub"><span data-sub>Signature or photo at the door</span></span></span>
<button class="dp__add" type="button" data-add aria-label="Add delivery proof"><svg viewBox="0 0 16 16" aria-hidden="true"><path class="pl" d="M4 8h8M8 4v8"></path><path class="ck" pathLength="1" d="m3.500 8.300 3 3 6-6.600"></path></svg></button>
</li>
<li class="dp__row" data-row data-file="thread_with_customer.eml">
<span class="dp__what"><b>Customer emails</b><span class="dp__sub"><span data-sub>Messages about the order</span></span></span>
<button class="dp__add" type="button" data-add aria-label="Add customer emails"><svg viewBox="0 0 16 16" aria-hidden="true"><path class="pl" d="M4 8h8M8 4v8"></path><path class="ck" pathLength="1" d="m3.500 8.300 3 3 6-6.600"></path></svg></button>
</li>
</ul>
<div class="dp__meter">
<span class="dp__bars" aria-hidden="true"><i data-bar></i><i data-bar></i><i data-bar></i></span>
<span class="dp__case" aria-live="polite"><span data-case>No evidence yet</span></span>
</div>
<button class="dp__go" type="button" data-go disabled><span class="dp__gotext"><span data-golabel>Submit evidence</span></span></button>
</section>
<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.
25 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 “Payment dispute card” from Animorio and fit it into my siteEach row knows whether its piece of evidence is in. A function counts them and writes that number in an attribute of the card: from there CSS picks the colour (a single variable, --tone) and the script fills the bars and rolls the word.
The plus and the tick are in the same svg. A class on the row turns and shrinks the plus and draws the tick, a path with pathLength 1, with a CSS transition; GSAP only gives the key its bounce.
Each bar has a fill that scales in x with a CSS variable from 0 to 1, animated by GSAP in FILL seconds.
The deadline bar is DAYS out of 20 wide; sending the response fills it whole and changes its colour, because there is nothing left to wait for on this side.
The same button sends and reopens: once the response is sent the evidence keys are disabled until “Edit response” is pressed.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #3b5bfd | The colour of the dispute sent for review. |
WEAK | script.js | #d9790b | The colour of the alert, of the deadline and of the weak case. |
STRONG | script.js | #1f9d62 | The colour of the added evidence and of the strong case. |
DAYS | script.js | 6 | How many days are left to respond, out of 20. |
FILL | script.js | 0.5 | How long a strength bar takes to fill. |
SPRING | script.js | 1 | How much the buttons bounce: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer adds the three pieces of evidence and sends the response. |
In the payments panel of an online shop, a marketplace or a subscription service: when a customer disputes a charge with their bank and the seller has a few days to answer with evidence.
The same card, as wide as the screen minus the margins: the rows are 44 pixels tall with 30-pixel keys, long hints and file names are cut with an ellipsis, and the deadline text never wraps.
No bounces and no rolling words: the tick appears, the file name replaces the hint in one step, the bars fill at once and the time bar changes without sliding. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.9 KB; the libraries: GSAP 28 KB.
Tested on 24 November 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.