
The star rating
Ratings, SVG, Hover
The ring size selector of an online jeweller: six sizes in a row and a drawn gold ring above. Choosing one, the ring widens or tightens on a spring, the dashed rule across it stretches and the inner diameter is recounted in millimetres, with the US size below.
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>
<!--
"Ring 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>Ring size selector of a jeweller with the circle that widens and the diameter that counts</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 ring size selector of a jeweller: choosing a size, the drawn ring widens or tightens on a spring, the
line across it stretches and the inner diameter is recounted in millimetres -->
<form class="rg" data-rg onsubmit="return false">
<header class="rg__head">
<span class="rg__title" id="rg-title">Ring size</span>
<span class="rg__hint">Measured inside the band</span>
</header>
<div class="rg__stage">
<svg viewBox="0 0 200 130" aria-hidden="true">
<defs>
<linearGradient id="rg-gold" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#fbe6a8"></stop><stop offset="0.45" stop-color="#d9a441"></stop><stop offset="1" stop-color="#8a5a12"></stop></linearGradient>
</defs>
<ellipse class="ring__shadow" data-shadow cx="100" cy="121" rx="40" ry="4"></ellipse>
<circle class="ring__band" data-band cx="100" cy="68" r="40"></circle>
<path class="ring__shine" data-shine d=""></path>
<g data-stone><path class="ring__claw" d="M-7 4 0 11 7 4"></path><path class="ring__stone" d="M-8 -3 -4 -8h8l4 5-8 9Z"></path><path class="ring__facet" d="M-8 -3h16M-4 -8 0 -3 4 -8"></path></g>
<g data-rule><path class="ring__rule" data-line d=""></path><path class="ring__tick" data-t1 d=""></path><path class="ring__tick" data-t2 d=""></path></g>
</svg>
<p class="rg__mm"><b data-mm></b><i>mm</i></p>
</div>
<div class="rg__row" role="radiogroup" aria-labelledby="rg-title" data-row>
<span class="rg__thumb" data-thumb aria-hidden="true"></span>
</div>
<p class="rg__foot"><span data-foot></span></p>
</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.
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 “Ring size selector” from Animorio and fit it into my siteA single number, the ring’s radius, redraws everything at each frame: the circle’s r attribute, the arc of the glint, the stone’s position, the shadow and the rule with its notches. No transforms: only attributes, so no origin problems.
The radius goes to the size with elastic.out(1, 0.6) in 0.8 seconds; the millimetres count with power2.out in 0.45. The shape may overshoot, the number may not.
The European size is the inner circumference in millimetres, so the diameter is the size divided by pi. In the drawing the difference is multiplied by SPREAD, otherwise two millimetres would not be seen.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | 54 | The size chosen at the start (EU: it is the circumference in millimetres). |
FIRST | script.js | 50 | The smallest size in the row. |
STEP | script.js | 2 | How much each size goes up. |
SPREAD | script.js | 2.6 | How much the difference is exaggerated in the drawing (1 would be to scale). |
ACCENT | script.js | #e6b655 | The colour of the mark under the chosen size. |
PAUSE | script.js | 1.5 | Alone: how many seconds it stays on each size. |
LOOP | script.js | true | Left alone, a pointer tries three sizes. |
On a ring’s page of an online jeweller, in a size guide, wherever a size is a physical measure worth showing (bracelets, straps, hoops, pipes).
The same card, as wide as the screen; the ring never exceeds 38% of the height and the six sizes stay 40 pixels high.
The ring is already at its size and changes at once, the millimetres change without counting and the line below without rolling.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.1 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.