Skip to content
animorio
IT
All components

Shoe size selector

Pickers, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.4 KBGSAP 28 KBFreeDownload the zip

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.

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

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.

16 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 “Shoe size selector” 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 light card: at the top “Select your size” and the foot length, in the middle three rows of numbers with the names EU, UK and US in orange on the left, and over them a white lens with a dark edge holding the three measures of the same shoe in a column. The numbers at the sides fade. Tapping a number on a row, that row slides until it brings it into the lens with a small settle and the other two follow a moment later, in order of distance; the number landing in the lens gives a hop, the lens gives way in the direction of travel and returns, the scale names lean, the centimetres roll and the line below says the three measures together. The two arrows at the bottom move to the size before and after and switch off at the ends. It works from the keyboard too.

How it works

Three strips, one index

The 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 one you touch leaves first

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.

The entrance leaves the position alone

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.

Values to change

NameFileDefaultWhat it changes
STARTscript.js3The size chosen at the start: 0 is the smallest in the table.
FOLLOWscript.js0.07By how many seconds each scale follows the one above.
GLIDEscript.js0.6How many seconds a scale takes to arrive.
ACCENTscript.js#ff5b2eThe colour of the scale names.
PAUSEscript.js1.6On its own: how many seconds it stays on each size.
LOOPscript.jstrueLeft alone, a pointer tries the sizes.

Try them in the Playground

When to use it

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.

On phones

The same component: the cells stay 54 pixels wide and easy to tap, the numbers at the sides fade into the card’s edge.

With reduced motion

The three rows go to their place at once, with no sliding or bouncing; the texts change without rolling.

Pitfalls

  • The demo’s table is indicative (men’s): sizes change from one brand to the next, replace it with the maker’s real one.
  • The strips are in pixels: on a resize they are measured again and jump to the right place, even halfway through a slide.
  • An entrance made with gsap.from on the strips’ x, if interrupted by a choice, pulled them back to where they started: that is why the entrance is only a fade.

Libraries

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.

Testing

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