Skip to content
animorio
IT
Back to the library

Pasta bar headline

Text, HoverGSAP, CSS onlyMediumCompressed weight: Demo 9.0 KBGSAP 28 KBFreeDownload the zip

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.

The code

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">&euro;</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>&nbsp;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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a cream ground sits the home page window of Trafila, a made-up fresh pasta bar in Milan: warm paper with fine grain, soft layered shadows and a golden glow behind the title. At the top the bar: the mark, a drawn pasta die with a red hole, the name in Fraunces, the Menu, Wine and Visit links and the black Book a table pill with a calendar icon. Below are the line Fresh pasta bar, Porta Romana, Milan and the big variable title: Today we roll and, in italic, the pasta of the day, tagliatelle, with a red full stop. On first arrival the bar drops in, the three words rise from the line heavy and lighten, then the pasta rises letter by letter and the full stop falls and bounces. Under the title come the sauce of the day, the day strip from Tue to Sat with Today in red and a white pill that slides on a spring, the euro price that rolls and the plates left with a line that empties. Picking a day, the letters of the old pasta fly off one by one, tilting and losing weight, the full stop hops away, the word widens or narrows on a spring and the new letters rise from below heavy and soft and settle to their weight; the full stop drops back at the end of the word with a bounce, the sauce slides, the price rolls, the plates say Sold out for past days and plates ready for the next ones, and a band of warm light crosses Book a table. Under the pointer the light in Book a table follows it; pressing it the pill squeezes, comes back on an elastic and the label turns into 2 tables at 20:30, then back. Left alone, a drawn pointer picks Friday, Saturday and Wednesday, books a table and goes back to today.

How it works

A word as wide as the pasta

The 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.

The weight that settles

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.

The full stop that hops and falls

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.

Values to change

NameFileDefaultWhat it changes
SWAPscript.js0.7How long the pasta word takes to recompose, in seconds.
STAGGERscript.js0.035The gap between one letter and the next, in seconds.
HEAVYscript.js760The weight the new letters rise with, before they settle.
SETTLEscript.js420The weight the pasta word settles to.
SPRINGscript.js1.3How far the word overshoots its width before it stops.
PAUSEscript.js2.2Left alone: how many seconds it stays on each day.
LOOPscript.jstrueLeft alone, a pointer picks a few days and books a table.
--accentstyle.css#c8462bThe tomato red of the full stop, of Today and of the plates line.
--lightstyle.css#f3c36bThe warm light that crosses Book a table.
--paperstyle.css#fbf7f0The paper of the page.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • The word width can be read only after the Fraunces italic has loaded: document.fonts.ready is not enough, because the italic downloads only when something uses it. It is asked for with document.fonts.load for all the pastas at once, and remeasured on every loadingdone.
  • The full stop followed the width on its spring, but the heavy letters that have just risen are wider than settled ones and for a moment ran over it: now the full stop hops away and drops back once the last letter has landed.

Libraries

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.

Testing

Tested on 16 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All animations