Skip to content
animorio
IT
Back to the library

Bracket menu

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

The header of Velde, a made-up Swiss watchmaker: the menu links sit in square brackets, in a monospaced face, and every letter arrives by running through random characters. Under the pointer the letter goes dark and its two neighbours turn into other characters, then everything settles back; the open page holds its brackets tight, and [+] Menu unrolls the full list. Minimal style, inspired by the Prägen Hätlen site.

Rebuilt from scratch studying pragenhatlen.com by cher ami: 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>
<!--
  "Bracket menu" 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>Meridian 38 · Velde Horlogerie</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/manrope@5.3.0/index.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/red-hat-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- The header of Velde Horlogerie, a made-up watchmaker in La Chaux-de-Fonds. The links sit in square brackets,
       in a monospaced face. They arrive letter by letter through random characters; under the pointer the letter goes
       dark and its two neighbours turn into other characters, then everything settles back. The current page holds
       its brackets tight. [+] Menu opens the full list. -->
  <main class="palco" data-palco>
    <div class="griglia" aria-hidden="true"></div>

    <header class="testata" data-testata>
      <nav class="gruppo gruppo--sx" aria-label="Main">
        <a class="voce" href="#collection" data-voce data-nome="Collection"></a>
        <a class="voce" href="#atelier" data-voce data-nome="Atelier"></a>
      </nav>

      <a class="marchio" href="#top" aria-label="Velde Horlogerie, home">
        <span class="marchio__nome" data-marchio>VELDE</span>
        <span class="marchio__sotto" data-mono="Horlogerie"></span>
      </a>

      <div class="gruppo gruppo--dx">
        <a class="voce voce--lontana" href="#reserve" data-voce data-nome="Reserve"></a>
        <a class="voce voce--lontana" href="#faq" data-voce data-nome="FAQ"></a>
        <button class="apri" type="button" data-apri aria-expanded="false" aria-controls="indice">
          <span class="apri__par">[</span><svg class="apri__segno" viewBox="0 0 10 10" aria-hidden="true"><path class="apri__oriz" d="M1.5 5h7"/><path class="apri__vert" d="M5 1.5v7"/></svg><span class="apri__par">]</span>
          <span class="apri__testo" data-apri-testo>Menu</span>
        </button>
      </div>
      <i class="testata__riga" data-riga aria-hidden="true"></i>
    </header>

    <section class="apertura" data-apertura>
      <p class="mono" data-mono="[ The Meridian 38 ]"></p>
      <h1 class="titolo"><span class="riga"><span data-riga-titolo>Time, kept</span></span><span class="riga"><span data-riga-titolo>quietly.</span></span></h1>
      <p class="mono mono--piano" data-mono="Hand-finished. Forty pieces a year."></p>
    </section>

    <p class="scorri mono" data-mono="[ Scroll ]" aria-hidden="true"></p>

    <div class="indice" id="indice" data-indice aria-hidden="true">
      <ul class="indice__lista">
        <li class="indice__voce"><a href="#collection" data-indice-voce data-chiave="Collection"><span class="indice__nome"><span>Collection</span></span><span class="indice__tag mono" data-mono="[ Watches ]"></span></a></li>
        <li class="indice__voce"><a href="#atelier" data-indice-voce data-chiave="Atelier"><span class="indice__nome"><span>Atelier</span></span><span class="indice__tag mono" data-mono="[ The bench ]"></span></a></li>
        <li class="indice__voce"><a href="#reserve" data-indice-voce data-chiave="Reserve"><span class="indice__nome"><span>Reserve</span></span><span class="indice__tag mono" data-mono="[ Your piece ]"></span></a></li>
        <li class="indice__voce"><a href="#faq" data-indice-voce data-chiave="FAQ"><span class="indice__nome"><span>FAQ</span></span><span class="indice__tag mono" data-mono="[ Questions ]"></span></a></li>
      </ul>
    </div>
  </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.

22 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Bracket menu” 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 warm grey with a very faint grid, the header of Velde Horlogerie: Collection and Atelier on the left, the VELDE mark in the middle with «Horlogerie» under it, Reserve, FAQ and [+] Menu on the right; under it a line that grows from the centre, and in the middle of the page «Time, kept quietly.» rising line by line. The links are in Red Hat Mono, uppercase, in square brackets: on the way in every letter runs through random letters, figures and signs before landing on the real one, one after another. Moving the pointer along a word, the letter under it goes dark and the two beside it drop to half and turn into other characters; as it moves on, the word puts itself back together behind it. The link of the open page has tight brackets in slate, the others keep them loose and pale; on a click the new one's brackets close in with a one-pixel bounce and the link dips slightly. [+] Menu folds the plus into a minus, the label becomes Close and the whole list comes down like a blind: Collection, Atelier, Reserve, FAQ, large, with their tags scrambling in; it rolls back up one and a half times faster. When nobody touches it, the header plays by itself.

How it works

One letter, one span

Every word is split into inline-block spans 1ch wide: in a monospaced face a random character is exactly as wide as the real one, so the word never shifts while it scrambles.

The scramble

A GSAP tween takes a number from 0 to 1 and every 0.05 seconds writes a character from 0-9, A-Z and !@#$%^&*()_+-=/? into the span; from 82% on it writes the real one. On the way in it lasts 1.25 seconds, 0.25 seconds late and 0.03 apart from letter to letter.

The pointer on a word

On pointermove the letter whose centre is closest to the pointer goes to opacity 0 in 0.2 seconds and its two neighbours to 0.5 with a random character; the others come back to 1 and, if they had been changed, scramble for 0.4 seconds back to the real one.

The brackets of the open page

The two brackets move with a CSS variable, --g, in characters: translateX(calc(var(--g) * -1ch)) and its opposite. GSAP takes --g from 0.55 to 0 with back.out and the brackets' opacity follows it, so the width of the link never changes.

The full list

A paused timeline: clip-path from inset(0 0 100% 0) to inset(0) in 0.75 seconds, the names from yPercent 100 to 0, 0.1 apart and 0.35 seconds before the end; to close, the same timeline runs backwards at timeScale 1.5. The plus is a small SVG whose upright folds down to nothing.

Values to change

NameFileDefaultWhat it changes
ENTRYscript.js1.25Seconds each letter runs through random characters on the way in.
LETTER_GAPscript.js0.03The delay between one letter and the next.
FADEscript.js0.2Seconds for the letter under the pointer to go dark.
SETTLEscript.js0.4Seconds for the changed letters to settle back.
NEIGHBOURSscript.js1How many letters on each side turn into other characters.
MENU_OPENscript.js0.75Seconds for the full list to unroll.
LOOSEscript.js0.55How loose the other links' brackets stand, in characters.
ACCENTscript.js#52667eThe colour of the open page's brackets.
CHARSscript.js0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+-=/?The characters the letters run through.

Try them in the Playground

When to use it

For the header of a luxury brand, a watchmaker, a design studio or a technical product: when the menu should feel precise, like an instrument, and move without ever shifting the page.

On phones

Below 860 pixels Reserve and FAQ go away, below 620 Collection and Atelier too: the mark stays in the middle with [+] Menu, and the header plays by opening and closing the list. The title is sized on the smaller of 11vw and 13vh, the list names on 9vw and 8.4vh, so they fit in the short box.

With reduced motion

No scramble and no movement: the letters fade in already right, on hover the word just lightens, the open page's brackets change without moving and the list fades in and out.

Pitfalls

  • The scramble needs a monospaced face and spans 1ch wide: in a proportional face a W in place of an I widens the word and pushes the links beside it.
  • The brackets move with a CSS variable and a CSS transform, not with GSAP's transform: the link keeps its width and the header, centred with a minmax(0, 1fr) auto minmax(0, 1fr) grid, never moves a pixel.
  • The dark letter keeps its real character; the half ones do not: coming back to 1 only the changed ones scramble, otherwise the whole word would shiver on every pass.
  • Letter-spacing leaves a gap after the last letter and pushes the mark 4 pixels off centre: the letters are spans spaced with gap, not with letter-spacing.
  • When it plays by itself the header sends no fake events: it calls the same functions the pointer does, and stops for five seconds as soon as a person touches it.

Libraries

GSAP 3.15.0, Manrope (font variabile) 5.3.0, Red Hat Mono (font variabile) 5.3.0.

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

Testing

Tested on 3 December 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