
The star rating
Ratings, SVG, Hover
A radio group for choosing the level of a language course: beginner, intermediate, advanced. The tile slides under the choice and stretches in the direction of travel, the level bars rise one after the other, the code and the description roll and below the weeks, lessons and words are recounted.
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>
<!--
"Course level 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>Course level selector with the bars that rise and the description that changes</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 radio group for the level of a course: the highlight slides to the chosen tile, its bars rise one after
the other, the description rolls and the plan below is recounted -->
<form class="lvl" data-lvl onsubmit="return false">
<header class="lvl__head">
<span class="lvl__title" id="lvl-title">Your level</span>
<span class="lvl__code"><span data-code>A1</span></span>
</header>
<div class="lvl__row" role="radiogroup" aria-labelledby="lvl-title" data-row>
<span class="lvl__thumb" data-thumb aria-hidden="true"><span class="lvl__thumb-in"></span></span>
<label class="opt">
<input type="radio" name="level" value="0">
<svg viewBox="0 0 30 24" aria-hidden="true"><rect x="3" y="14" width="6" height="8" rx="2"></rect><rect x="12" y="8" width="6" height="14" rx="2"></rect><rect x="21" y="2" width="6" height="20" rx="2"></rect></svg>
<span class="opt__name">Beginner</span>
</label>
<label class="opt">
<input type="radio" name="level" value="1">
<svg viewBox="0 0 30 24" aria-hidden="true"><rect x="3" y="14" width="6" height="8" rx="2"></rect><rect x="12" y="8" width="6" height="14" rx="2"></rect><rect x="21" y="2" width="6" height="20" rx="2"></rect></svg>
<span class="opt__name">Intermediate</span>
</label>
<label class="opt">
<input type="radio" name="level" value="2">
<svg viewBox="0 0 30 24" aria-hidden="true"><rect x="3" y="14" width="6" height="8" rx="2"></rect><rect x="12" y="8" width="6" height="14" rx="2"></rect><rect x="21" y="2" width="6" height="20" rx="2"></rect></svg>
<span class="opt__name">Advanced</span>
</label>
</div>
<p class="lvl__text" aria-live="polite"><span data-text></span></p>
<footer class="lvl__plan">
<span class="plan"><b data-weeks>12</b> weeks</span>
<span class="plan__bar" aria-hidden="true"></span>
<span class="plan"><b data-lessons>2</b> lessons a week</span>
<span class="plan__bar" aria-hidden="true"></span>
<span class="plan"><b data-words>600</b> words</span>
</footer>
</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.
23 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 “Course level selector” from Animorio and fit it into my siteEach tile is a label with a transparent radio input as large as itself inside: click, arrows and screen readers work on their own. The script only listens to the change event.
A single absolutely positioned element, a third of the row wide: GSAP moves its x with back.out, and its child stretches to 1.12 with the origin on the side it leaves from and comes back with elastic.out. On resize the x is recalculated.
The bars of the chosen tile start from scaleY 0.25 with the origin at the bottom and rise with back.out staggered by 0.07 seconds. Code and description roll in the direction of the change. The numbers count with power2.out, no spring: a count never overshoots.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | 0 | The level chosen at the start: 0 beginner, 1 intermediate, 2 advanced. |
WEEKS | script.js | 12 | How many weeks the first level’s course lasts (the others: plus 4 and plus 8). |
ACCENT | script.js | #c8f25c | The colour of the chosen level. |
SLIDE | script.js | 0.55 | How many seconds the tile takes to slide. |
PAUSE | script.js | 1.7 | Alone: how many seconds it stays on each level. |
LOOP | script.js | true | Left alone, a pointer tries the three levels. |
In the signup form of an online school or a language course, in the onboarding of a learning app, in any form where the choice is one of three and each choice changes what follows (a plan, a size, a difficulty).
The same card, as wide as the screen minus the margins; below 360 pixels the texts shrink by a point. The tap chooses, there is no hover.
The tile appears under the choice without sliding, the bars do not rise, code and description change without rolling and the numbers are already at their value.
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 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.