
The star rating
Ratings, SVG, Hover
The treatment menu of Brindle, a made-up hair salon: cut, blow-dry, colour, beard, scalp ritual, each with its duration and price. Choose a treatment and its circle fills on a spring with the tick drawing itself; below, the session strip gains a piece as long as the treatment, on a three-hour scale, and the end time, the total time and the price roll to their new values. Remove it and its piece folds away while the others close the gap. Book wakes up and, pressed, turns into Booked with the tick drawing itself. A component alone on white.
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>
<!--
"Salon treatment menu" 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>The salon treatment menu with the total and the session building itself</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 hair salon's treatment menu: tick the treatments you want, the session strip below builds itself with a
piece for each one (as long as its duration), the end time, the total time and the price roll, and Book wakes up -->
<section class="menu" data-menu aria-labelledby="menu-title">
<header class="menu__top">
<h1 class="menu__title" id="menu-title">Choose treatments</h1>
<span class="menu__note">Brindle Salon · with Ines</span>
</header>
<ul class="list" data-list></ul>
<div class="session" aria-hidden="true">
<div class="session__labels">
<span class="session__from">10:30</span>
<span class="session__to"><span class="roll" data-roll="end"><span class="roll__in">10:30</span></span></span>
</div>
<div class="strip" data-strip>
<div class="strip__ticks" data-ticks></div>
<div class="strip__track" data-track></div>
</div>
</div>
<footer class="foot">
<div class="sum">
<span class="sum__time"><span class="roll" data-roll="time"><span class="roll__in">0 min</span></span></span>
<span class="sum__price"><span class="roll" data-roll="price"><span class="roll__in">€0</span></span></span>
</div>
<button class="book" type="button" data-book disabled>
<span class="book__face" data-face>
<span class="book__label" data-booklabel>Book</span>
<span class="book__done" data-done aria-hidden="true"><svg viewBox="0 0 16 16"><path data-donepath d="M3.6 8.4 6.6 11.2 12.4 5"></path></svg>Booked</span>
</span>
</button>
</footer>
</section>
<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 “Salon treatment menu” from Animorio and fit it into my siteThe rows are buttons with aria-pressed, built from a list of treatments at the top of the script.
The tick circle fills with a spring scale and the mark draws itself with stroke-dashoffset.
Each chosen treatment adds a piece to the strip as wide as its duration on the minute scale; GSAP opens it from zero width with a little bounce.
Removed, the piece folds to zero width: the strip's flex brings the others together by itself.
The total, the price and the end time roll: the old value leaves upward and the new one comes in from below and settles.
Book lights up only with at least one treatment and turns into Booked with the tick drawn.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | "10:30" | The time the session starts. |
SCALE_MINUTES | script.js | 180 | How many minutes the whole strip stands for. |
SPRING | script.js | 1.4 | How much the ticks and the strip pieces overshoot. |
ROLL_TIME | script.js | 0.42 | How many seconds a figure takes to roll. |
PIECE_TIME | script.js | 0.55 | How many seconds a piece takes to open or fold. |
CURRENCY | script.js | "€" | The currency sign. |
--accent | style.css | #8a4b3c | The colour of the ticks and the session. |
On the site of a hairdresser, a barber or a beauty salon, where you choose what to have done before booking.
Rows and strip are sized on height too; on touch the row presses in a little, as with the pointer.
No springs or rolling: the tick and the pieces appear in place and the figures change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.0 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.