
The elastic button
Buttons, Hover, Text
A gas meter reading form with five drums like the ones on the meter: each drum turns one step at a time and settles, changed digits turn orange, the usage since the last reading is recounted, and the button sends the reading with its arrow becoming a tick.
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>
<!--
"Meter reading form" 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>Meter reading form</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 meter reading form: five drums like the ones on the meter, turned one step at a time;
the usage since the last reading is worked out as they turn, and the reading is sent -->
<form class="mr" data-mr aria-label="Gas meter reading" novalidate>
<header class="mr__head">
<span class="mr__title">Meter reading</span>
<span class="mr__kind">Gas</span>
</header>
<div class="mr__window" data-window role="group" aria-label="Reading, five digits">
<span class="mr__unit" aria-hidden="true">m³</span>
</div>
<dl class="mr__facts">
<div><dt>Last reading</dt><dd data-last></dd></div>
<div><dt>Used since then</dt><dd class="mr__used" aria-live="polite"><span data-used></span></dd></div>
</dl>
<button class="mr__send" type="submit" data-send>
<span class="mr__label"><span data-label>Send reading</span></span>
<svg viewBox="0 0 20 20" aria-hidden="true"><path class="mr__arrow" data-arrow d="M4 10h11M10.500 5.500 15 10l-4.500 4.500"></path><path class="mr__tick" data-tick pathLength="1" d="M4.500 10.500 8.500 14.500 15.500 6"></path></svg>
</button>
</form>
<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>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.
18 values to change
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 “Meter reading form” from Animorio and fit it into my siteEach drum has a position that grows or falls without limits: the digit is the remainder of the division by ten. The strip has a 9 at the head and a 0 at the tail, so the passage from 9 to 0 is drawn like any other.
Each drum is a button with the spinbutton role and its aria-values: up and down arrows turn it, so does the wheel, and a click on the upper or lower half. No numeric keyboard to open on a phone.
The difference from the last reading counts with power2.out, which never overshoots: a billing figure does not bounce. The spring stays with the drums and the button.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #f26a1b | The colour of the changed digits and of the label. |
LAST | script.js | 4218 | The last recorded reading, in cubic metres (up to 99999). |
LAST_DATE | script.js | 12 Oct | The day of the last reading. |
SPIN | script.js | 0.5 | How many seconds a drum takes to make one step. |
HOLD | script.js | 1.6 | On its own: how many seconds it stays on the sent reading. |
LOOP | script.js | true | Left alone, a pointer turns two drums and sends the reading. |
In the customer area of a gas, electricity or water supplier, in the app of a block of flats or a rental home; and wherever a number read off an instrument is entered: a car’s mileage, a copy counter, a serial number.
The same form: the drums are 40 pixels wide and 54 tall (46 in short windows), turned by tapping above or below the digit; below 330 pixels they get narrower.
No clicks or counting: digits, usage and button change at once.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.7 KB; the libraries: GSAP 28 KB.
Tested on 18 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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
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.