
The elastic button
Buttons, Hover, Text
The mini player of a club's live stream while the DJ moves from one record to the next: a dark smoked glass card with two scrolling waveforms, deck A above the line and deck B below it, and a real crossfader to drag. Everything follows the fader: the height of the waves, the title and the cover dissolving with a touch of blur, the BPM sliding from one record to the other, the light under the card and the edge taking the colour of what you hear.
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>
<!--
"DJ set mini player" 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 DJ set mini player with the crossfader</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 mini player of a club's live stream: the DJ is mixing from one record into the next. Two waveforms (deck A
above the line, deck B below) scroll past the playhead, the crossfader moves between them and everything
follows it: the height of each wave, the title, the cover, the tempo and the colour of the light -->
<div class="mix" data-mix data-inquadra>
<span class="mix__glow" data-glow aria-hidden="true"></span>
<article class="mix__card" data-card aria-label="Live DJ set player">
<span class="mix__grain" aria-hidden="true"></span>
<span class="mix__sheen" aria-hidden="true"></span>
<header class="mix__head">
<span class="mix__live">
<svg class="mix__eq" viewBox="0 0 12 12" aria-hidden="true">
<rect data-eq x="1" y="2" width="2" height="9" rx="1"/>
<rect data-eq x="5" y="2" width="2" height="9" rx="1"/>
<rect data-eq x="9" y="2" width="2" height="9" rx="1"/>
</svg>
Live
</span>
<span class="mix__room">Halde Club, Room Two</span>
<span class="mix__clock" data-clock>1:12:48</span>
</header>
<div class="mix__now">
<div class="mix__art" aria-hidden="true">
<span class="mix__cover" data-cover="0"></span>
<span class="mix__cover" data-cover="1"></span>
</div>
<div class="mix__titles" aria-live="polite">
<div class="mix__track" data-track="0"><b data-title>Low Tide Signal</b><span data-artist>Sable Noor</span></div>
<div class="mix__track" data-track="1"><b data-title>Glasshouse</b><span data-artist>Ono Vale</span></div>
</div>
<div class="mix__bpm"><b data-bpm>124.0</b><span>BPM</span></div>
</div>
<div class="mix__wave">
<canvas data-wave aria-hidden="true"></canvas>
</div>
<div class="mix__deck">
<span class="mix__letter" data-letter="0">A</span>
<div class="mix__fader" data-fader role="slider" tabindex="0" aria-label="Crossfader" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-valuetext="Deck A">
<span class="mix__ticks" aria-hidden="true"></span>
<span class="mix__slot" aria-hidden="true"><span class="mix__fill" data-fill></span></span>
<span class="mix__cap" data-cap aria-hidden="true"><span class="mix__cap-face" data-capface><i></i><i></i><i></i></span></span>
</div>
<span class="mix__letter" data-letter="1">B</span>
</div>
<footer class="mix__foot">
<span><b data-count>1,284</b> listening</span>
<span class="mix__next">Next <b data-next>Velvet Hours</b></span>
</footer>
</article>
</div>
</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.
32 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 “DJ set mini player” from Animorio and fit it into my siteThe state is a number from 0 to 1, the crossfader's position. Every frame it gives the two constant power levels, cosine and sine of a quarter turn, so the two records do not dip in the middle, and from there everything else: the cap's position, the waves' height, the title's dissolve, the BPM and the colour.
Each record has 256 bars generated from a seed: a hard hit on every beat, a softer one right after, a fill every four bars. The canvas draws them two pixels wide every three, scrolling at a speed that follows the BPM you hear; the bars already played are brighter, the edges fade and the ones near the playhead catch the light.
The records' colours come from `:root` and are read as numbers; the colour in between goes into the --mixc variable, used by the blurred light under the card, the Live label, the sheen following the pointer and the cap's lit groove. Title and cover dissolve only in the middle of the travel, between 0.3 and 0.7, with blur and a six pixel rise.
A GSAP timeline takes the fader to the other end in MIX_TIME seconds, passes the mark by six thousandths and comes back with elastic.out, waits HOLD seconds and starts again; if the deck coming in has already played and is silent, it first loads the next record on it and lets its wave grow back. As soon as a hand touches the fader the timeline stops, and it starts again three seconds after the last gesture from wherever it was left.
| Name | File | Default | What it changes |
|---|---|---|---|
MIX_TIME | script.js | 3.2 | The seconds the crossfader takes on its own from one deck to the other. |
HOLD | script.js | 1.6 | The seconds each record plays alone before the next mix. |
SCROLL | script.js | 1 | How fast the waves run under the playhead. |
WAVE_HEIGHT | script.js | 1 | How tall the waves are. |
BLUR | script.js | 4 | The pixels of blur on the title while it dissolves into the other. |
GLOW | script.js | 0.4 | How strong the coloured light under the card is. |
LISTENERS | script.js | 1284 | How many people are listening at the start. |
LOOP | script.js | true | Keeps mixing record after record. |
For the site or app of a venue, a club, a festival or a radio station streaming its DJ sets live: the mini player that stays in a corner while you look through the night's line up.
The same card with adapted sizes: it is as wide as the box allows, spacing and waves shrink with the height, and the cap is dragged with a finger without scrolling the page.
The waves stand still and the fader does not glide: it jumps from one end to the other and the title, cover and colours change with a fade; dragged, it moves under the finger without springs.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.8 KB; the libraries: GSAP 28 KB.
Tested on 1 November 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.