
The star rating
Ratings, SVG, Hover
The time-off button in a team’s app: a violet pill with a small calendar, the dates asked for and the days left. Pressed, the days asked for light up one at a time in the small calendar and each comes off the balance on the right, which counts down; at the end the label says the request is sent and awaiting approval.
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>
<!--
"Request time off 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>Request time off button with the days that come off the balance</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 time-off button of a team's app: pressed, the days asked for light up one by one in the little
calendar and each one comes off the balance on the right; then the label says the request is sent -->
<button class="off" type="button" data-off>
<span class="off__body" aria-hidden="true"><span class="off__sheen" data-sheen></span><span class="off__light"></span></span>
<span class="off__edge" aria-hidden="true"></span>
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24">
<rect x="3.6" y="5.2" width="16.800" height="14.800" rx="3.4"></rect>
<path d="M8 3.400v3.400M16 3.400v3.400M3.600 9.800h16.800"></path>
<g data-days></g>
</svg>
</span>
<span class="label">
<span class="label__main"><span data-word>Request time off</span></span>
<span class="label__sub"><span data-sub>Mon 24 to Wed 26</span></span>
</span>
<span class="tag" data-tag aria-hidden="true"><span data-left>18 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.
13 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 “Request time off button” from Animorio and fit it into my siteThe calendar’s five marks are SVG paths created by the script. A timeline lights the first DAYS of them, one every BEAT seconds: a class changes the stroke colour, and the mark hops 2.2 units and returns on a spring.
At the same instant the tag squashes slightly and bounces, and its text rolls to the new number: the balance is BALANCE minus the days lit so far, so calendar and number cannot say two different things.
A class on the button darkens the seat and whitens the tag, seat and pill make a small elastic bounce and a slanted sheen crosses the pill; the two lines roll to the new text.
| Name | File | Default | What it changes |
|---|---|---|---|
DAYS | script.js | 3 | How many days off are asked for (1 to 5). |
BALANCE | script.js | 18 | The days off left before the request. |
RANGE | script.js | Mon 24 to Wed 26 | The dates written below (invented). |
BEAT | script.js | 0.42 | How many seconds between one day and the next. |
ACCENT | script.js | #6f5cff | The pill’s colour. |
HOLD | script.js | 2.6 | On its own: how many seconds it stays on “Request sent” before going back. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
For a company’s HR app, the back office of a studio or a shop: the button at the end of the time-off form, which shows at once how much is left. In a real product the dates come from the calendar chosen earlier and the balance from the server.
The same button: the pill takes at most the screen width minus the margins; it is pressed with a finger and there is no light under the pointer.
No hops, bounces or sheen: the marks light up and the balance changes in place, then the labels change without moving.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.0 KB; the libraries: GSAP 28 KB.
Tested on 15 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.