Skip to content
animorio
IT
Back to the library

The sentence that comes together

Text, ScrollGSAPEasyCompressed weight: Demo 2.6 KBGSAP + ScrollTrigger 45 KBFreeDownload the zip

Scroll inside the preview

The words start scattered, rotated and each with its own weight and width; as you scroll they go back to their places and the sentence reads.

Rebuilt from scratch studying meermohsin.me by Meer Mohsin: 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 sentence that comes together" 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>La frase che si ricompone</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>
  <main>
    <section class="apertura">
      <p class="sopra">Manifesto</p>
      <p class="grande">Scorri: le parole sparse tornano al loro posto e la frase si legge.</p>
    </section>

    <section class="corsa">
      <div class="palco">
        <!-- data-accento: le parole che a frase ricomposta prendono il colore -->
        <p class="frase" data-frase>Non costruisco solo siti. Creo esperienze che <span data-accento>si ricordano,</span> dal primo sguardo all'ultimo dettaglio.</p>
      </div>
    </section>

    <section class="coda">
      <p class="grande">Ecco. Adesso torna su e guardala sparpagliarsi di nuovo.</p>
    </section>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.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.

14 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 sentence that comes together” 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

A sentence has exploded across the screen: the words are moved, rotated, some huge and some small, some wide and light, others narrow and heavy. As you scroll they return to their places one after another, with slightly different timings, and each word's type settles. When the sentence is whole, the important words take on colour.

How it works

One word, one span

The script splits the sentence into words without losing the spans inside it (here the accent one): every word is an inline-block, so it can be moved and rotated. Screen readers keep the whole sentence in aria-label.

Repeatable disorder

Starting offset, rotation, scale, width and weight come from a seeded number generator: the mess is the same on every visit, and changing SEME picks another one.

The variable font

Width and weight live in two CSS variables (--w and --g) used in font-variation-settings. GSAP animates the variables as numbers: every word goes from wdth 75-125 and wght 280-860 to the common value.

Staggered along the run

Everything is in one scrubbed timeline. Each word lasts 65% of the run and starts at a random point in the first 35%: they arrive in scattered order, and the last one closes the sentence.

Values to change

NameFileDefaultWhat it changes
SEMEscript.js7The starting disorder. Every number gives a different mess, always the same for that number.
SPARGIscript.js0.4How far the words start, as a fraction of the screen.
GIROscript.js38The maximum starting rotation, in degrees.
RITARDOscript.js0.35How much the words are staggered along the run.

Try them in the Playground

When to use it

For a manifesto sentence mid-page, the one you want people to actually read. One or two lines: with a whole paragraph it becomes noise.

On phones

It works the same: distances are fractions of the screen, so the disorder shrinks with it.

With reduced motion

The sentence is already together and still.

Pitfalls

  • Changing the font's width changes the word's width and moves the others: fine while they fly, but the final value must be the same for all of them, otherwise the reassembled sentence does not line up.
  • Put overflow clip on the stage: words moved off screen widen the page and a sideways scroll appears on phones.
  • With function values (x: () => ...) distances are recomputed on every ScrollTrigger refresh, but the generator moves on: if you need the same disorder after a resize too, compute the numbers once and store them.
  • Do not split the sentence with innerHTML: you lose existing spans and attributes. Walk the text nodes and replace only those.

Libraries

GSAP 3.15.0, ScrollTrigger (GSAP) 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 2.6 KB; the libraries: GSAP + ScrollTrigger 45 KB.

Testing

Tested on 26 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