
The liquid grid
Hover, Transitions
A bar’s happy hour, to try by dragging the time of day: when the time enters the band from 5 to 7 pm, the band on the track lights up, a warm light rises on the card, the state goes from “Starts in 20 min” to “On now” and the prices roll one after the other to the lower ones, with the full price left struck through beside them. After 7 pm everything goes 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>
<!--
"Bar happy hour" 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>Bar happy hour</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 happy hour of a bar: drag the time of day and, when it enters the happy hour, the band lights up,
the prices roll to the lower ones and the time left counts down -->
<section class="hh" data-hh aria-labelledby="hh-title">
<header class="hh__head">
<span class="hh__name"><b id="hh-title">Bar Lumen</b><span>Happy hour, every day</span></span>
<span class="hh__clock" aria-hidden="true"><b data-clock>16:40</b></span>
</header>
<p class="hh__state" aria-live="polite"><span data-state>Starts in 20 min</span></p>
<div class="hh__time">
<div class="hh__track" aria-hidden="true">
<i class="hh__band" data-band></i>
<i class="hh__knob" data-knob></i>
</div>
<input class="hh__range" type="range" data-range min="960" max="1200" step="5" value="1000" aria-label="Time of day">
<div class="hh__hours" aria-hidden="true"><span>16:00</span><span>17:00</span><span>18:00</span><span>19:00</span><span>20:00</span></div>
</div>
<ul class="hh__menu">
<li class="hh__drink" data-drink data-was="11" data-now="7"><span class="hh__what"><b>Negroni</b><span>Gin, bitter, vermouth</span></span><span class="hh__price"><s data-was-el>€11</s><span class="hh__roll"><b data-price>€11</b></span></span></li>
<li class="hh__drink" data-drink data-was="9" data-now="6"><span class="hh__what"><b>Spritz</b><span>Bitter, prosecco, soda</span></span><span class="hh__price"><s data-was-el>€9</s><span class="hh__roll"><b data-price>€9</b></span></span></li>
<li class="hh__drink" data-drink data-was="6" data-now="4"><span class="hh__what"><b>Draught lager</b><span>Half litre</span></span><span class="hh__price"><s data-was-el>€6</s><span class="hh__roll"><b data-price>€6</b></span></span></li>
</ul>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.
33 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Bar happy hour” from Animorio and fit it into my siteThe state is one number, the minutes since midnight, and it is the value of a real range input: a function works out the time, the knob’s position, the sentence and whether the happy hour is on.
Only when the time crosses the start or the end does the change run: a class on the card lights band and state, and the prices change with a delay of STAGGER between one row and the next.
The price rolls inside a one-line window; the full one is a second, struck element appearing beside it, so the saving shows.
A soft halo above the card, whose opacity is a CSS variable taken from 0 to GLOW in almost a second.
The real input sits over the track, transparent: it drags, works from the keyboard and is read by those who cannot see; the drawn knob follows it in percent.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #ff9a3d | The colour of the happy hour: band, state, lower prices and light. |
FROM | script.js | 17 | The hour the happy hour starts (between 4 and 8 pm). |
TO | script.js | 19 | The hour it ends. |
STAGGER | script.js | 0.09 | The delay between one price and the next when they change. |
GLOW | script.js | 1 | How strong the warm light is: 0 = none, 1.6 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer drags the time into and out of the happy hour. |
On the site or app of a bar, a pub, a restaurant with aperitivo or a hotel with a bar: in the menu, where prices change at certain hours. On a real site the time is now and the slider is not there, or is used to show what changes.
The same card, as wide as the screen minus the margins: the knob drags with a finger on a strip 32 pixels tall, the drink rows are 46 tall and long descriptions are cut with an ellipsis.
No rolling prices and no light rising slowly: crossing the start or the end, band, state, prices and struck price change in one step. The knob still drags. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.2 KB; the libraries: GSAP 28 KB.
Tested on 24 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.
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.