Skip to content
animorio
IT
All components

Cashless wristband card

Cards, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 5.1 KBGSAP 28 KBFreeDownload the zip

The cashless wristband of a festival: a white card with the fabric band from pink to violet, stitched at the edges, and its contactless tag. Below, the balance in large type, how many drinks it is worth and three amounts to top up: at each top-up the contactless waves light one after the other, a sheen crosses the band and the balance counts to the new figure. A round at the bar takes it down.

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>
<!--
  "Cashless wristband 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>Festival cashless wristband card with the top-up that raises the balance</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 cashless wristband of a festival: the three amounts top it up; at each top-up the contactless waves
         on the wristband's tag light one after the other, the balance counts up and the line below says how many
         drinks it is worth; a round at the bar takes it down again -->
    <article class="wrist" data-wrist>
      <div class="band" aria-hidden="true">
        <span class="band__weave"></span>
        <span class="band__name">Solstice Fields</span>
        <span class="band__tag" data-plate>
          <svg viewBox="0 0 28 22"><path class="wave" data-wave d="M9.5 8.2a4 4 0 0 1 0 5.6"></path><path class="wave" data-wave d="M13 5.4a8 8 0 0 1 0 11.2"></path><path class="wave" data-wave d="M16.5 2.6a12 12 0 0 1 0 16.8"></path><rect class="chip" x="1.6" y="8.4" width="5" height="5.2" rx="1.4"></rect></svg>
        </span>
        <span class="band__sheen" data-sheen></span>
      </div>

      <div class="wrist__body">
        <p class="bal"><small>Wristband balance</small><strong><span data-cur>€</span><span data-bal>24.00</span></strong></p>
        <p class="worth"><span class="roll"><span data-worth>About 4 drinks</span></span></p>
        <div class="tops" role="group" aria-label="Top up" data-tops></div>
        <p class="last"><span class="roll"><span data-last>Tap an amount to top up</span></span></p>
      </div>
    </article>
    <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.

19 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 “Cashless wristband 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 centre, on white, a card with rounded corners. At the top the wristband: fabric from pink to violet with a tight weave, two dashed seams along the edges, the festival’s name and on the right the white tag with its chip and the three contactless waves. Below, the words “Wristband balance”, the balance in large type (€24.00), a line saying how many drinks it is worth (“About 4 drinks”), three buttons (+€10, +€20, +€50) and a small line with the last movement. Touching an amount the button lights in the wristband’s colour, the three waves light one after the other outwards, the tag bounces, a sheen crosses the band, the balance counts to the new figure and the lines below roll to the new text (“+€20.00 added just now”). When you pay, the waves light the other way and the balance goes down.

How it works

The band

The fabric is CSS only: a gradient from pink to violet, on top two crossed repeating-linear-gradients for the weave and two dashed borders (pseudo-elements) for the seams. The tag is a white box with an SVG: the chip and three arcs.

The waves

The three arcs go from grey to the colour and back, staggered by 0.1 seconds: from the inside out for a top-up, the other way for a payment (the same list, reversed). Together the tag makes an elastic bounce and a slanted sheen crosses the band.

The balance

The balance is a number that goes to the new figure in 0.7 seconds with power2.out, written with two decimals; from that number a function works out how many drinks it is worth, and the two text lines roll from below only if the text really changes.

Values to change

NameFileDefaultWhat it changes
STARTscript.js24The starting balance.
DRINKscript.js6What a drink costs: used to say how many the balance is worth.
SMALLscript.js10The small top-up.
MEDIUMscript.js20The medium top-up.
LARGEscript.js50The large top-up.
CURRENCYscript.js€The currency symbol.
ACCENTscript.js#e43d93The wristband’s first colour.
LOOPscript.jstrueLeft alone, a pointer tops up and then a round at the bar brings the balance back.

Try them in the Playground

When to use it

For the app or site of a festival, a concert, a fair or a holiday resort where you pay with the wristband: balance and top-up in one piece. It also suits a prepaid card, an arcade’s tokens, a canteen’s credit.

On phones

The same card, at most as wide as the screen minus the margins, with band and buttons measured on the height too; the amounts are touched with a finger.

With reduced motion

No waves, sheen or bounces: the balance and the lines below change in place.

Pitfalls

  • The balance counts with power2.out, never a spring: money that passes the figure and comes back looks like a mistake.
  • The balance is rounded to cents at every operation: adding decimals in JavaScript, after a few top-ups 53.99999 would show up.
  • Each button has its own label for screen readers (“Top up €20.00”) and a line says the new balance after every movement.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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