
Speeding marquee
Scroll, Text, Hover
The breakfast card of a hotel room, the one you hang on the door, remade for the screen: a cream card with the hole for the handle. You tick what you want, pick the time with a white thumb sliding between four times and press “Hang on the door”: the card swings around its hole, less and less, and the button says when breakfast arrives.
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>
<!--
"Breakfast door hanger" 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>Breakfast in the room door hanger with the choices that tick and the swing on the handle</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 breakfast card of a hotel room, the one you hang on the door: you tick what you want, slide the time
and press; the card swings on its hole like on a handle and says when breakfast arrives -->
<section class="hang" data-hang aria-label="Breakfast in the room">
<span class="hang__hole" aria-hidden="true"></span>
<header class="hang__head"><span>Hotel Ardesia, room 214</span><h1>Breakfast in the room</h1></header>
<div class="items" data-items></div>
<div class="times" role="radiogroup" aria-label="Delivery time" data-times><span class="times__thumb" data-thumb aria-hidden="true"></span></div>
<button class="cta" type="button" data-cta aria-pressed="false">
<span class="cta__word roll"><span data-word>Hang on the door</span></span>
<span class="cta__n" data-n>1 item</span>
</button>
</section>
<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.
14 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 “Breakfast door hanger” from Animorio and fit it into my siteThe card rotates with its transform-origin on the centre of the hole (50% 30px). The sequence is written by hand like a damping pendulum: SWING degrees, then 62%, 36%, 18%, 7% and zero, each swing with sine.inOut and a little shorter than the one before; first, an 8-pixel hop.
Each row is a button with role checkbox: inside the box a green layer goes from scale 0 to 1 with back.out and the tick, a path with pathLength 1, draws itself with stroke-dashoffset a tenth of a second later.
The four times are a radiogroup (arrow keys). The white thumb is a quarter of the strip wide and moves with xPercent (100 per place), so nothing needs measuring; on the way it stretches to scaleX 1.18 and returns on a spring.
| Name | File | Default | What it changes |
|---|---|---|---|
FIRST | script.js | 7:00 | The first delivery time. |
STEP | script.js | 30 | The minutes between one time and the next (four times in all). |
PICK | script.js | 2 | The time chosen at the start (1 is the first). |
SWING | script.js | 9 | By how many degrees the card swings when it is hung. |
ACCENT | script.js | #1f6a4f | The colour of the ticks and of the button. |
LOOP | script.js | true | Left alone, a pointer chooses, hangs and starts again. |
For the site or app of a hotel, a bed and breakfast or a holiday home with breakfast brought to the room: the order on a single card, like the real one on the door. It also suits a small order with a time: lunch at the office, a picnic basket, beach service.
The same card, with hole, rows, times and button measured on the height too so it fits the box; everything is touched with a finger.
No swing, bounces or stretching thumb: ticks, time and button change in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.9 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.