
The star rating
Ratings, SVG, Hover
A cream pill button for a clothing shop: pressed, the label gives way to a yellow tailor’s tape running fast under a needle, slowing down and stopping on your centimetres with a small settle. Then the tape closes, the label says ‘Your size is’ and the size letter springs into a disc on the right.
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>
<!--
"Find my size 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>Find my size button with the tape measure running inside the pill</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 size finder button for a clothing shop: pressed, the label gives way to a tape measure that runs fast under
a needle, slows down and stops on your chest measure; then the tape closes, the label says your size and the
letter springs into a chip on the right; pressed again, it goes back -->
<button class="size" type="button" data-size aria-pressed="false">
<span class="size__glow" aria-hidden="true"></span>
<span class="size__body" aria-hidden="true"><span class="size__light"></span></span>
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24"><g data-ruler><rect x="2.8" y="8" width="18.4" height="8" rx="2.2"></rect><path d="M7 8v3.2M10.4 8v2M13.8 8v3.2M17.2 8v2"></path></g></svg>
</span>
<span class="mid">
<span class="label"><span class="label__word" data-word>Find my size</span></span>
<span class="tape" data-tape aria-hidden="true"><span class="tape__strip" data-strip></span><span class="tape__needle" data-needle></span></span>
</span>
<span class="chip" data-chip aria-hidden="true"><span data-letter>M</span></span>
</button>
<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>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.
15 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 “Find my size button” from Animorio and fit it into my siteFor every centimetre between FROM and CHEST (plus a few at the sides) the script creates a cell 34 pixels wide with the number; its two ticks, long and short, are its ::before and ::after. The strip starts at the centre of the window, so the centimetre under the needle depends only on the shift.
The strip goes from FROM’s shift to CHEST’s minus 5 pixels with power4.out in RUN seconds: it starts very fast and slows down. Then a second tween brings it onto the number with elastic.out: that is the settle.
It is a vertical line fixed at the centre; when the tape arrives it shortens to 60% and comes back on a spring, as if it felt the hit.
The tape squashes and goes, the new label comes up from below and the disc on the right opens from 0 to 42 pixels while scaling and rotating by 30 degrees, all with elastic.out.
After HOLD seconds, or at another click, the disc closes, the ruler lies down again and the strip is put back to its start for next time.
| Name | File | Default | What it changes |
|---|---|---|---|
IDLE | script.js | Find my size | The label at rest. |
FOUND | script.js | Your size is | The label when the size is found. |
LETTER | script.js | M | The size found. |
CHEST | script.js | 96 | The centimetres the tape stops on. |
FROM | script.js | 78 | The centimetres the tape starts from. |
RUN | script.js | 1.7 | How many seconds the tape runs before stopping. |
ACCENT | script.js | #e5532a | The colour of the needle and the size. |
HOLD | script.js | 2.6 | By itself: how many seconds the size stays before going back. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
On the product page of a clothing shop, next to the size picker: while the site works out the size from saved measurements or past orders, the tape gives something to look at and the answer arrives as a small event. Also good for shoes, rings, bikes.
The same button: the pill takes at most the screen width minus the margins; the tape takes the label’s room, whatever it is.
The tape does not run: it fades in already still on the right centimetres, then gives way to the label and the size, again with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.2 KB; the libraries: GSAP 28 KB.
Tested on 14 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.