Skip to content
animorio
IT
Back to the library

Internet speed test

SVG, PhysicsGSAP, CSS onlyMediumCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

The speed test of an invented fibre provider, on a graphite panel with warm light and grain: a big dial drawn in thin lines, with a real needle moved by a simulated spring, that climbs with inertia, passes the value, comes back and swings around the changing reading, with its small knocks. The arc of light fills behind it, the Mbps roll digit by digit and ping, download and upload fill in one at a time in three cards with their line charts; at the end, Test 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>
<!--
  "Internet speed test" 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 internet speed test with a spring needle</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 speed test of Novaline, an invented fibre provider, on warm graphite: a big dial drawn in thin lines with a
       real needle on a spring (mass, stiffness, damping, small knocks, a stop pin at zero), the arc of light behind it,
       the Mbps rolling digit by digit, then ping, download and upload filling three thin cards with their line charts -->
  <main class="stage" data-stage>
    <section class="panel" data-panel aria-labelledby="t-title">
      <span class="panel__light" data-light aria-hidden="true"></span>

      <header class="head">
        <p class="brand">
          <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="7.2"></circle><path d="M5.2 12.6a5.2 5.2 0 0 1 9.6 0"></path><path d="M10 10.2l2.6-2.8"></path></svg>
          <span class="brand__name">Novaline</span>
          <span class="brand__page" id="t-title">Speed test</span>
        </p>
        <p class="status" aria-live="polite"><span class="status__in" data-status>Connecting</span></p>
      </header>

      <div class="dial" data-dial>
        <svg class="gauge" viewBox="0 36 400 256" aria-hidden="true">
          <defs>
            <linearGradient id="g-fill" gradientUnits="userSpaceOnUse" x1="40" y1="250" x2="360" y2="250">
              <stop offset="0" style="stop-color: var(--accent-deep)"></stop>
              <stop offset="0.6" style="stop-color: var(--accent)"></stop>
              <stop offset="1" style="stop-color: var(--accent-hot)"></stop>
            </linearGradient>
            <linearGradient id="g-needle" gradientUnits="userSpaceOnUse" x1="200" y1="200" x2="200" y2="52">
              <stop offset="0" style="stop-color: #f3ede4"></stop>
              <stop offset="1" style="stop-color: var(--accent-hot)"></stop>
            </linearGradient>
            <radialGradient id="g-cap" cx="0.36" cy="0.32" r="0.8">
              <stop offset="0" style="stop-color: #fbf6ee"></stop>
              <stop offset="0.45" style="stop-color: #8d8478"></stop>
              <stop offset="1" style="stop-color: #26221d"></stop>
            </radialGradient>
            <filter id="f-bloom" filterUnits="userSpaceOnUse" x="-40" y="-40" width="480" height="380">
              <feGaussianBlur stdDeviation="7"></feGaussianBlur>
            </filter>
            <filter id="f-shadow" filterUnits="userSpaceOnUse" x="0" y="0" width="400" height="292">
              <feGaussianBlur stdDeviation="2.2"></feGaussianBlur>
            </filter>
          </defs>

          <path class="track" data-track></path>
          <path class="track track--inner" data-track-inner></path>
          <path class="arc-glow" data-arc-glow pathLength="1" filter="url(#f-bloom)"></path>
          <path class="arc" data-arc pathLength="1"></path>
          <path class="sweep" data-sweep pathLength="1"></path>
          <g data-ticks></g>
          <g data-labels></g>
          <circle class="pin" data-pin r="2.2"></circle>

          <g class="needle" data-needle>
            <path class="needle__shadow" data-needle-shadow d="M197.4 215 L199.3 62 L200.7 62 L202.6 215 Z" filter="url(#f-shadow)"></path>
            <g data-needle-body>
              <path class="needle__glow" d="M198 200 L199.4 62 L200.6 62 L202 200 Z" filter="url(#f-bloom)"></path>
              <path class="needle__tail" d="M196.8 200 L197.8 215 L202.2 215 L203.2 200 Z"></path>
              <circle class="needle__weight" cx="200" cy="213" r="4.6"></circle>
              <path class="needle__blade" d="M197.4 200 L199.3 62 L200.7 62 L202.6 200 Z"></path>
            </g>
          </g>
          <circle class="cap" cx="200" cy="200" r="9.5"></circle>
          <circle class="cap__ring" cx="200" cy="200" r="9.5"></circle>
          <circle class="cap__dot" cx="200" cy="200" r="1.6"></circle>
        </svg>

        <div class="readout" data-readout>
          <p class="readout__num" data-num aria-hidden="true"></p>
          <p class="readout__unit"><span class="readout__phase" data-phase>Ping</span><span class="readout__sep" aria-hidden="true"></span><span data-unit>ms</span></p>
        </div>

        <button class="again" type="button" data-again>
          <span class="again__glow" aria-hidden="true"></span>
          <span class="again__face" data-again-face>
            <svg class="again__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M12.6 6.1A5 5 0 1 0 13 9.2"></path><path d="M13.2 2.9v3.4H9.8"></path></svg>
            <span class="again__words">Test again</span>
          </span>
        </button>
      </div>

      <div class="metrics">
        <article class="metric" data-metric="ping">
          <p class="metric__head">
            <svg class="metric__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M2 8h2.6l1.6-3.6 2.6 7.2 1.6-3.6H14"></path></svg>
            <span class="metric__name">Ping</span>
            <svg class="metric__check" viewBox="0 0 16 16" aria-hidden="true"><path data-check pathLength="1" d="M3.6 8.4l2.9 2.8 5.9-6.2"></path></svg>
          </p>
          <p class="metric__value"><span data-value>0</span><span class="metric__unit">ms</span></p>
          <svg class="spark" viewBox="0 0 120 30" preserveAspectRatio="none" aria-hidden="true">
            <path class="spark__base" d="M0 29.5H120"></path>
            <path class="spark__area" data-area></path>
            <path class="spark__line" data-line></path>
          </svg>
        </article>
        <article class="metric" data-metric="down">
          <p class="metric__head">
            <svg class="metric__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 2.5v10M4 8.8l4 3.8 4-3.8"></path></svg>
            <span class="metric__name">Download</span>
            <svg class="metric__check" viewBox="0 0 16 16" aria-hidden="true"><path data-check pathLength="1" d="M3.6 8.4l2.9 2.8 5.9-6.2"></path></svg>
          </p>
          <p class="metric__value"><span data-value>0</span><span class="metric__unit">Mbps</span></p>
          <svg class="spark" viewBox="0 0 120 30" preserveAspectRatio="none" aria-hidden="true">
            <path class="spark__base" d="M0 29.5H120"></path>
            <path class="spark__area" data-area></path>
            <path class="spark__line" data-line></path>
          </svg>
        </article>
        <article class="metric" data-metric="up">
          <p class="metric__head">
            <svg class="metric__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 13.5v-10M4 7.2l4-3.8 4 3.8"></path></svg>
            <span class="metric__name">Upload</span>
            <svg class="metric__check" viewBox="0 0 16 16" aria-hidden="true"><path data-check pathLength="1" d="M3.6 8.4l2.9 2.8 5.9-6.2"></path></svg>
          </p>
          <p class="metric__value"><span data-value>0</span><span class="metric__unit">Mbps</span></p>
          <svg class="spark" viewBox="0 0 120 30" preserveAspectRatio="none" aria-hidden="true">
            <path class="spark__base" d="M0 29.5H120"></path>
            <path class="spark__area" data-area></path>
            <path class="spark__line" data-line></path>
          </svg>
        </article>
      </div>

      <p class="foot"><span>Fibre 1 Gbit</span><span class="foot__sep" aria-hidden="true"></span><span>Wi-Fi 6</span><span class="foot__sep" aria-hidden="true"></span><span>Server Milan</span></p>
    </section>
  </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.

39 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 “Internet speed test” 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 warm graphite, with an amber light behind and grain on top, sits the speed test panel of Novaline, an invented fibre provider: at the top the logo and the status pill, in the middle a big dial with the scale from 0 to 1000 Mbps in thin ticks, a needle with its counterweight, the metal pivot and its shadow, below three thin cards for ping, download and upload and at the bottom the line details. As soon as the page has loaded a thin light runs once along the scale, then the pill says Testing ping: the needle trembles on its stop and the milliseconds roll down to 9, while the first card draws its chart. Then Downloading: the needle, pulled by a spring, climbs with inertia, passes the value, comes back and keeps swinging around the reading, which meanwhile dips and rises again; now and then it gets a small knock. The arc of light behind it fills as far as it reaches, the ticks and numbers it passes light up, the panel's light warms and the number in the middle rolls digit by digit. When the measurement is done the card settles with its check, the needle drops, hits the stop and bounces. The same for the upload. At the end the number steps aside and Test again comes up, presses itself, gives under the finger, flares and starts the test again.

How it works

A needle with its own physics

The needle has no tween: it has a position and a velocity, and every frame (split into steps of 1/240 of a second) the acceleration is STIFFNESS times the distance from the reading minus DAMPING times the velocity. With low damping it passes the value and comes back, like a real needle. Below zero there is the stop: the velocity flips and loses more than half, and the needle bounces.

The timeline only moves the reading

The GSAP timeline never touches the needle: it moves the reading (up to DOWNLOAD, down 10%, up again, back on the value) and how much the reading wanders, with three sines of different frequencies times JITTER. Now and then, while it measures, the needle gets a small kick of velocity from a fixed random sequence, so every run is the same.

The arc and ticks from the needle

Arc, glow and running light are the same path with pathLength 1: the lit part is a dash as long as the needle's position. The scale is the one of speed tests (0, 5, 10, 50, 100, 250, 500, 750, 1000), each step the same slice; the ticks change class only when the needle passes one.

The roll and the cards

The number is four columns of digits from 0 to 9 sliding with yPercent, updated nine times a second so the wobble does not make them shiver; the empty columns in front close up. Each card takes a sample twenty-four times a second and redraws its line with the area under it, from left to right.

Values to change

NameFileDefaultWhat it changes
DOWNLOADscript.js874The measured download speed, in Mbps (the scale goes to 1000).
UPLOADscript.js412The measured upload speed, in Mbps.
PINGscript.js9The measured ping, in milliseconds.
STIFFNESSscript.js44The spring pulling the needle to the reading: higher is quicker.
DAMPINGscript.js5.4The damping: lower lets the needle swing further past the value before it settles.
KNOCKSscript.js1How strong the small knocks on the needle are (0 none).
JITTERscript.js0.05How much the reading wanders while it measures (0 steady).
SPEEDscript.js1How fast the test runs (2 is twice as fast).
LOOPscript.jstruePresses Test again by itself and runs the test again and again.

Try them in the Playground

When to use it

In the app or website of an internet carrier, a fibre provider or an app that checks the wifi and the network: the speed test is the piece people really open, and a needle that behaves like a real one makes it feel like a measurement, not an animation. It also works in a dashboard, for any value that climbs and settles: a performance score, a power reading, a load.

On phones

The same panel at adapted sizes: the dial is sized on width and height together, the number and the button on the dial's width, the three cards stay in a row with smaller text and lower charts, and on short screens the bottom line goes away.

With reduced motion

No swinging needle and no rolling digits: the test shows already done, with the needle on the download, the arc filled up to there, the three cards filled with their charts and Test again, which brings it all back with a single fade.

Pitfalls

  • A physical needle integrated with the frame time becomes unstable when a frame is long (a tab coming back into view): the time is capped at 1/15 of a second and split into steps of 1/240.
  • The number under the pivot sized in vh grows on tall phones faster than the dial, which is sized on width, and ends up over the cards: with container-type on the dial the number and the button are sized in cqw, on the dial itself.
  • Mona Sans with tabular-nums draws a slashed zero: on the scale and in the cards it looks like code, so the digits stay proportional and the roll has its own fixed-width columns.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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