Skip to content
animorio
IT
All components

Salon treatment menu

Pricing, SVG, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.0 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

Shows a menu of treatments to choose from: each choice builds the session in a strip scaled to its duration, and the total time, price and end time update with rolling figures.

How it works

The rows

The rows are buttons with aria-pressed, built from a list of treatments at the top of the script.

The tick

The tick circle fills with a spring scale and the mark draws itself with stroke-dashoffset.

The session strip

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.

Removing a treatment

Removed, the piece folds to zero width: the strip's flex brings the others together by itself.

The rolling figures

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

Book lights up only with at least one treatment and turns into Booked with the tick drawn.

Values to change

NameFileDefaultWhat it changes
STARTscript.js"10:30"The time the session starts.
SCALE_MINUTESscript.js180How many minutes the whole strip stands for.
SPRINGscript.js1.4How much the ticks and the strip pieces overshoot.
ROLL_TIMEscript.js0.42How many seconds a figure takes to roll.
PIECE_TIMEscript.js0.55How many seconds a piece takes to open or fold.
CURRENCYscript.js"€"The currency sign.
--accentstyle.css#8a4b3cThe colour of the ticks and the session.

Try them in the Playground

When to use it

On the site of a hairdresser, a barber or a beauty salon, where you choose what to have done before booking.

On phones

Rows and strip are sized on height too; on touch the row presses in a little, as with the pointer.

With reduced motion

No springs or rolling: the tick and the pieces appear in place and the figures change with a fade.

Pitfalls

  • The strip is measured in pixels: on resize the pieces take their new width at once.
  • No tabular-nums with Mona Sans, which draws the zero with a slash.
  • While rolling, the figure's frame takes the width of the wider of the two, so nothing gets cut.

Libraries

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.

Testing

Tested on 14 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components