Skip to content
animorio
IT
Back to the library

Scroll data ring

Scroll, SVGGSAP, CSS onlyMediumCompressed weight: Demo 11 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The data section of The Open Doors Survey, a made-up foundation’s survey of small towns: a sticky stage opens a window that grows with the scroll to the full screen, then three slides of findings rise from below while their inside moves the other way. On each one the infographic is driven by the scroll: a thin ring draws to 67% as it turns, the lime pill pops and widens, the figure rises; ten dots come round, four bars grow. The graphics follow the scroll through a spring and settle when you stop. Inspired by the Where Opportunity Takes Root site.

Rebuilt from scratch studying opportunity.waltonfamilyfoundation.org by Gladeye: 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>
<!--
  "Scroll data ring" 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>The Open Doors Survey · Larkfield Foundation</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz-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>
  <!-- The data section of a made-up survey report: a sticky stage opens a window onto three slides of findings. Each
       slide rises from below while its inside stays still (counter-motion); on top, a thin ring draws to the figure,
       the lime pill pops and widens, the dots come round, the bars grow, all driven by the scroll. -->
  <section class="corsa" data-corsa>
    <div class="palco" data-palco>

      <div class="apertura" data-apertura>
        <p class="apertura__sopra" data-sopra>The Open Doors Survey 2026</p>
        <h1 class="apertura__titolo" data-titolo-apertura>How close is an <em>open</em> door?</h1>
        <p class="apertura__sotto" data-sotto-apertura>What 4,180 adults in 212 small towns told us about the places that keep a town open after six.</p>
        <p class="invito" data-invito aria-hidden="true"><span>Scroll</span><svg viewBox="0 0 12 16"><path d="M6 1v13M1.5 9.5 6 14l4.5-4.5" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/></svg></p>
      </div>

      <div class="finestra" data-finestra>
        <div class="finestra__dentro" data-finestra-dentro>

          <article class="lastra lastra--a" data-lastra>
            <div class="lastra__dentro" data-lastra-dentro>
              <div class="fondo" data-fondo><span class="fondo__luce"></span><svg class="fondo__giri" viewBox="0 0 400 400" aria-hidden="true"><circle cx="200" cy="200" r="60"/><circle cx="200" cy="200" r="100"/><circle cx="200" cy="200" r="140"/><circle cx="200" cy="200" r="180"/><circle cx="200" cy="200" r="220"/><circle cx="200" cy="200" r="260"/></svg><span class="fondo__grana"></span></div>
              <div class="lastra__corpo">
                <div class="grafico" data-grafico="anello">
                  <svg class="grafico__svg" viewBox="0 0 200 200" aria-hidden="true">
                    <circle class="anello__binario" cx="100" cy="100" r="80" pathLength="1" data-binario/>
                    <g data-ruota><circle class="anello__arco" cx="100" cy="100" r="80" pathLength="1" data-arco/></g>
                    <line class="anello__tacca" x1="100" y1="12" x2="100" y2="28" data-tacca/>
                  </svg>
                  <div class="grafico__centro" data-centro>
                    <span class="cifra"><span class="cifra__dentro" data-cifra><b data-percento>67</b><i>%</i></span></span>
                    <span class="pillola-dato" data-pillola-dato><span class="pillola-dato__testo" data-pillola-testo>a 15-minute walk</span></span>
                  </div>
                </div>
                <div class="testo">
                  <p class="testo__capitolo">Libraries</p>
                  <h2 class="testo__titolo" data-titolo><span data-percento-titolo>67%</span> <em>of</em> small-town adults</h2>
                  <p class="testo__frase" data-frase>live within a fifteen-minute walk of a public library that stays open after six.</p>
                </div>
              </div>
            </div>
          </article>

          <article class="lastra lastra--b" data-lastra>
            <div class="lastra__dentro" data-lastra-dentro>
              <div class="fondo" data-fondo><span class="fondo__luce"></span><svg class="fondo__giri" viewBox="0 0 400 400" aria-hidden="true"><circle cx="200" cy="200" r="60"/><circle cx="200" cy="200" r="100"/><circle cx="200" cy="200" r="140"/><circle cx="200" cy="200" r="180"/><circle cx="200" cy="200" r="220"/><circle cx="200" cy="200" r="260"/></svg><span class="fondo__grana"></span></div>
              <div class="lastra__corpo">
                <div class="grafico" data-grafico="punti">
                  <svg class="grafico__svg" viewBox="0 0 200 200" aria-hidden="true">
                    <circle class="anello__binario" cx="100" cy="100" r="80" pathLength="1" data-binario/>
                    <g data-giro-punti></g>
                  </svg>
                  <div class="grafico__centro" data-centro>
                    <span class="cifra"><span class="cifra__dentro" data-cifra><b data-sette>7</b><i class="cifra__in">in</i><b>10</b></span></span>
                    <span class="pillola-dato" data-pillola-dato><span class="pillola-dato__testo" data-pillola-testo>close to home</span></span>
                  </div>
                </div>
                <div class="testo">
                  <p class="testo__capitolo">Evening classes</p>
                  <h2 class="testo__titolo" data-titolo><span data-sette-titolo>7</span> <em>in</em> 10 adults</h2>
                  <p class="testo__frase" data-frase>would sign up for an evening class if one were taught in their own town.</p>
                </div>
              </div>
            </div>
          </article>

          <article class="lastra lastra--c" data-lastra>
            <div class="lastra__dentro" data-lastra-dentro>
              <div class="fondo" data-fondo><span class="fondo__luce"></span><svg class="fondo__giri" viewBox="0 0 400 400" aria-hidden="true"><circle cx="200" cy="200" r="60"/><circle cx="200" cy="200" r="100"/><circle cx="200" cy="200" r="140"/><circle cx="200" cy="200" r="180"/><circle cx="200" cy="200" r="220"/><circle cx="200" cy="200" r="260"/></svg><span class="fondo__grana"></span></div>
              <div class="lastra__corpo">
                <div class="grafico grafico--barre" data-grafico="barre">
                  <svg class="grafico__svg" viewBox="0 0 200 200" aria-hidden="true">
                    <line class="barre__base" x1="46" y1="160" x2="186" y2="160"/>
                    <line class="barre__media" x1="50" y1="64" x2="186" y2="64" data-media/>
                    <g data-barre></g>
                  </svg>
                </div>
                <div class="testo">
                  <p class="testo__capitolo">Internet</p>
                  <h2 class="testo__titolo" data-titolo><span data-rurale-titolo>48%</span> <em>of</em> rural homes</h2>
                  <p class="testo__frase" data-frase>have internet fast enough for a video call. In large metros it is 72%.</p>
                </div>
              </div>
            </div>
          </article>

        </div>
      </div>

      <header class="testa" data-testa>
        <p class="marca"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 18V8.5" /><path d="M10 11.5C10 8 7.6 5.8 4 5.8c0 3.4 2.4 5.7 6 5.7Z"/><path d="M10 9.5c0-3.3 2.2-5.5 5.8-5.5 0 3.3-2.3 5.5-5.8 5.5Z"/></svg><span>Larkfield Foundation</span></p>
        <a class="condividi" href="#" data-condividi><span class="condividi__fondo"></span><span class="condividi__parole"><span>Share</span><span aria-hidden="true">Share</span></span><svg class="condividi__segno" viewBox="0 0 12 12" aria-hidden="true" data-segno><path d="M6 1.5v9M1.5 6h9" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round"/></svg></a>
      </header>

      <nav class="capitoli" data-capitoli aria-label="Findings">
        <span class="capitoli__voce" data-voce>Libraries</span>
        <span class="capitoli__voce" data-voce>Evening classes</span>
        <span class="capitoli__voce" data-voce>Internet</span>
        <span class="capitoli__segno" data-segno-capitolo></span>
      </nav>
      <p class="nota" data-nota>Larkfield Foundation, The Open Doors Survey: 4,180 adults in 212 towns, 2026.</p>
    </div>
  </section>

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

58 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 “Scroll data ring” 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 the top the Larkfield Foundation mark and the Share pill. On a paper page the question «How close is an open door?» comes in word by word, and under it a small window onto a teal field. As you scroll the window grows to fill the screen, never stretching what is inside, and the top bar turns light. On the first slide a thin ring draws to 67% as it turns, a lime pill pops, widens and writes «a 15-minute walk», the figure rises from below; next to it the title and the line come in word by word. Then the second slide, olive, rises from below while its content stays still: ten dots come round, seven full and three empty. The third, blue, grows four bars, with the national average dashed. At the bottom the names of the three slides, with the lime mark sliding under the current one.

How it works

The stage and the count in screens

A single ScrollTrigger on the section: its progress becomes a number of screens. The window opens over the first screen, each slide takes a screen and a half and the section is as tall as it needs.

The window that opens

The window scales from 0.36 to 1 while its inside scales from 1/0.36 to 1: the two scales cancel out and the content never stretches. The corner radius is divided by the scale, so it stays 18 real pixels and goes to zero.

The wipe with counter-motion

The new slide goes from yPercent 100 to 0 and its inside from -100 to 0 at the same time: the edge rises, the content stays still and is uncovered. The field behind grows from 1.2 to 1.3 and drifts a little.

Graphics driven by the scroll

Each graphic has its own stretch of scroll, like a Lottie moved frame by frame: the track draws, the pill pops with back.out and widens, the arc with pathLength 1 draws to 67% while turning from -180 to 61 degrees, the figure rises from a mask.

The spring

The graphics do not read the scroll directly: they follow it with a spring in the GSAP ticker (stiffness 120, damping 0.7). When you stop they settle with a hair of overshoot, the arc goes a breath past 67% and comes back.

The words

Titles and lines are split into words inside a mask: they rise from yPercent 100 turning 5 degrees from the foot, 0.025 seconds apart, in 0.75 seconds on back.out(1.7), when the slide becomes the current one; the one before fades out.

Values to change

NameFileDefaultWhat it changes
PERCENTscript.js67The figure of the first slide: the ring draws to this share.
RING_FROMscript.js-180The degrees the ring is turned when it starts drawing.
RING_TOscript.js61The degrees the ring is turned at the end.
YES_IN_TENscript.js7The filled dots out of ten on the second slide.
RURALscript.js48The rural bar of the third slide, in percent.
SLIDE_SCREENSscript.js1.5How many screens of scroll each slide takes.
OPEN_SCREENSscript.js1How many screens of scroll the window takes to open.
WINDOW_FROMscript.js0.36How big the window is before it opens, as a share of the screen.
SPRINGscript.js120The stiffness of the spring the graphics follow the scroll with.
DAMPINGscript.js0.7The damping of the spring: lower means more overshoot when you stop.
PARALLAX_FROMscript.js1.2The scale of the field behind a slide when it arrives.
PARALLAX_TOscript.js1.3The scale of the field behind a slide when it leaves.

Try them in the Playground

When to use it

For the data section of an annual report, a piece of research or a foundation, or for a product’s numbers: a few strong figures, one per screen, that you understand as you scroll.

On phones

The graphic goes on top and the words below, centred; the graphic is sized on the smaller of 34% of the height and 58% of the width, the stage is 100lvh tall and the source note goes away. Scrolling with a finger does everything.

With reduced motion

The window is already open and the graphics are already drawn: as you scroll the slides change with a fade, with no wipe, no spring and no smooth scroll.

Pitfalls

  • An SVG ring that turns is turned with the transform attribute rotate(angle 100 100), the centre of the viewBox: a CSS transform on the group would turn it around another point.
  • With pathLength 1 and an animated stroke-dashoffset autoRound must be off, or GSAP rounds to 0 or 1 and the arc appears all at once.
  • A pill that widens stays centred only if its words are out of the flow (position absolute): a nowrap label in the flow would keep it wide from the start.
  • The window and its inside need the same transform-origin, or the content slides while the window opens.

Libraries

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

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

Testing

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