Skip to content
animorio
IT
Back to the library

The accordion wordmark

Text, HoverGSAPMediumCompressed weight: Demo 3.4 KBGSAP 28 KBFreeDownload the zip

The monogram «Q.» opens like an accordion into the full word: the gap widens pushing the full stop along, and the middle letters rise from below the line in random order.

Rebuilt from scratch studying noth.in by Thomas Carré, Pierre Patrault: the idea is theirs; code, copy and images are ours. Read how it’s made

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>
<!--
  "The accordion wordmark" 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="it">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Il marchio a fisarmonica</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <header class="testa">
    <!-- il marchio piccolo della testata: la sigla si apre nella parola intera -->
    <button class="marchio marchio--piccolo" type="button" data-marchio="Quasi.">Quasi.</button>
    <p class="testa__nota">Studio di grafica</p>
  </header>

  <main class="eroe">
    <!-- lo stesso marchio alla misura di un titolo -->
    <button class="marchio marchio--grande" type="button" data-marchio="Quasi." data-autoclic>Quasi.</button>
    <p class="eroe__nota">Passa sopra il marchio, o toccalo.</p>
  </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.

12 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 “The accordion wordmark” 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

At rest the wordmark is just the monogram, the first letter and the full stop. Hover it and the gap between them widens to the full word, pushing the full stop to the right; meanwhile the middle letters rise from below the line, each in its own mask, in a different order every time. On leaving, the letters drop, still in random order, and the gap closes. If you change your mind halfway, the gesture restarts from where it got to.

How it works

Three pieces

The script splits the word into monogram, middle letters and full stop. The middle letters sit in a flex container with overflow: clip, zero wide at rest: the full stop sits right after the monogram and follows the widening gap by itself.

The gap

The container’s width goes from zero to the sum of the letter masks in 0.7 seconds on power4.inOut. At the end it goes back to «auto», so if the window changes size the open word adapts; before closing it is set back to pixels so it can animate.

The letters

Each letter sits in a mask that clips only vertically and rises from yPercent 110 to 0 in 0.6 seconds, 60 milliseconds after the previous one, starting at 0.35 seconds. The order is reshuffled every time with gsap.utils.shuffle: the wordmark never opens the same way twice.

Interruptions

Every gesture kills the running sequence and builds a new one from where things are: if the gap is already open only the letters rise, without waiting; a letter already up does not start again. With a mouse hovering drives it, with a finger or the keyboard a click does.

Values to change

NameFileDefaultWhat it changes
APREscript.js0.7Seconds for the gap to widen or close.
SALEscript.js0.6Seconds for each letter to rise or drop.
SFASA_SUscript.js0.06Seconds between letters when they rise (when they drop it is SFASA_GIU, 0.08).
RITARDOscript.js0.35How many seconds into the opening the letters start.

Try them in the Playground

When to use it

For the header wordmark of a site with a strong monogram: at rest it takes little room, on hover it introduces itself in full. It also works large, as the title of the first screen.

On phones

Without hover the wordmark opens and closes on tap. The first time it comes into view it opens by itself and closes after a couple of seconds, to show it is there.

With reduced motion

No rising letters and no accordion: the word appears and disappears with a two-tenths-of-a-second fade, and it does not open by itself.

Pitfalls

  • With tight letter spacing the side of a letter leaves its box: the mask must clip only vertically (overflow-x: visible, overflow-y: clip), or the letters lose their right edge.
  • Measure the open word by adding up the masks, not with the closed container’s scrollWidth: with overflow: clip it is not a scroll area and the measure is unreliable.
  • Letters inside a zero-wide flex container would shrink: flex: none.
  • With a mouse, a click must not repeat what hovering already did: check the type of the last pointerdown.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 3.4 KB; the libraries: GSAP 28 KB.

Testing

Tested on 27 September 2026

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

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