Skip to content
animorio
IT
Back to the library

Security score

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

Scroll inside the preview

A scroll animation for the landing page of a made-up password manager, Keyline: the stage holds still and as you scroll a glass focus passes over the account's four security checks. At each one the switch snaps on with a spring, a light crosses the row, the points float up and the dial answers: the ticks light up from amber to mint and the score rolls on its digits from 42 to 100. At the end a beam of light runs around the panel.

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>
<!--
  "Security score" 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>Keyline security check</title>
  <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 product section of a made-up password manager, Keyline. The stage sticks while you scroll and the scroll walks
       a glass focus down the security check: each fix switches on with a spring, its points fly up to the dial, the
       ticks light up from amber to mint and the score rolls from 42 to 100. At the end a beam of light runs once
       around the panel. -->
  <main>
    <section class="check" data-check>
      <div class="stage" data-stage>
        <div class="aura" data-aura aria-hidden="true"></div>
        <div class="grain" aria-hidden="true"></div>

        <div class="words" data-words>
          <p class="words__brand">
            <svg class="words__logo" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.6 13.4 4v3.6c0 3.3-2.3 5.9-5.4 6.8-3.1-.9-5.4-3.5-5.4-6.8V4z"/><path d="M8 6.2v3.4"/></svg>
            Keyline <span>Security check</span>
          </p>
          <h2 class="words__title">Four switches to a perfect&nbsp;score.</h2>
          <p class="words__line">Scroll through your account. Every fix lights the dial and adds its points, until nothing is left open.</p>
        </div>

        <div class="frame" data-frame>
          <article class="panel" data-panel>
            <span class="panel__beam" data-beam aria-hidden="true"></span>
            <span class="panel__sheen" data-sheen aria-hidden="true"></span>

            <header class="head">
              <span class="head__icon" aria-hidden="true">
                <svg viewBox="0 0 16 16"><path d="M8 1.6 13.4 4v3.6c0 3.3-2.3 5.9-5.4 6.8-3.1-.9-5.4-3.5-5.4-6.8V4z"/><path d="M8 6.2v3.4"/></svg>
              </span>
              <div class="head__text">
                <p class="head__title">Account security</p>
                <p class="muted">mara.lind@keyline.app</p>
              </div>
              <span class="chip" data-chip><span class="chip__words" data-chip-words>At risk</span></span>
            </header>

            <div class="dial">
              <svg class="dial__svg" viewBox="0 0 220 122" aria-hidden="true">
                <defs>
                  <linearGradient id="arco" x1="0" y1="0" x2="1" y2="0">
                    <stop class="stop-risk" offset="0"/>
                    <stop class="stop-safe" offset="1"/>
                  </linearGradient>
                </defs>
                <g data-ticks></g>
                <path class="dial__track" data-track pathLength="1"/>
                <path class="dial__fill" data-fill pathLength="1" stroke="url(#arco)"/>
              </svg>
              <div class="dial__read">
                <p class="score" data-score aria-label="Security score 42 out of 100">
                  <span class="col col--h" data-col="2"><span class="col__strip"><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b><b>0</b></span></span><span class="col" data-col="1"><span class="col__strip"><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b><b>0</b></span></span><span class="col" data-col="0"><span class="col__strip"><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b><b>0</b></span></span>
                </p>
                <p class="dial__label" data-label>Security score</p>
              </div>
            </div>

            <ul class="list" data-list>
              <li class="focus" data-focus aria-hidden="true"></li>
              <li class="row" data-row data-points="20">
                <span class="row__sweep" aria-hidden="true"></span>
                <span class="row__icon" aria-hidden="true"><svg viewBox="0 0 16 16"><rect x="4.2" y="1.6" width="7.6" height="12.8" rx="1.8"/><path d="M7 12.2h2M6.4 5.6h3.2M6.4 7.8h3.2"/></svg></span>
                <span class="row__text"><b>Two-step sign in</b><small>Authenticator app</small></span>
                <span class="row__pts" data-pts aria-hidden="true">+20</span>
                <button class="toggle" type="button" role="switch" aria-checked="false" aria-label="Two-step sign in" data-toggle><span class="toggle__knob" data-knob><span class="toggle__cap"></span></span></button>
              </li>
              <li class="row" data-row data-points="14">
                <span class="row__sweep" aria-hidden="true"></span>
                <span class="row__icon" aria-hidden="true"><svg viewBox="0 0 16 16"><circle cx="5.2" cy="8" r="3"/><path d="M8.2 8h6M12.4 8v2.4M14.2 8v1.8"/></svg></span>
                <span class="row__text"><b>Passkey on this Mac</b><small>Sign in with Touch ID</small></span>
                <span class="row__pts" data-pts aria-hidden="true">+14</span>
                <button class="toggle" type="button" role="switch" aria-checked="false" aria-label="Passkey on this Mac" data-toggle><span class="toggle__knob" data-knob><span class="toggle__cap"></span></span></button>
              </li>
              <li class="row" data-row data-points="10">
                <span class="row__sweep" aria-hidden="true"></span>
                <span class="row__icon" aria-hidden="true"><svg viewBox="0 0 16 16"><rect x="1.8" y="3.4" width="12.4" height="9.2" rx="1.8"/><path d="M2.6 4.6 8 8.6l5.4-4"/></svg></span>
                <span class="row__text"><b>Recovery email</b><small>Verify a backup address</small></span>
                <span class="row__pts" data-pts aria-hidden="true">+10</span>
                <button class="toggle" type="button" role="switch" aria-checked="false" aria-label="Recovery email" data-toggle><span class="toggle__knob" data-knob><span class="toggle__cap"></span></span></button>
              </li>
              <li class="row" data-row data-points="14">
                <span class="row__sweep" aria-hidden="true"></span>
                <span class="row__icon" aria-hidden="true"><svg viewBox="0 0 16 16"><path d="M13.2 8a5.2 5.2 0 1 1-1.6-3.8"/><path d="M12.2 1.8v2.8H9.4"/></svg></span>
                <span class="row__text"><b>Rotate reused passwords</b><small>3 logins share one</small></span>
                <span class="row__pts" data-pts aria-hidden="true">+14</span>
                <button class="toggle" type="button" role="switch" aria-checked="false" aria-label="Rotate reused passwords" data-toggle><span class="toggle__knob" data-knob><span class="toggle__cap"></span></span></button>
              </li>
            </ul>
          </article>
        </div>
      </div>
    </section>
    <p class="sr" aria-live="polite" data-live></p>
  </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="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.

68 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 “Security score” 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 near black page, to the right of a headline (‘Four switches to a perfect score.’), a dark panel with round corners rises: at the top the Keyline shield, ‘Account security’, the account's address and an amber ‘At risk’ label. Below, a horseshoe dial made of 41 thin ticks with a finer arc inside, and in the middle the score, 42, with ‘Security score’. At the bottom four rows with their drawn icons and switches off: Two-step sign in, Passkey on this Mac, Recovery email, Rotate reused passwords. As you scroll a light glass focus settles on the first row; there the switch snaps: the knob stretches as it leaves, lands a hair past the mark and settles, the track turns mint, the icon takes the colour, a light crosses the row and ‘+20’ floats up and fades. Meanwhile the score rolls like an odometer to 62, the ticks light up one by one from amber to mint, the leading one stands taller and paler and then settles, and the label turns to ‘Fair’. The focus glides to the next row and so on: 76 ‘Good’, 86, 100 ‘Strong’, with the hundreds digit opening up and pushing the others aside. At the end the focus fades, the words under the number become ‘Fully protected’, a mint and white beam runs once around the panel's edge and the light behind it, amber at first, has turned green. Scrolling back undoes it all.

How it works

A still stage and a timeline

The section is 420vh tall and the stage inside is sticky at 100lvh. A paused GSAP timeline, tied to the scroll by ScrollTrigger with scrub 0.6, moves only the continuous things: the glass focus from row to row, the beam on the edge, the panel's sheen and its slight lift.

Thresholds trigger the states

The switches are not dragged by the scroll: on every update the code counts how many thresholds the timeline has passed and switches on or off only the rows that changed. So each snap is a real spring (back.out) that plays whole even on a slow scroll, and scrolling back reverses it.

A dial drawn by code

The 41 ticks are SVG lines placed along a 200 degree arc, each with its own colour between amber and mint. On every frame of the score the ones under the value light up and the leading one grows 4 units longer and paler; the thin arc is the same path with pathLength 1 and stroke-dashoffset.

Odometer digits

Each digit is a column from 0 to 9 plus a final 0, moved in em. The units use the fractional value, the tens add the part of the units past 9, so they roll only when they must; the hundreds column has zero width and opens between 99 and 100.

One colour for everything

The score mixes amber and mint into --score: the label, the Keyline icon and the blurred light behind the panel take it, and that light grows stronger too. The final beam is a conic-gradient on a 1px edge cut out with a mask, turned with the --a variable.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole check takes: 2 is twice as long.
STARTscript.js42The score before any fix; the four rows share the rest up to 100.
ROLLscript.js0.9Seconds the score takes to roll to its new value.
BOUNCEscript.js1.4How far the switches overshoot when they snap.
GLOWscript.js1How strong the light behind the panel is: 0 none.
BEAMscript.js11: at 100 a beam runs around the panel; 0: no beam.

Try them in the Playground

When to use it

For the landing page of a password manager, an online bank, a cloud service or any app with an account to protect: the section that shows in a few seconds what the security check does and what each step is worth.

On phones

The same animation with adapted sizes: the headline goes above the panel and disappears on short screens, the dial and the rows are sized on the height too, and the whole panel fits the box.

With reduced motion

No long scroll and no movement: the panel fades in already at 100, with the switches on and ‘Fully protected’.

Pitfalls

  • A switch driven directly by the scrub never bounces: it follows the finger and stops halfway. Here the scroll only decides the state, and the spring plays whole by itself.
  • GSAP moves the panel on arrival and the frame during the scroll: on the same element the scroll timeline, once created, would wipe out the entrance.
  • var() in SVG stop-color attributes does not work: the arc gradient's colours come from two classes in the CSS.
  • The rows' positions for the focus are measured again on every ScrollTrigger refresh and on resize, because the box changes height while you watch.

Libraries

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

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

Testing

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