
Speeding marquee
Scroll, Text, Hover
The home page opening of Trafila, a made-up fresh pasta bar, in the premium style of Dribbble shots: the top bar with the wordmark, the links and Book a table, then the big variable title ‘Today we roll tagliatelle.’. The last word is the pasta of the day: picking another day in the day strip, its letters fly off one by one and the new pasta rises letter by letter, heavy and soft, and settles to its weight; the red full stop hops away and drops back at the end of the word with a bounce, the sauce, the price and the plates left follow and a warm light crosses Book a table.
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>
<!--
"Pasta bar headline" 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>Trafila, fresh pasta bar: the pasta of the day</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full-italic.css">
<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 of the home page of a made-up fresh pasta bar, Trafila: the top bar with the wordmark, the links and
Book a table, then the big variable title "Today we roll tagliatelle." The last word is the pasta of the day:
picking another day in the strip below, its letters drop out one by one and the new pasta rises letter by
letter, heavy and soft, and settles to its weight; the full stop slides after it on a spring, the sauce line,
the price and the plates left follow, and Book a table catches the light -->
<section class="site" data-site aria-label="Trafila, fresh pasta bar">
<span class="site__grain" aria-hidden="true"></span>
<span class="site__glow" data-glow aria-hidden="true"></span>
<header class="bar" data-bar>
<a class="brand" href="#" aria-label="Trafila home">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12" r="9.2"></circle>
<circle cx="12" cy="12" r="2.3"></circle>
<circle cx="12" cy="5.9" r="1.25"></circle><circle cx="17.3" cy="9" r="1.25"></circle><circle cx="17.3" cy="15" r="1.25"></circle>
<circle cx="12" cy="18.1" r="1.25"></circle><circle cx="6.7" cy="15" r="1.25"></circle><circle cx="6.7" cy="9" r="1.25"></circle>
</svg>
<span class="brand__name">Trafila</span>
</a>
<nav class="links" aria-label="Main">
<a href="#">Menu</a><a href="#">Wine</a><a href="#">Visit</a>
</nav>
<button class="book" type="button" data-book>
<span class="book__face">
<span class="book__light" data-light aria-hidden="true"></span>
<span class="book__txt" data-booktxt>Book a table</span>
<svg class="book__icon" viewBox="0 0 16 16" aria-hidden="true"><rect x="2.6" y="3.4" width="10.8" height="10" rx="2.4"></rect><path d="M2.6 6.8h10.8M5.6 2v2.6M10.4 2v2.6"></path></svg>
</span>
</button>
</header>
<div class="hero">
<p class="eyebrow" data-eyebrow><span>Fresh pasta bar</span><span class="eyebrow__sep" aria-hidden="true"></span><span>Porta Romana, Milan</span></p>
<h1 class="title" data-title aria-live="polite">
<span class="title__line"><span class="w" data-w>Today</span> <span class="w" data-w>we</span> <span class="w" data-w>roll</span></span>
<span class="title__line title__line--pasta"><span class="pasta" data-pasta></span><span class="stop" data-stop aria-hidden="true"><span class="stop__in">.</span></span></span>
</h1>
<p class="sauce" data-sauce><span class="sauce__in" data-saucein></span></p>
<div class="foot" data-foot>
<div class="days" data-days role="tablist" aria-label="Pasta of the day">
<span class="days__thumb" data-thumb aria-hidden="true"></span>
</div>
<div class="meta">
<p class="price"><span class="price__cur">€</span><span class="price__n" data-price><span class="price__roll" data-roll></span></span></p>
<p class="left">
<span class="left__txt"><span data-left>38</span> plates left</span>
<span class="left__bar" aria-hidden="true"><span class="left__fill" data-fill></span></span>
</p>
</div>
</div>
</div>
</section>
<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.
29 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 “Pasta bar headline” from Animorio and fit it into my siteThe pasta of the day sits in an inline-block box holding an invisible span with the word already at its final weight: its width is read, the box goes there on a back.out spring and the full stop right after follows it. The real letters live in an absolute layer above, so old and new ones can share the line for a moment.
Each letter has font-weight and the SOFT axis of Fraunces on two CSS variables, --w and --s: GSAP takes them from 760 and 100 to 420 and 40 with power3.out, while the upward move uses back.out. The two offset curves bring the letter to its place first and to its weight after, like a stamp drying.
While the word changes the full stop rises and fades; it falls back with bounce.out once the last letter has landed, worked out from the number of letters and the stagger. So it is never on top of a letter still rising.
| Name | File | Default | What it changes |
|---|---|---|---|
SWAP | script.js | 0.7 | How long the pasta word takes to recompose, in seconds. |
STAGGER | script.js | 0.035 | The gap between one letter and the next, in seconds. |
HEAVY | script.js | 760 | The weight the new letters rise with, before they settle. |
SETTLE | script.js | 420 | The weight the pasta word settles to. |
SPRING | script.js | 1.3 | How far the word overshoots its width before it stops. |
PAUSE | script.js | 2.2 | Left alone: how many seconds it stays on each day. |
LOOP | script.js | true | Left alone, a pointer picks a few days and books a table. |
--accent | style.css | #c8462b | The tomato red of the full stop, of Today and of the plates line. |
--light | style.css | #f3c36b | The warm light that crosses Book a table. |
--paper | style.css | #fbf7f0 | The paper of the page. |
For the home page opening of a restaurant, a pasta bar, a trattoria or a bar that changes its dish every day: the title says at once what is on today, and whoever looks at the other days sees the dish, the price and how many are left, with booking one step away.
The same animation with adapted measures: the window is sized on width and height together, the bar links go below 420 pixels and the days are tapped with a finger; the price and plates wrap if there is no room.
No movement: the pasta word, the sauce and the price change with a fade, the day pill and the plates line are at once in place and Book a table changes label without sliding.
GSAP 3.15.0, Fraunces (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.0 KB; the libraries: GSAP 28 KB.
Tested on 16 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.