
The inchworm menu
Menus, Hover, Transitions
The Book a cut button of Oakline Barbers, a made-up barbershop, on black: in the pill the faces of the three barbers, the next free time and an ivory disc with a little barber pole whose red and blue stripes climb slowly. Pressed, the pill opens on the three barbers; pick one and their face moves in front of the others with a brass ring while their free times slide in. Pick a time and the drawer folds away, the pole spins fast while it books and turns into a tick, and the line reads the booking.
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>
<!--
"Book a barber 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>The barber booking button with the striped pole that spins while it confirms</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 Book a cut button of Oakline Barbers, a made-up barbershop: pressed, it opens on the three barbers,
then on the free times of the one you choose; the little striped barber pole in the disc spins while it
books, and turns into a tick -->
<div class="wrap" data-wrap>
<div class="card" data-card>
<span class="card__glow" data-glow aria-hidden="true"></span>
<div class="card__clip" aria-hidden="true"><span class="card__grain"></span><span class="card__sheen" data-sheen></span></div>
<div class="top">
<div class="faces" data-faces aria-hidden="true">
<span class="face" data-face style="--c: var(--b1)">TH</span>
<span class="face" data-face style="--c: var(--b2)">MO</span>
<span class="face" data-face style="--c: var(--b3)">RI</span>
</div>
<div class="words" data-words aria-live="polite">
<span class="state" data-state="rest"><b>Book a cut</b><small>Next free · Sat 10:30</small></span>
<span class="state" data-state="barber"><b>Choose your barber</b><small>Oakline · 3 chairs today</small></span>
<span class="state" data-state="time"><b data-time-title>Mo, Saturday</b><small>Pick a time</small></span>
<span class="state" data-state="busy"><b>Booking</b><small data-busy-sub>Sat 11:15 with Mo</small></span>
<span class="state" data-state="done"><b data-done-title>Sat 11:15 with Mo</b><small data-done-sub>Skin fade · 40 min · £28</small></span>
</div>
<span class="disc" data-disc aria-hidden="true">
<svg class="pole" data-pole viewBox="0 0 20 34">
<defs>
<clipPath id="pole-clip"><rect x="5" y="5" width="10" height="24" rx="5"/></clipPath>
</defs>
<rect class="pole__base" x="5" y="5" width="10" height="24" rx="5"/>
<g clip-path="url(#pole-clip)">
<g data-stripes>
<path class="pole__red" d="M0 4 L20 -6 L20 -1 L0 9 Z M0 16 L20 6 L20 11 L0 21 Z M0 28 L20 18 L20 23 L0 33 Z M0 40 L20 30 L20 35 L0 45 Z M0 52 L20 42 L20 47 L0 57 Z"/>
<path class="pole__blue" d="M0 10 L20 0 L20 2.6 L0 12.6 Z M0 22 L20 12 L20 14.6 L0 24.6 Z M0 34 L20 24 L20 26.6 L0 36.6 Z M0 46 L20 36 L20 38.6 L0 48.6 Z M0 58 L20 48 L20 50.6 L0 60.6 Z"/>
</g>
<rect class="pole__shine" x="6.6" y="5" width="2.2" height="24" rx="1.1"/>
</g>
<rect class="pole__cap" x="4" y="2.4" width="12" height="3.4" rx="1.7"/>
<rect class="pole__cap" x="4" y="28.2" width="12" height="3.4" rx="1.7"/>
</svg>
<svg class="tick" data-tick viewBox="0 0 24 24"><path data-tick-path d="M6.5 12.5l3.6 3.6 7.4-8.2"/></svg>
</span>
<button class="hit" type="button" data-book aria-label="Book a cut at Oakline Barbers"></button>
</div>
<div class="drawer" data-drawer>
<div class="barbers" data-barbers role="group" aria-label="Barbers">
<button class="barber" type="button" data-barber="0" style="--c: var(--b1)"><span class="barber__face">TH</span><span class="barber__name">Theo</span><span class="barber__next">10:30</span></button>
<button class="barber" type="button" data-barber="1" style="--c: var(--b2)"><span class="barber__face">MO</span><span class="barber__name">Mo</span><span class="barber__next">11:15</span></button>
<button class="barber" type="button" data-barber="2" style="--c: var(--b3)"><span class="barber__face">RI</span><span class="barber__name">Rina</span><span class="barber__next">13:00</span></button>
</div>
<div class="times" data-times role="group" aria-label="Free times">
<button class="time" type="button" data-slot>11:15</button>
<button class="time" type="button" data-slot>12:00</button>
<button class="time" type="button" data-slot>14:45</button>
<button class="time" type="button" data-slot>16:30</button>
</div>
</div>
</div>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3l13 7.4-5.7 1.5L9.6 18z"/></svg>
</div>
</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.
46 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 “Book a barber button” from Animorio and fit it into my siteThe stripes are two SVG paths of parallelograms, red and blue, repeating every twelve units, clipped inside the cylinder with a clipPath. A single tween moves them up twelve units, linear and endless: since the drawing repeats, the loop does not show. The speed is that tween’s timeScale, which rises on hover, when the pill opens and while it books.
The pill is one element with hidden overflow: GSAP changes its height from sixty-four pixels to the measured height of the drawer, and its radius from 32 to 24, with back.out. The drawer is always there underneath, invisible until the pill uncovers it; the barbers and the times come in with a stagger.
The three faces up top are absolute and GSAP lines them up with x; once a barber is chosen the order changes and their face goes first with the highest z-index and a brass ring made with a second box-shadow, while the others shrink and fade, each on its own spring.
One timeline: the drawer folds away, the line rolls to Booking, the pole speeds up and makes a full turn, then shrinks and makes way for the tick drawn with stroke-dashoffset; the pill gives a beat on an elastic and a shine crosses it.
| Name | File | Default | What it changes |
|---|---|---|---|
SHOP | script.js | Oakline | The name of the shop, in the line under Choose your barber. |
SERVICE | script.js | Skin fade · 40 min · £28 | The treatment and price under the finished booking. |
POLE_SPEED | script.js | 2.4 | How many seconds the pole stripes take to climb one turn, at rest. |
SPIN | script.js | 1.2 | How many seconds the pole spins fast while it confirms. |
SPRING | script.js | 0.75 | How long the spring that opens the pill and moves the faces lasts. |
STAGGER | script.js | 0.06 | How many seconds between one barber (or time) coming in and the next. |
HOLD | script.js | 3.2 | How many seconds the booking stays written before the autopilot starts again. |
On the site of a barber, hairdresser or beautician, on the salon page of a booking app, next to the price list of cuts: wherever people should pick the person and the time without leaving the page.
The pill is as wide as the screen minus a margin, up to 352 pixels, and open it stays under 230 pixels tall; a finger picks the barbers and the times, which are at least 34 pixels tall. Without hover the faces do not fan out and the edge light stays in the middle.
The pole stays still, no springs or spins: the pill takes its height at once, lines and parts cross-fade and the tick draws in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.7 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.