Skip to content
animorio
IT
Back to the library

Terms of service window

Text, ScrollGSAP, CSS onlyMediumCompressed weight: Demo 6.7 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The terms of service window of Kinfold, a made-up family photo backup app, in the clean style of the interface pieces: the window stays still in the middle and scrolling the page reads the terms inside it. The plain lines stay light grey; the four sentences that really matter take weight and ink as they cross the reading line, a soft green highlight sweeps under them and the key points counter at the top rolls. At the end the lock on the I agree button opens, and the button fills and wakes up. Scrolling back closes it all again.

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>
<!--
  "Terms of service window" 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>Kinfold, terms of service</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/instrument-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the terms of service window of a made-up family photo backup app, Kinfold. A sticky stage with the window in the
       middle: scrolling the page reads the terms inside it. The plain lines stay light; the four sentences that matter
       take weight and ink as they cross the reading line, a soft highlight sweeps under them and the counter of key
       points in the header rolls. The thin track on the right follows the reading. At the end the fade at the bottom
       goes, the lock of the I agree button opens and the button fills and wakes up. Scrolling back closes it again -->
  <section class="corsa" data-corsa>
    <div class="palco">
      <div class="finestra" role="dialog" aria-labelledby="titolo-termini">
        <header class="testa">
          <span class="marchio" aria-hidden="true">
            <svg viewBox="0 0 20 20"><path d="M10 2.4 16.8 6v8L10 17.6 3.2 14V6z"/><path d="M10 2.4V10l6.8-4M10 10l-6.8-4M10 10v7.6"/></svg>
          </span>
          <div class="testa__testi">
            <h1 class="testa__titolo" id="titolo-termini">Terms of Service</h1>
            <p class="testa__sotto">Kinfold · updated Nov 2026 · 3 min read</p>
          </div>
          <p class="punti" aria-live="polite">
            <span class="punti__ruota" aria-hidden="true"><span class="punti__colonna" data-colonna><span>0</span><span>1</span><span>2</span><span>3</span><span>4</span></span></span>
            <span class="punti__di">of 4 key points</span>
          </p>
        </header>

        <div class="lettura" data-lettura>
          <div class="testo" data-testo>
            <p>These terms cover how you use Kinfold, the photo backup for families. By creating an account you agree to them. We wrote them to be read, not skimmed.</p>
            <p><span class="chiave" data-chiave>Your photos stay yours. We never claim ownership of anything you upload.</span></p>
            <p>To store and show your library we need a licence to copy, resize and back up your files, only to run the service for you and the people you share with.</p>
            <p><span class="chiave" data-chiave>We never sell your data, and we never use your photos to train models.</span></p>
            <p>Shared albums are visible to the people you invite. You can remove someone at any time, and their access ends at once.</p>
            <p><span class="chiave" data-chiave>You can export everything, or delete your account, in two taps.</span></p>
            <p>Plans renew each month until you cancel. Prices can change, always with thirty days' notice by email.</p>
            <p><span class="chiave" data-chiave>Cancel anytime: you keep access until the end of the period you paid for.</span></p>
            <p>If something goes wrong, write to us first. Most problems are solved in a single reply.</p>
            <p class="testo__fine">End of terms</p>
          </div>
          <span class="riga-lettura" data-riga aria-hidden="true"></span>
          <span class="velo" data-velo aria-hidden="true"></span>
          <span class="binario" aria-hidden="true"><span class="binario__pomo" data-pomo></span></span>
        </div>

        <footer class="piede">
          <button class="tasto tasto--vuoto" type="button">Decline</button>
          <button class="tasto tasto--pieno" type="button" data-accetta disabled>
            <span class="tasto__luce" data-luce aria-hidden="true"></span>
            <svg class="lucchetto" viewBox="0 0 16 16" aria-hidden="true">
              <path class="lucchetto__arco" data-arco d="M5 7.2V5.4a3 3 0 0 1 6 0v1.8"/>
              <rect x="3.4" y="7.2" width="9.2" height="6.6" rx="1.8"/>
            </svg>
            <span class="tasto__scritte">
              <span class="tasto__scritta" data-prima>Read to the end</span>
              <span class="tasto__scritta tasto__scritta--dopo" data-dopo>I agree</span>
            </span>
          </button>
        </footer>
      </div>
      <p class="nota" data-nota>Scroll to read</p>
    </div>
  </section>
  <footer class="fondo-pagina">Kinfold is a made-up product.</footer>

  <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="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.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.

36 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 “Terms of service window” 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 paper-coloured ground sits the white terms of service window of Kinfold, a made-up family photo backup app, with a soft layered shadow. At the top the green logo, the title Terms of Service, the line Kinfold · updated Nov 2026 · 3 min read and a light green pill that says 0 of 4 key points. In the middle the text of the terms in light grey, a thin green reading line on the left edge, a grey track on the right and a white fade at the bottom; below, the Decline and Read to the end buttons, grey, with the lock closed. Scrolling the page, the window stays still and the text rises inside it, with the thumb of the track following. When one of the four sentences that matter (your photos stay yours, no selling of data, export and delete in two taps, cancel anytime) crosses the reading line, it takes weight up to semibold and turns black, a light green highlight sweeps under it from left to right, the reading line stretches for a moment and the number in the pill rolls to the next. At the end the fade goes, the thumb turns green, the shackle of the lock lifts and turns, the button fills with black, the label rolls to I agree and the button swells by a hair and settles. Pressed, it squashes and says Agreed, thank you. Scrolling back closes it all again.

How it works

The still window, the moving text

The section is three screens tall and the stage stays still with position: sticky. A paused GSAP timeline moves the text up inside the window by as much as it is taller than the reading area, and ScrollTrigger plays it with scrub: you scroll the page, but it feels like reading inside the window.

Each key sentence knows when it is read

For each sentence the middle is measured inside the text and the script works out at which point of the scroll it crosses the reading line: there the timeline raises the weight of the variable font (a CSS variable animated by GSAP), changes the colour and widens the highlight with background-size from 0 to 100%.

The counter and the track

The key points number is a column of digits that moves up by a fifth for each sentence read, with a small overshoot; the thumb of the track goes down with the text and at the end takes the accent colour.

The button that unlocks

At the end of the timeline the shackle of the lock lifts and turns around its right leg (svgOrigin), a dark layer fills the button, the two labels roll and the button swells and settles on a spring. A check on the timeline time removes disabled only once you reach the end.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole text takes: 2 is twice as long.
SCRUBscript.js0.5How far the reading lags behind the scroll, in seconds.
KEY_WEIGHTscript.js640The weight the key sentences reach (400 is the plain text).
HIGHLIGHTscript.js1How strong the highlight under the key sentences is (0 none).
READING_LINEscript.js0.42Where the reading line sits in the window, from the top.

Try them in the Playground

When to use it

For a terms, privacy or agreement window in an app or a site that wants them actually read: a sign up, a subscription, a personal data service. The sentences that matter catch the eye and the button unlocks only at the end, without feeling like a trap.

On phones

The same animation with adapted measures: the window is sized on width and height and fits the stage, the text with clamp and vh; everything is measured again when the browser window changes.

With reduced motion

No motion: the text is already read to the end, with the key sentences bold and highlighted, the counter at 4 and the I agree button already unlocked, and the window appears with a fade.

Pitfalls

  • GSAP does not read CSS variables inside the colours to animate: the :root colours are read once with getComputedStyle and passed already resolved.
  • The positions of the sentences are in pixels: when the browser window changes, the timeline is rebuilt at the same point and ScrollTrigger is refreshed.
  • The font weight is animated through a CSS variable (--peso) used by font-weight: it needs a real variable font, otherwise it jumps from one weight to the next.
  • The highlight with background-size on an inline span wraps with it only with box-decoration-break: clone.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Instrument Sans (font variabile) 5.3.0.

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

Testing

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