
The star rating
Ratings, SVG, Hover
The availability button for a freelancer’s portfolio: a dark pill with a calendar and the label ‘Available for work’. Pressed, the pill makes room and three months come out, one after the other, each with a small bar filling with the time still free; the ring round the calendar closes to the free share, the tick draws itself and the label says from when. Pressed again, everything folds back.
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>
<!--
"Available for work 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>Available for work button with the free months opening inside the pill</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 availability button of a freelancer's portfolio: pressed, the pill makes room and three months come out
one after the other, each with a small bar that fills with the time still free; the ring round the sign closes
to the share of free time, the tick in the calendar draws itself and the label says from when; pressed again,
everything folds back -->
<button class="avail" type="button" data-avail aria-expanded="false">
<span class="avail__body" aria-hidden="true"><span class="avail__wash" data-wash></span><span class="avail__light"></span></span>
<span class="seat" data-seat aria-hidden="true">
<svg class="seat__ring" viewBox="0 0 54 54"><circle class="seat__track" cx="27" cy="27" r="25"></circle><circle class="seat__arc" data-ring cx="27" cy="27" r="25" pathLength="1"></circle></svg>
<span class="seat__disc">
<svg viewBox="0 0 24 24"><rect x="4.4" y="5.8" width="15.2" height="13.8" rx="3.2"></rect><path d="M8.4 3.8v3.6M15.6 3.8v3.6M4.4 10.2h15.2"></path><path class="seat__tick" data-tick pathLength="1" d="M8.9 14.6 11.2 16.9 15.4 12.5"></path></svg>
</span>
</span>
<span class="label" data-label><span class="label__word" data-word>Available for work</span></span>
<span class="months" data-months aria-hidden="true">
<span class="month" data-month data-free="1"><b>Feb</b><i><u></u></i></span>
<span class="month" data-month data-free="0.6"><b>Mar</b><i><u></u></i></span>
<span class="month" data-month data-free="0.3"><b>Apr</b><i><u></u></i></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.
15 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 “Available for work button” from Animorio and fit it into my siteThe button is inline-flex with no width: the label and the months tray decide it. GSAP animates the width of those two (measured at the start for both states) with elastic.out, and the pill follows.
Each tile comes in from scale 0.5 and 8 pixels lower with elastic.out, staggered by STAGGER; two tenths later its small bar scales horizontally to the free share written in data-free.
The ring is an SVG circle with pathLength 1: its stroke-dashoffset goes to 1 minus the average of the free shares. The tick inside the calendar draws itself the same way.
The tiles leave from last to first, then tray and label return to their rest sizes with power3.inOut: opening has the bounce, closing does not, so the pill seems to fold back calmly.
| Name | File | Default | What it changes |
|---|---|---|---|
IDLE | script.js | Available for work | The label at rest. |
FROM | script.js | From Feb | The label with the months open: from when you are free. |
ACCENT | script.js | #35d07f | The colour of free time. |
SPRING | script.js | 0.8 | How long the spring of the opening pill lasts, in seconds. |
STAGGER | script.js | 0.07 | The delay between one month and the next, in seconds. |
HOLD | script.js | 2.8 | By itself: how many seconds the months stay open. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
In the header or the contact page of the portfolio of a freelancer, a studio or a small agency: it says at once whether there is room and from when, before anyone even writes. The months and shares are changed in the HTML.
The same button: open it is 306 pixels wide and fits screens from 320 up. No light following the pointer.
No springs: the pill goes straight to the new width, the months appear with their bars already full and the label changes with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.3 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.