Skip to content
animorio
IT
Back to the library

LED matrix background

Backgrounds, HoverGSAP, Canvas, CSS onlyMediumCompressed weight: Demo 7.2 KBGSAP 28 KBFreeDownload the zip

A page background for the opening of a made-up night radio, on near black: behind the headline sits a board of small LEDs, almost all off, like a sign seen up close. Two slow waves cross it and switch the LEDs on in steps, three levels of orange light with a halo only on the brightest; the pointer warms the LEDs beneath it, a tap sends a ring that lights everything it crosses, and the LEDs fade back slowly. Minimal style, canvas 2D.

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>
<!--
  "LED matrix background" 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>LED matrix background</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the opening of an invented night radio, Nightline, on near black: behind the words a board of small LEDs, most of
       them off. Two slow waves cross the board and light the LEDs in three steps, like a sign; the pointer warms the LEDs
       under it and a tap sends a ring that switches on everything it crosses, then lets it fade back -->
  <main class="stage" data-stage>
    <canvas class="board" data-board aria-hidden="true"></canvas>
    <span class="vignette" aria-hidden="true"></span>

    <section class="hero" aria-labelledby="hero-title" data-hero>
      <p class="kicker" data-in>
        <svg class="kicker__wave" viewBox="0 0 22 10" aria-hidden="true"><path d="M1 5 C 4 5, 4 1, 7 1 S 10 9, 13 9 S 16 3, 19 3 L 21 3" /></svg>
        Nightline Radio
      </p>
      <h1 class="title" id="hero-title" data-in><span class="title__line">Tuned in</span><span class="title__line">after dark.</span></h1>
      <p class="lede" data-in>Live sets every Friday, from eleven till the lights come up.</p>
      <p class="meta" data-in><span>88.4 FM</span><span class="meta__rule" aria-hidden="true"></span><span>On air 23:00</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.

21 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 “LED matrix background” 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

The opening of Nightline, a made-up night radio, on near black. In the middle the label with the small orange wave, the headline «Tuned in after dark.» in Mona Sans, its second line wider and lighter through the width axis, a line below and the data: 88.4 FM, On air 23:00. Behind it sits a board of small LEDs, one every twelve pixels, almost all off: on arrival they switch on from the centre towards the edges, like a sign starting up, and a first ring leaves the centre. Two slow, wide waves, a plane one running diagonally and a circular one breathing from a drifting point, add up: only where the crests meet do the LEDs light, in steps, three levels of orange plus off, like the real LEDs of a scoreboard. The brightest have a thin halo and the glint of the lens. The pointer warms the LEDs beneath it, one more step of light and a pixel bigger; a tap sends a ring that widens and lights everything it crosses, followed by a fainter echo, and the LEDs rise fast and fade slowly, like phosphors. Behind the words the board calms down so the headline reads; when the wave passes beneath it, a warm sheen crosses the headline.

How it works

The board

A regular grid of LEDs centred on the page, one every CELL pixels, rebuilt on every resize; each LED remembers its light, so a resize does not switch the board off. Around the headline an ellipse lowers the LEDs’ light so the words read.

Two waves

The light field is the sum of a diagonal plane wave and a circular wave from a slowly drifting point. Only the crests, above the middle, become light, squared: the board stays mostly off and the lit areas have soft edges.

The steps

Each LED’s light is rounded to a whole step, from zero to three, like a real sign. The shown light then chases the step: it rises fast and falls slowly, like a phosphor, and that soft fade passes through four shades between one step and the next.

Pointer and ring

Near the pointer the light goes up one step and the LED grows by a pixel. A tap adds a widening ring: the LEDs on its edge go to full and fade slowly behind it; a fifth of a second later a fainter echo follows.

One path per shade

LEDs are grouped by light and each group is one path and one fill; the lens glint is another path, and the halo of the brightest is a single drawing, prepared once and repeated in lighter mode.

The sheen on the headline

Every frame measures how lit the wave is under the headline, and where: two CSS variables move a warm gradient inside the letters, clipped to the text, and a very light glowing shadow.

Values to change

NameFileDefaultWhat it changes
CELLscript.js12Distance between the LEDs, in pixels.
LED_SIZEscript.js0.32Radius of an LED, as a share of the distance.
WAVE_SPEEDscript.js1Speed of the two waves.
WAVE_SIZEscript.js1Width of the waves.
LEVELSscript.js3Steps of light above off.
SPOTscript.js90Radius of the pointer’s light, in pixels.
RING_SPEEDscript.js380Speed of the tap ring, in pixels per second.
FADEscript.js1How slowly the LEDs fade.
AUTO_PILOTscript.js3After how many idle seconds the ghost pointer passes (0 never).

Try them in the Playground

When to use it

Behind the opening headline of a radio, a club or a music night, a live event or an app that wants the feel of a light sign seen up close.

On phones

The same board with adapted sizes: the headline is sized on width and height together, the LEDs are rebuilt on every resize and a tap sends the ring.

With reduced motion

The board stays, still: a single wave, frozen, already lit at its steps; pointer and tap light nothing, the words are already in place.

Pitfalls

  • The shown light must chase the step, not jump to it: otherwise the LEDs flicker where the wave sits between two steps.
  • One fill per LED slows the phone down: LEDs are grouped by shade, one path per group.
  • The ellipse that lowers the light behind the headline matters: without it, the brightest LEDs cut through the letters.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.

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

Testing

Tested on 1 December 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