
The star rating
Ratings, SVG, Hover
The button that books a class in a yoga studio. On the right it says how many spots are left; pressed, the rolled mat in the disc unrolls all the way, the tick draws itself above it, the texts say class and time and the spots go down by one.
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>
<!--
"Yoga class booking 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>Book class button of a yoga studio with the mat that unrolls and the spots that go down</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 button that books a class in a yoga studio: pressed, the rolled mat unrolls across the disc, the spots
left go down by one, a tick draws itself above the mat and the tag says the mat is yours -->
<button class="yg" type="button" data-yg>
<span class="yg__body" aria-hidden="true"><span class="yg__wash" data-wash></span><span class="yg__light"></span></span>
<span class="yg__edge" aria-hidden="true"></span>
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24">
<path class="seat__floor" d="M4.500 18.600h15"></path>
<path class="seat__mat" data-mat pathLength="1" d="M5.200 16.800h13.600"></path>
<g data-roll><circle class="seat__roll" cx="0" cy="0" r="4.400"></circle><path class="seat__spiral" data-spiral d="M0 0a1.500 1.500 0 1 1 1.500 1.500a2.600 2.600 0 0 1-2.600-2.600"></path></g>
<path class="seat__tick" data-tick pathLength="1" d="M8.200 9.400 10.900 12 15.900 6.500"></path>
</svg>
</span>
<span class="label">
<span class="label__main"><span data-word>Book class</span></span>
<span class="label__sub"><span data-sub>Vinyasa flow</span></span>
</span>
<span class="tag" aria-hidden="true"><span data-left>3 left</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.
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 “Yoga class booking button” from Animorio and fit it into my siteA value from 0 to 1 does everything: the roll’s position, its radius (from 4.4 to 1.2), the rotation of a turn and a half and the stroke of the mat behind it (stroke-dashoffset with pathLength 1).
First the value goes to minus 0.04 in 0.14 seconds, like a hand resting on the roll, then to 1 with power3.out: it starts fast and slows at the end, with no bounce.
The mat rises by 0.7 units and comes back with back.out(3), the tick draws itself in 0.36 seconds, the tag rolls to one spot fewer. With SPOTS at zero the button says “Class full” and does not answer.
| Name | File | Default | What it changes |
|---|---|---|---|
CLASS | script.js | "Vinyasa flow" | The class to book (made up). |
WHEN | script.js | "Today, 6:30 pm" | When it starts (made up). |
SPOTS | script.js | 3 | How many spots are left before booking. |
UNROLL | script.js | 0.9 | How many seconds the mat takes to unroll. |
ACCENT | script.js | #7fae8b | The colour of the mat. |
OK | script.js | #2f9d6a | The colour once the class is booked. |
HOLD | script.js | 2.6 | Alone: how many seconds the confirmation stays before going back. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
On the site of a yoga or pilates studio, in a gym’s class timetable, in a class booking app. In a real product the spots come from the calendar.
The same pill, at most as wide as the screen minus the margins; there is no hover, the tap does the same job.
The mat does not unroll: it appears already flat, the texts change without rolling and the tick appears.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.7 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.