
The star rating
Ratings, SVG, Hover
The volume slider of a music player, on black, in the style of one-gesture micro-interactions: the filled part of the track is not a bar but a thin flowing wave that rises with the volume, wiggles more while you drag it and lies down flat when the sound reaches zero. The speaker lights from one to three arcs, crosses out on mute, and on a second tap the volume springs back to where it was; the number shows above the knob only while you hold it.
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>
<!--
"Wave volume slider" 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 volume slider whose wave rises with the sound</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/inter@5.2.5/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the volume row of a music player: the filled part of the track is a thin wave that grows with the volume,
wiggles while you drag it and lies down flat at zero; the speaker mutes and unmutes with a spring -->
<section class="player" data-card aria-label="Now playing">
<div class="track-info">
<span class="cover" aria-hidden="true"><span class="cover__sun"></span><span class="cover__sea"></span></span>
<span class="meta">
<span class="meta__title">Low Tide Hours</span>
<span class="meta__artist">Maren Holt · Driftwave</span>
</span>
</div>
<div class="volume">
<button class="speaker" type="button" data-speaker aria-label="Mute" aria-pressed="false">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path class="speaker__body" d="M4 9.2h3.1L11.6 5v14l-4.5-4.2H4z"></path>
<path class="speaker__arc" data-arc d="M14.3 10.1a2.6 2.6 0 0 1 0 3.8"></path>
<path class="speaker__arc" data-arc d="M16.4 8a5.6 5.6 0 0 1 0 8"></path>
<path class="speaker__arc" data-arc d="M18.5 5.9a8.6 8.6 0 0 1 0 12.2"></path>
<g class="speaker__x" data-x><path d="M15.2 9.6l4.8 4.8"></path><path d="M20 9.6l-4.8 4.8"></path></g>
</svg>
</button>
<div class="rail" data-rail role="slider" tabindex="0" aria-label="Volume" aria-valuemin="0" aria-valuemax="100" aria-valuenow="55">
<svg class="rail__svg" data-svg aria-hidden="true">
<path class="rail__rest" data-rest></path>
<path class="rail__glow" data-glow></path>
<path class="rail__wave" data-wave></path>
</svg>
<span class="knob" data-knob><span class="knob__dot"></span></span>
<span class="bubble" data-bubble aria-hidden="true"><span data-num>55</span></span>
</div>
</div>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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>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.
17 values to change
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 “Wave volume slider” from Animorio and fit it into my siteThe filled stroke is an SVG path rebuilt on every tick of the GSAP ticker, one point every pixel and a half from the start to the knob: a sine WAVELENGTH pixels long that flows with its phase, multiplied by an envelope that grows it out of the start and lays it down over the last twelve pixels before the knob, so the knob always sits on a still line.
The wave height is AMP times the volume, but it does not follow it at once: it is a spring (stiffness 140, damping 14) that makes the wave swell and settle. While the knob is held a value from 0 to 1 rises towards 1 and multiplies height and speed by WIGGLE; from the knob’s speed comes a second, tighter wave that makes the stroke shiver.
The speaker arcs are three paths that come in with a staggered back.out when the volume passes the thresholds, and the X arrives at zero. Mute remembers the volume before and takes it to zero with power3.out; the second tap brings it back with elastic.out(1, BOUNCE), and the drawing follows the value a touch behind.
On touch the knob widens into a pill (scaleX 1.55) and the bubble with the number comes in with back.out from below; let go, the knob turns round again on an elastic spring and the bubble leaves after 0.35 seconds. With the keyboard the arrows move the volume by STEP.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | 55 | The starting volume, from 0 to 100. |
AMP | script.js | 5 | How high the wave rises at full volume, in pixels. |
WAVELENGTH | script.js | 18 | How long each wave is, in pixels. |
FLOW | script.js | 0.9 | How many waves flow by per second with the track at rest. |
WIGGLE | script.js | 1.6 | How much more it wiggles while dragged. |
BOUNCE | script.js | 0.55 | The spring of the volume coming back after mute: lower bounces more. |
STEP | script.js | 5 | How much the arrow keys move the volume. |
In the player of a music or podcast app, in video controls, in the sound panel of a system or a smart speaker: anywhere the volume is set and the control should tell, at a glance, how much sound there is.
The card is at most 380 pixels or 88% of the screen wide, and short, so it sits easily in the phone box. With a finger the knob drags as with the mouse, without scrolling the page (touch-action: none on the track), and the track is 36 pixels tall so it is easy to catch.
The wave does not flow or wiggle: it stays still, as high as the volume. No springs or bounces: the knob goes where you take it, the arcs and the bubble fade in and mute is immediate; the autopilot shows the volumes one after another.
GSAP 3.15.0, Inter (font variabile) 5.2.5.
Compressed with gzip, the three demo files weigh 6.5 KB; the libraries: GSAP 28 KB.
Tested on 29 October 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.