Skip to content
animorio
IT
Back to the library

CPU load monitor

SVG, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.1 KBGSAP 28 KBFreeDownload the zip

The CPU panel of a build server, on black: a column of segments per core rising and falling on a spring, the peak cap that hangs for a moment and falls, and “Run build” sending the cores to the top one after the other. Hover reads one core alone.

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>
<!--
  "CPU load monitor" 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>CPU load monitor</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>
  <main class="stage">
    <!-- the CPU panel of a made-up build server: one column of segments per core, a peak cap that hangs and falls,
         and a build that sends the cores to the top one after the other -->
    <section class="cpu" data-cpu aria-label="CPU load">
      <header class="cpu__head">
        <span class="cpu__host">
          <svg viewBox="0 0 18 18" aria-hidden="true"><rect x="4.500" y="4.500" width="9" height="9" rx="2"/><path d="M7 2v2.500M11 2v2.500M7 13.500V16M11 13.500V16M2 7h2.500M2 11h2.500M13.500 7H16M13.500 11H16"/></svg>
          build-runner-04
        </span>
        <span class="cpu__spec" data-spec></span>
      </header>

      <div class="cpu__read">
        <span class="cpu__total"><b data-total>0</b><i>%</i></span>
        <span class="cpu__side">
          <span class="cpu__roll cpu__state"><span data-state>Idle</span></span>
          <span class="cpu__temp" data-temp></span>
        </span>
      </div>

      <div class="cpu__cols" data-cols>
        <svg data-svg role="img" aria-label="Load of each core"></svg>
        <span class="cpu__tip" data-tip aria-hidden="true"></span>
      </div>

      <footer class="cpu__foot">
        <button class="cpu__run" type="button" data-run>
          <i class="cpu__fill" data-fill aria-hidden="true"></i>
          <svg viewBox="0 0 14 14" aria-hidden="true"><path d="M4 2.800v8.400L11.200 7Z"/></svg>
          <span class="cpu__roll"><span data-run-text>Run build</span></span>
        </button>
        <span class="cpu__roll cpu__proc" aria-live="polite"><span data-proc>No jobs running</span></span>
      </footer>
    </section>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
  </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.

18 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 “CPU load monitor” 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 black, the panel of build-runner-04: at the top the machine’s name and “8 cores · 3.6 GHz”, then the total load in large type, its digits heavier as it climbs, the state rolling between “Idle”, “Working” and “Under load” as it changes colour, and the temperature trailing the load by a few seconds. Below, eight columns of fourteen segments: at rest each breathes on its own, in blue; the upper segments are orange and the last two red. Above each column a white dash marks the peak: the level pushes it up, it hangs for a moment and then falls, gathering speed. “Run build” fills while the build runs and the line beside it shows the command: the cores pick up jobs one after the other, in scattered order, the columns shoot to the top overshooting by a segment, and when the build ends they drop the same way, caps coming down behind them. Hover a column and the others dim, a label gives core, percentage and frequency, and the big number becomes that core’s.

How it works

The load is a function of time

For each core three sines with different phases make the breathing at rest; the build adds an envelope that rises and falls, shifted by a few hundredths of a second per core following an order shuffled once.

The level is a spring

The level shown chases the wanted one on a spring just short of critical damping, integrated on GSAP’s ticker: on a sudden jump it overshoots the target by a segment and comes back.

The cap really falls

The peak rises with the level, waits 0.45 seconds, then has a speed that grows every frame until it meets the level again: it is gravity, not a timed animation.

Only what changes is redrawn

Each segment remembers how lit it is in sixteenths: the attribute is touched only when the value changes. The grid is in real pixels and is rebuilt by a ResizeObserver.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#7f9dffThe colour of the segments at normal load.
CORESscript.js8How many cores the machine has: one column per core.
BUILDscript.js3.6How many seconds the build that maxes the cores lasts.
NOISEscript.js1How restless the load is at rest: 0 = flat, 2 = jumpy.
GRAVITYscript.js1How fast the peak caps fall: 0.3 = slowly, 3 = at once.
LOOPscript.jstrueLeft alone, a build starts every round and the demo’s pointer reads two cores.

Try them in the Playground

When to use it

In the dashboard of a hosting service, a CI, a panel for people who run servers; on a developer product’s page, to show the machine at work. The same columns suit any live multi-channel reading: memory, network, the levels of a mixer.

On phones

The same panel, as wide as the screen: the columns narrow, the segments shrink with the window’s height, and a tap on a column reads it, a tap outside lets go. The build button is 44 pixels tall.

With reduced motion

The columns do not move continuously: they change level once a second, with no spring, caps resting on the level. Labels change without rolling and the button fills at once.

Pitfalls

  • Machine, load, temperature and frequencies are made up: the numbers come from a formula with a fixed seed, not from a server. A real panel receives them from a data stream and feeds them to the same spring.
  • The unlit segment’s colour has to be written inline: the colour class (blue, orange, red) would beat the grey and empty columns would look faintly lit.
  • The time step is capped at a thirtieth of a second: coming back to a tab left in the background, spring and gravity do not blow up.
  • The core label is repositioned only when its text changes, not every frame: reading offsetWidth sixty times a second costs more than everything else.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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