
The star rating
Ratings, SVG, Hover
The question an online wine shop asks before letting you in: “Are you 18 or older?”. Pick the country and the legal age changes, 18, 21 or 20, the number rolling everywhere while the dial of ticks clicks round once per year. On yes the ring closes into a tick and the card folds; on no it shuts politely and leaves a way back.
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>
<!--
"Age gate" 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>Age gate</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">
<!-- an age gate for a wine shop: the country sets the legal age (the number rolls and the dial clicks round),
Yes closes the ring into a tick and folds the card, No folds it shut with a way back -->
<section class="ag" data-ag aria-labelledby="ag-title">
<div class="ag__seal" data-seal aria-hidden="true">
<span class="ag__ripple" data-ripple></span>
<svg viewBox="0 0 80 80">
<g data-dial><circle class="ag__dial" cx="40" cy="40" r="38" pathLength="60"></circle></g>
<circle class="ag__track" cx="40" cy="40" r="31.500"></circle>
<circle class="ag__ring" data-ring cx="40" cy="40" r="31.500" pathLength="1" transform="rotate(-90 40 40)"></circle>
<path class="ag__tick" data-tick pathLength="1" d="M28.500 41l8 8.500L52 32"></path>
</svg>
<span class="ag__num" data-num><span class="ag__roll"><span data-n>18</span></span><i>+</i></span>
</div>
<h2 class="ag__title" id="ag-title"><span data-title>Are you <span class="ag__roll ag__roll--in"><span data-n>18</span></span> or older?</span></h2>
<p class="ag__sub"><span data-sub>Legal drinking age where you are</span></p>
<div class="ag__fold" data-body>
<div class="ag__seg" data-seg role="radiogroup" aria-label="Country">
<span class="ag__thumb" data-thumb aria-hidden="true"></span>
<button type="button" role="radio" aria-checked="true" data-place="0">Italy</button>
<button type="button" role="radio" aria-checked="false" tabindex="-1" data-place="1">USA</button>
<button type="button" role="radio" aria-checked="false" tabindex="-1" data-place="2">Japan</button>
</div>
<div class="ag__row">
<button class="ag__no" type="button" data-no><span class="ag__press">No</span></button>
<button class="ag__yes" type="button" data-yes><span class="ag__press">Yes, I’m <span class="ag__roll ag__roll--in"><span data-n>18</span></span>+</span></button>
</div>
</div>
<div class="ag__fold ag__fold--shut" data-after>
<button class="ag__back" type="button" data-back tabindex="-1">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6.500 3.500 3 7l3.500 3.500M3.500 7H10a3 3 0 0 1 0 6H8"></path></svg>
<span data-backlabel>Start over</span>
</button>
</div>
<span class="ag__say" data-say aria-live="polite"></span>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.
24 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Age gate” from Animorio and fit it into my siteThe number lives in three elements sharing one attribute: in the seal, in the question and in the button. Change country and they all roll together, the direction telling whether the age went up or down.
Sixty ticks made from a single dashed circle (pathLength 60). The rotation is an animated number written into the transform attribute: six degrees per year, with a spring to settle it.
What you answer with and what is left afterwards are two blocks with an animated height: one closes while the other opens, and the card follows their sizes with no fixed heights.
Ring and tick have pathLength 1 and draw with stroke-dashoffset; GSAP’s automatic rounding is switched off, or they would simply pop in.
The countries are a radiogroup driven by the arrow keys; the buttons of the closed fold leave the Tab order, focus moves to the button that remains and an aria-live region says every answer.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #8a2846 | The colour of the yes, the ring and the tick. |
START | script.js | 0 | The country chosen at the start: 0 = Italy, 1 = USA, 2 = Japan. |
DAYS | script.js | 30 | How many days the yes is remembered: the line after verification says so. |
SPRING | script.js | 1 | How elastic the card, the country thumb and the dial are: 0.3 = stiff, 2 = very elastic. |
LOOP | script.js | true | Left alone, the demo’s pointer changes country, says yes, starts over and says no. |
At the door of an online wine shop, a brewery, a distillery, a cigar store or any site reserved for adults; also on a bar or restaurant site with a wine list you can order from.
The same card, as wide as the screen minus the margins: buttons 48 pixels tall, the country selector fits on one row and everything stays inside the preview box.
Numbers, lines and folds change at once, the dial does not turn, the ring and tick appear already drawn. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.8 KB; the libraries: GSAP 28 KB.
Tested on 21 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.
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.