
The inchworm menu
Menus, Hover, Transitions
The opening hours card of a bakery cafe, white on white, like a Dribbble shot: a small real photo of the bread counter on top, then the name and the status line, today's bar with the open hours filled and a thin ‘Now’ hand sliding on a spring, and the week in rows with today picked out. The pilot runs the day like a time-lapse: the status line changes on a spring from ‘Open now’ to ‘Closing soon’ to ‘Closed’, with a drawn sun, setting sun and moon, and the photo dims when the shop closes. Hovering a day, the bar shows its hours.
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>
<!--
"Opening hours card" 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 opening hours card with the time of now sliding by</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 opening hours card of a bakery cafe. A thin "Now" hand slides along today's bar (a time-lapse of the day):
the status line on top changes on a spring from open to closing soon to closed, with a small drawn sun,
a setting sun and a moon, and the photo of the shop dims when it closes. Hovering a day of the week, the bar
shows that day's hours -->
<section class="card" data-card aria-label="Opening hours, Morrow Bakehouse">
<figure class="photo" data-photo>
<div class="photo__move" data-photo-move>
<img src="bancone.webp" alt="Fresh loaves of bread on the counter of the bakery" width="960" height="720" decoding="async">
</div>
<span class="photo__dusk" data-dusk aria-hidden="true"></span>
<span class="photo__chip"><span>Bakery and cafe</span></span>
</figure>
<header class="head">
<span class="head__mark" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M5.2 15.6c0-4.6 3-8 6.8-8s6.8 3.4 6.8 8c0 1.3-.9 2.1-2.1 2.1H7.3c-1.2 0-2.1-.8-2.1-2.1z"/><path d="M9.4 10.6l1.3 3.2M12 9.7v3.6M14.6 10.6l-1.3 3.2"/></svg>
</span>
<span class="head__who">
<span class="head__name">Morrow Bakehouse</span>
<span class="status" data-status aria-live="polite">
<span class="status__icon" aria-hidden="true">
<svg viewBox="0 0 20 20">
<g class="ico ico--sun" data-ico="open">
<circle cx="10" cy="10" r="3.4"/>
<g class="ico__rays" data-rays><path d="M10 2.6v1.9M10 15.5v1.9M2.6 10h1.9M15.5 10h1.9M4.8 4.8l1.3 1.3M13.9 13.9l1.3 1.3M4.8 15.2l1.3-1.3M13.9 6.1l1.3-1.3"/></g>
</g>
<g class="ico ico--set" data-ico="soon">
<path d="M5.6 13.4a4.4 4.4 0 0 1 8.8 0"/>
<path d="M2.8 13.4h14.4M10 4.6v1.8M4.6 7.4l1.3 1.2M15.4 7.4l-1.3 1.2M6.6 16.4h6.8"/>
</g>
<g class="ico ico--moon" data-ico="closed">
<path d="M14.6 12.6A5.6 5.6 0 0 1 7.4 5.4a5.6 5.6 0 1 0 7.2 7.2z"/>
<path class="ico__star" d="M14.2 3.6v2.4M13 4.8h2.4"/>
</g>
</svg>
</span>
<span class="status__win"><span class="status__line" data-status-line><b>Open now</b>, closes at 19:00</span></span>
</span>
</span>
</header>
<div class="today" data-today>
<div class="today__top">
<span class="today__win"><span class="today__day" data-bar-day>Thursday</span></span>
<span class="today__win today__win--end"><span class="today__hours" data-bar-hours>7:00 – 19:00</span></span>
</div>
<div class="bar" data-bar aria-hidden="true">
<div class="bar__track">
<div class="bar__open" data-open><span class="bar__done" data-done></span><span class="bar__sheen"></span></div>
<span class="bar__shut" data-shut>Closed all day</span>
</div>
<div class="needle" data-needle>
<span class="needle__tag"><span class="needle__word">Now</span> <span data-now>9:00</span></span>
<span class="needle__line"></span>
</div>
</div>
<div class="ticks" data-ticks aria-hidden="true"></div>
</div>
<div class="week">
<span class="week__pill" data-pill aria-hidden="true"></span>
<ul class="week__list" data-week aria-label="Opening hours this week"></ul>
</div>
</section>
</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.
31 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 “Opening hours card” from Animorio and fit it into my siteHours, the hand and the open part live in minutes from midnight; one function turns them into a share of the bar (from DAY_FROM to DAY_TO) and, every frame, into pixels with the measured width. A ResizeObserver measures the bar and the pill again, so the card stays right even if the window changes mid-loop.
The pilot only moves the time (an object with t, tweened by GSAP); the hand chases it on a spring integrated by hand, stiffness 210 and damping 20, in two half steps per frame with the step capped at 1/30 s: during the time-lapse it trails the time slightly, and when it goes back to the morning it passes the mark and settles. The Now tag stays inside the bar near the ends.
Inside the open part sits the part already gone, from its left edge to the hand; the hour marks change class only when the hand passes them, so the DOM is touched only a few times.
The status comes from the time (open, closing soon, closed). When it changes, the old line turns absolute and leaves upwards in 0.3 s, the new one comes up from below with back.out(1.9); the old icon turns away and shrinks, the new one turns in with back.out(2.4), and a blue veil in multiply dims the photo's light.
Over a day (or with Tab, or a tap) the pilot stops: the pill slides onto the row on a spring, the day and hours over the bar roll, the ends of the open part go to the new hours with back.out(1.4) and the hand fades if it is not today. A closed day squeezes the open part into its middle. Leaving the week, after 2.4 s today comes back and the pilot starts again.
| Name | File | Default | What it changes |
|---|---|---|---|
TODAY | script.js | 3 | Which day is today: 0 = Monday, 6 = Sunday. |
DAY_FROM | script.js | 6 | The hour where today's bar starts. |
DAY_TO | script.js | 21 | The hour where it ends. |
SOON | script.js | 60 | How many minutes before closing it says Closing soon. |
TIMELAPSE | script.js | 7.5 | How many seconds the pilot takes to run the day from morning to night. |
STIFFNESS | script.js | 210 | The spring pulling the hand: higher is quicker. |
DAMPING | script.js | 20 | Lower lets the hand pass the mark and come back. |
HOLD | script.js | 1.3 | How many seconds the pilot stays on each day it shows. |
LOOP | script.js | true | Runs the day again and again. |
For the contact page or the listing of a place: a cafe, a bakery, a restaurant, a shop, a gym, a clinic. It says at a glance whether it is open now, how soon it closes and the hours for the whole week. Swap the photo in the HTML img (bancone.webp), the hours in the WEEK list of the script, the colours in :root.
The same animation with adapted sizes: the card is as wide as the screen minus the margins, and the photo, rows and gaps also follow the height, so it fits the phone box. A tap on a day does what hovering does.
Nothing moves: the hand jumps from one time to the next (morning, just before closing, evening), the status and hours lines and the icons change with a fade, the pill and the open part fade out and back in at their new place, and the photo stays still.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.2 KB; the libraries: GSAP 28 KB.
Tested on 5 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.