Skip to content
animorio
IT
Back to the library

VU meter

HoverGSAP, CSS onlyAdvancedCompressed weight: Demo 5.1 KBGSAP 28 KBFreeDownload the zip

The level meter of a mixer’s output: two rows of marks, left and right, follow a made-up track, the kick making them jump on every beat; a thin mark stays on the peak and then falls back. Drag the gain and the marks climb into the orange zone and the red one, the decibel figure follows and, past zero, the Clip tag lights up.

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>
<!--
  "VU meter" 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>VU meter</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 level meter of a mixer channel: two rows of marks follow the signal, the peak stays and falls back,
         the gain is dragged, and the Clip tag lights up when it is too much -->
    <section class="vu" data-vu aria-label="Level meter">
      <header class="vu__top">
        <span class="vu__title"><b>Master out</b><span>Stereo, live</span></span>
        <span class="vu__read"><strong data-outdb>-12.0</strong><small>dB</small></span>
        <span class="vu__clip" data-clip>Clip</span>
      </header>
      <div class="vu__meter" aria-hidden="true">
        <div class="vu__row"><b>L</b><span class="vu__bar" data-bar><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><em data-peak></em></span></div>
        <div class="vu__row"><b>R</b><span class="vu__bar" data-bar><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><i data-seg></i><em data-peak></em></span></div>
        <div class="vu__scale"><span>-48</span><span>-36</span><span>-24</span><span>-12</span><span>-6</span><span>0</span></div>
      </div>
      <label class="vu__gain">
        <span>Gain</span>
        <input type="range" min="-24" max="12" step="0.5" value="0" data-gain aria-label="Gain in decibels">
        <output data-outgain>0 dB</output>
      </label>
    </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.

27 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 “VU meter” 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 dark panel of a mixer: at the top “Master out”, the level in decibels written large and the “Clip” tag unlit; in the middle two rows of twenty-six marks, L and R, above a scale from minus 48 to zero; below, the gain slider with its value. The marks light up lime green following a made-up track: they jump up on every kick and come down more slowly, a little different left and right, and on each row a thin white mark stays where the signal got to, waits almost a second and falls back. The figure updates ten times a second. Drag the gain to the right and everything rises: the last marks before zero light up orange, those beyond it red, and as soon as the signal passes zero the Clip tag turns red and stays lit for almost a second. Lower the gain and the rows shorten and the panel calms down.

How it works

The made-up track

No audio: a function gives the loudness at every instant by adding a kick decaying on each beat, a snare on the even ones, a bass line and a little air. Loudness becomes decibels with twenty times the logarithm, plus the slider’s gain.

Fast up, slow down

On every frame, in GSAP’s ticker, each channel’s level chases the signal: it rises almost at once and comes down 34 decibels a second. The lit marks are the level mapped onto the scale from minus 48 to plus 3.

The peak and the Clip

The peak mark remembers the highest level and when: after HOLD seconds it falls back FALL decibels a second. If a channel passes zero the instant is noted, and the Clip tag stays lit for nine tenths of a second.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#b6f24aThe colour of the lit marks below the warm zone.
TEMPOscript.js118The beats per minute of the made-up track moving the marks.
HOLDscript.js0.9How many seconds the peak mark stays still before falling back.
FALLscript.js26How many decibels a second the peak mark falls back.

Try them in the Playground

When to use it

On the page of a music or podcast recording app, a mixer, an audio interface; in the microphone check before a video call or a live stream. Wired to a real AnalyserNode in place of the made-up track, it measures for real.

On phones

The panel is at most 324 pixels wide and about 250 tall; the twenty-six marks narrow with it. The gain slider is a real range input, with a 28 pixel tall touch area.

With reduced motion

The marks do not move: the panel shows a single instant of the track, still, and moving the gain updates the rows, the figure and the Clip tag in place. The demo’s pointer does not start.

Pitfalls

  • The decibel figure written on every frame cannot be read: here it updates ten times a second.
  • The marks are for the eyes: the panel is hidden from screen readers, which get the gain slider with its value in decibels in aria-valuetext.
  • Red past zero is not the only signal: there is also the Clip label, which stays lit long enough to be read.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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