
The elastic button
Buttons, Hover, Text
The shoe size selector that doubles as a converter: three rulers, EU, UK and US, slide under a single lens. Pick a number on any of them and the other two follow a moment later; below, the foot length in centimetres.
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>
<!--
"Shoe size selector" 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>Shoe size selector with the EU, UK and US scales that slide together</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 shoe size picker: three rulers, EU, UK and US, slide under one lens; pick a size on any of them and the
other two follow a beat later, with the foot length below -->
<section class="sz" data-sz aria-label="Shoe size">
<header class="sz__head">
<span class="sz__title" id="sz-title">Select your size</span>
<span class="sz__foot">Foot length <b><span data-cm></span></b> cm</span>
</header>
<div class="sz__body">
<div class="sz__names" data-names aria-hidden="true"></div>
<div class="sz__rules" data-rules role="slider" tabindex="0" aria-labelledby="sz-title">
<div class="sz__lens" data-lens aria-hidden="true"><i></i></div>
</div>
</div>
<footer class="sz__bar">
<button class="sz__step" type="button" data-step="-1" aria-label="Smaller size"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M10 3.500 5.500 8 10 12.500"></path></svg></button>
<p class="sz__say" aria-live="polite"><span data-say></span></p>
<button class="sz__step" type="button" data-step="1" aria-label="Larger size"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6 3.500 10.500 8 6 12.500"></path></svg></button>
</footer>
</section>
<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.
16 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 “Shoe size selector” from Animorio and fit it into my siteThe three scales are three strips of equally wide buttons: the size is a single index, and each strip goes to centre minus (index + a half) times the cell width.
The row you touch leaves at once, the others with a delay of FOLLOW seconds for each row of distance: they look like three rulers tied by elastic.
On opening the strips only fade in: the position is decided by the choice alone, so a choice made during the entrance is not pulled back.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | 3 | The size chosen at the start: 0 is the smallest in the table. |
FOLLOW | script.js | 0.07 | By how many seconds each scale follows the one above. |
GLIDE | script.js | 0.6 | How many seconds a scale takes to arrive. |
ACCENT | script.js | #ff5b2e | The colour of the scale names. |
PAUSE | script.js | 1.6 | On its own: how many seconds it stays on each size. |
LOOP | script.js | true | Left alone, a pointer tries the sizes. |
On the product page of a shoe, sneaker or boot shop, above all one selling in several countries: whoever knows their size in one scale finds it in the others without opening the chart.
The same component: the cells stay 54 pixels wide and easy to tap, the numbers at the sides fade into the card’s edge.
The three rows go to their place at once, with no sliding or bouncing; the texts change without rolling.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.4 KB; the libraries: GSAP 28 KB.
Tested on 16 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.