Skip to content
animorio
IT
All components

Redeem points button

Buttons, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 10 KBGSAP 28 KBFreeDownload the zip

The Redeem reward button of a coffee shop’s loyalty app, in satin black with a champagne hairline in a dark room, like a Dribbble shot. On the left a coin of circular brushed metal with an engraved cup: its reflection, two bright lobes and two dark ones like on a watch dial, turns towards the pointer, and an arc of light on the button’s edge follows it. Pressed, a beam of light runs round the edge and the points roll down; then the coin flips to a check, a wash of champagne metal spreads from it across the whole button and a thin anamorphic streak of light crosses it.

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>
<!--
  "Redeem points button" 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>The redeem points button with the brushed metal coin</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 Redeem reward button of a coffee shop's loyalty app, in satin black with a champagne edge. On the left a
         coin of circular brushed metal whose reflection turns towards the light; on the right the points balance.
         Pressed, a beam runs round the edge while the points roll down; then the coin flips to a check, a champagne
         wash fills the pill and a thin anamorphic streak of light crosses it -->
    <div class="rp" data-wrap>
      <span class="rp__spill" data-spill aria-hidden="true"></span>
      <span class="rp__streak" aria-hidden="true"><span class="rp__streak-glow" data-streak-glow></span><span class="rp__streak-line" data-streak></span></span>
      <button class="rp__btn" type="button" data-btn data-autoclic aria-label="Redeem 1,200 points for a free flat white">
        <span class="rp__body" data-body>
          <span class="rp__fill" aria-hidden="true"></span>
          <span class="rp__shine" data-shine aria-hidden="true"></span>
          <span class="rp__wash" data-wash aria-hidden="true"><span class="rp__wash-sheen" data-wash-sheen></span></span>
          <span class="rp__edge" data-edge aria-hidden="true"></span>
          <span class="rp__satin" aria-hidden="true"></span>
          <svg class="rp__beam" data-beam aria-hidden="true"><rect data-beam-rect pathLength="1"/><rect class="rp__beam-tail" data-beam-tail pathLength="1"/></svg>
          <span class="rp__row">
            <span class="rp__coin" data-coin aria-hidden="true">
              <span class="rp__coin-face" data-coin-face>
                <span class="rp__coin-metal"></span>
                <span class="rp__coin-sheen" data-sheen></span>
                <span class="rp__coin-rim"></span>
                <svg class="rp__cup" data-cup viewBox="0 0 24 24">
                  <g class="rp__cup-low"><path d="M6 10.5h10.2v3.1a4.6 4.6 0 0 1-4.6 4.6h-1a4.6 4.6 0 0 1-4.6-4.6z"/><path d="M16.2 11.6h1.1a2 2 0 0 1 0 4h-1.5"/><path d="M9 7.6c0-1 .9-1.2.9-2.2M12.2 7.6c0-1 .9-1.2.9-2.2"/></g>
                  <g class="rp__cup-high"><path d="M6 10.5h10.2v3.1a4.6 4.6 0 0 1-4.6 4.6h-1a4.6 4.6 0 0 1-4.6-4.6z"/><path d="M16.2 11.6h1.1a2 2 0 0 1 0 4h-1.5"/><path d="M9 7.6c0-1 .9-1.2.9-2.2M12.2 7.6c0-1 .9-1.2.9-2.2"/></g>
                </svg>
                <svg class="rp__check" viewBox="0 0 24 24"><path data-check pathLength="1" d="M7 12.4l3.3 3.3 6.7-7"/></svg>
              </span>
            </span>
            <span class="rp__text" aria-hidden="true">
              <span class="rp__state" data-state>
                <span class="rp__title" data-t>Redeem reward</span>
                <span class="rp__sub" data-s>1,200 pts · Free flat white</span>
              </span>
              <span class="rp__state" data-state>
                <span class="rp__title rp__title--busy" data-t>Redeeming</span>
                <span class="rp__sub" data-s>Adding it to your order</span>
              </span>
              <span class="rp__state rp__state--done" data-state>
                <span class="rp__title" data-t>Flat white on us</span>
                <span class="rp__sub" data-s>Added to your order</span>
              </span>
            </span>
            <span class="rp__chip" data-chip-box aria-hidden="true">
              <span class="rp__chip-main" data-chip-main><span class="rp__chip-num" data-chip>1,450</span><span class="rp__chip-unit">pts</span></span>
              <span class="rp__chip-cost" data-cost>&minus;1,200</span>
            </span>
          </span>
        </span>
      </button>
    </div>
    <p class="sr" aria-live="polite" data-live></p>
  </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.

26 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 “Redeem points button” 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 a dark room, with a champagne coloured lamp behind and a very fine grain, a single pill button 60 pixels tall in satin black, with a faint horizontal grain and an edge of champagne hairline that catches the light at the top and goes into shadow at the bottom. On the left a champagne metal coin, brushed in circles like a watch dial, with a bevelled rim and a cup engraved in the middle; its reflection is two bright lobes facing each other and two dark ones across. In the middle Redeem reward with 1,200 pts · Free flat white under it, on the right a chip with the balance, 1,450 pts. With the mouse over it a soft light follows the pointer, an arc of light slides along the edge of the button to stay on its side and the coin’s reflection turns towards it on a small spring; the coin rises by a pixel and in the chip the balance leaves upwards while the cost comes in, −1,200. Pressed, the satin sinks by a pixel and springs back; a champagne beam runs along the edge with its tail, the words become Redeeming with a band of light passing through them, the reflection goes once round the coin and the balance counts down to 250. Then the coin narrows to its edge and opens again on a spring showing the check, a wash of brushed champagne metal spreads from it to the right across the whole button, the words turn dark, engraved, Flat white on us and Added to your order, the button swells by a hair and a thin anamorphic light, wider than the button, crosses it while a reflection slides over the metal. After a moment the wash goes back into the coin, the coin turns back to the cup and the balance climbs back. Until someone touches it, the button goes round by itself.

How it works

Satin in layers

The button is a single box (moved only by GSAP) with absolute layers: the satin fill with a grain made by a one pixel repeating-linear-gradient, the light under the pointer driven by two CSS variables, the champagne wash of the success, the edge’s arc of light and on top the inner shadows of the champagne hairline.

Metal brushed in circles

The coin is a repeating-radial-gradient of 0.6 pixel grooves over a champagne radial; on top, a conic-gradient with two opposite bright lobes and two dark ones across, in overlay with a radial mask that dims the centre: the anisotropic reflection of a brushed dial. GSAP turns it towards the pointer’s angle with an elastic quickTo, always the short way round.

The arc on the edge

A second conic-gradient cut down to the one pixel edge with mask-composite (exclude, and xor for WebKit): the --ea variable says where the light is, and it is the pointer’s angle seen from the pill’s centre, moved by another quickTo.

The working beam

An SVG as big as the pill, measured on resize, with a rect at pathLength 1 and a radius of half the height: a 0.12 stroke-dasharray with a glowing shadow and a wider faint tail go round with strokeDashoffset from 0 to −1 in a loop; meanwhile the points count down and the reflection goes once round the coin.

The success

The coin turns with scaleX down to 0 and comes back on an elastic spring with the check drawn by strokeDashoffset; the champagne wash opens with a pixel clip-path inset that starts from the coin’s centre; the anamorphic light is a 1.5 pixel line wider than the pill with a blurred halo, in mix-blend-mode screen, that widens with scaleX and slides away.

Values to change

NameFileDefaultWhat it changes
REWARDscript.jsFree flat whiteThe reward, in the line under the words.
DONEscript.jsFlat white on usWhat the button says when the reward is yours.
COSTscript.js1200The points the reward costs.
BALANCEscript.js1450The points you have before redeeming.
WORKscript.js1.6How many seconds the button works before the success.
GLINTscript.js1The strength of the anamorphic streak: 0 none, 1.5 bright.
SPRINGscript.js1How springy the moves are: 0.4 calm, 2 very bouncy.
HOLDscript.js1.9How many seconds the success stays before going back to rest.
AUTOscript.jstrueThe button goes round by itself until someone touches it.

Try them in the Playground

When to use it

For the loyalty app or the checkout of a coffee shop, a restaurant, an online shop or a hotel: redeeming points for a reward, using a voucher, unlocking a discount. It shows the cost first, then works in plain sight and ends with a measured moment of celebration.

On phones

On the phone the button is at most 86% of the screen wide and the anamorphic light stays inside the screen; there is no hover, so at the touch the light, the edge arc and the coin’s reflection turn towards the finger, and the rest is the same.

With reduced motion

Nothing moves: the words and the chip change in place with a fade, the points count, the cup becomes a check, the champagne wash fades in over the whole button and the anamorphic light is only a halo that lights up and fades.

Pitfalls

  • The coin’s reflection turned straight to the pointer’s angle spun all the way round when the angle crossed from 180 to −180: the target accumulates, always taking the shorter difference.
  • The edge beam with preserveAspectRatio none stretched the pill’s round ends: the SVG is measured in pixels on resize, with a radius of half the height.
  • The champagne wash in percent started from the left edge, not from the coin: the clip-path uses pixels, recomputed on the real width.
  • The loop started when the script was read, and the poster landed on different moments: it starts from the page’s load event.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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