
The elastic button
Buttons, Hover, Text
One button, one gesture, in the simple style of product interface pieces: the white «Showreel» pill of a studio's or a photographer's portfolio, with the black play disc and the reel's length. Slide the pointer or a finger across it and a thin red playhead follows on a spring, leaning with the speed; the timecode shows the exact frame, the label rolls to the chapter of the reel and the chapter notches lift as it passes. Press it and the reel plays from there: the triangle folds into the pause and the watched part warms up behind the words.
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>
<!--
"Showreel timecode button" 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 showreel button with the timecode under your finger</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">
<!-- one button, one gesture: slide across it and the playhead, the chapter and the timecode follow the finger; press to play from there -->
<button class="reel" type="button" data-reel aria-label="Play showreel, 1 minute 48 seconds">
<span class="reel__body" data-body>
<span class="reel__track" aria-hidden="true">
<span class="reel__wash reel__wash--played" data-played></span>
<span class="reel__wash reel__wash--peek" data-peek></span>
<span class="reel__ticks" data-ticks></span>
<span class="reel__head" data-head><span class="reel__line" data-line></span></span>
</span>
<span class="reel__play" aria-hidden="true">
<svg viewBox="0 0 24 24" data-icon>
<path data-left d="M8.6 6.2 L14.2 9.4 L14.2 14.6 L8.6 17.8 Z"/>
<path data-right d="M14.2 9.4 L19 12 L19 12 L14.2 14.6 Z"/>
</svg>
</span>
<span class="reel__label" data-label aria-hidden="true"></span>
<span class="reel__rule" aria-hidden="true"></span>
<span class="reel__time" data-time aria-hidden="true"></span>
</span>
</button>
</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.
14 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 “Showreel timecode button” from Animorio and fit it into my siteThe pointer's position inside the pill becomes a time: a margin is taken off on both sides (half the height) so the playhead and the notches never end up inside the curves, and the rest runs from zero to the length. The same sum backwards places the chapter notches, and everything is measured again on resize.
The playhead does not jump to the pointer: a single loop on GSAP's ticker pulls it towards its target with a spring (stiffness and damping from the SPRING knob), worked out in pixels so it behaves the same with a one-minute or a one-hour reel. Its speed becomes a lean (the line's skewX), which comes back upright on a second, softer spring.
Minutes, seconds and frames are slots of the same width, 0.6 em, with the character centred: Mona Sans digits are not all the same width and the number would shake on every frame. Only the slot that changes is written. The frames live in a box that opens in width with back.out once scrubbing starts.
The words, Showreel and the chapters, all sit in the same grid cell, as wide as the longest one, so the pill never changes size under the finger. When the chapter changes the old word leaves upwards or downwards depending on the direction, and the new one comes in with the wdth axis at 78 and lands at 100.
The triangle is made of two halves, each a four-point quad: GSAP interpolates the d attribute of both paths into the two rectangles of the pause, with power3.out (no overshoot, which would fold the quads over) and the second half three hundredths later; the bounce comes from the disc, which shrinks and springs back.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #e8412c | The colour of the playhead and of the part already watched. |
LABEL | script.js | Showreel | The word at rest. |
LENGTH | script.js | 108 | The length of the reel in seconds (108 means 01:48). |
CHAPTERS | script.js | Opening, Halden, Northwind, Okra Type, Field & Co | The chapters of the reel, in order, separated by commas. |
CHAPTER_AT | script.js | 0, 14, 38, 66, 88 | The second each chapter starts at. |
FPS | script.js | 25 | The frames per second in the timecode. |
SPRING | script.js | 1 | How springy the playhead and the press are: 0.4 calm, 2 very bouncy. |
LEAN | script.js | 1 | How much the playhead leans with the finger's speed: 0 never. |
SPEED | script.js | 1 | The speed of everything: 2 twice as fast, 0.5 half. |
AUTO | script.js | true | The button plays the gesture by itself until someone touches it. |
For the showreel on the home page of a portfolio, a creative studio, a photographer or a filmmaker: whoever hovers the button already peeks at the chapters and the exact point in the reel, and starts from what interests them.
On the phone you rest a finger on the pill and slide it: the playhead, the chapter and the timecode follow, and lifting the finger plays the reel from there (touch-action pan-y still lets the page scroll vertically). Sizes come from the shorter side of the screen with clamp.
The playhead goes straight to the point with no spring or lean, the pill does not give on click, the words and the play swap with a fade in place; timecode and chapters stay.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.7 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.