Skip to content
animorio
IT
All components

Payment dispute card

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

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”.

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>
<!--
  "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>

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.

25 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Payment dispute 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

On white, a card: an amber shield with an exclamation mark, “Payment disputed”, “Not received, Visa 4417” and on the right “€184.00”. Below, a grey band: “Respond within 6 days” and a small amber bar saying how much time is left. Three rows: “Tracking number”, “Delivery proof”, “Customer emails”, each with a grey hint and a key with a plus on the right. At the bottom three empty bars, “No evidence yet”, and a grey button that is off. Press the first plus and the sign closes turning and a green tick draws in its place, the key bounces, the hint rolls away and the file name arrives in a code typeface, “UPS_1Z44A7.pdf”; the first bar fills with amber, “Weak case”, and the button lights up black. With the second piece the bars shift towards green, “Fair case”; with the third they are all green, “Strong case”. A second touch on a piece removes it. “Submit evidence”: the shield turns blue, the time bar fills with blue, the band says “Under review, bank decides by 9 Dec”, the keys lock and the button becomes “Edit response”, outlined.

How it works

Strength is a count

Each 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.

From plus to tick

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.

The bars

Each bar has a fill that scales in x with a CSS variable from 0 to 1, animated by GSAP in FILL seconds.

The time left

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.

Sending and reopening

The same button sends and reopens: once the response is sent the evidence keys are disabled until “Edit response” is pressed.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#3b5bfdThe colour of the dispute sent for review.
WEAKscript.js#d9790bThe colour of the alert, of the deadline and of the weak case.
STRONGscript.js#1f9d62The colour of the added evidence and of the strong case.
DAYSscript.js6How many days are left to respond, out of 20.
FILLscript.js0.5How long a strength bar takes to fill.
SPRINGscript.js1How much the buttons bounce: 0.3 = a little, 2 = a lot.
LOOPscript.jstrueLeft alone, the demo’s pointer adds the three pieces of evidence and sends the response.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • Shop, amount, files and dates are made up and nothing is sent: in a real system the evidence is uploaded files, and the strength of the case depends on the dispute’s reason, not only on how many pieces there are.
  • Strength is not told by colour alone: next to the bars there is always the word (Weak, Fair, Strong case).
  • The bars are rectangles that fill, not status lights.
  • The plus and the tick turn and draw with CSS inside the svg, while GSAP scales the button: two different elements, so the two transforms do not cancel each other.
  • A tick with pathLength 1 and round caps leaves a dot when it is fully hidden: until it is needed it has zero opacity.
  • In the demo, after “Under review”, everything starts over by itself: only so it can be watched again; whoever uses it finds “Edit response”.

Libraries

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.

Testing

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