Skip to content
animorio
IT
All components

Showreel timecode button

Buttons, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.7 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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>

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.

14 values to change

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 “Showreel timecode button” 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 white, alone in the middle, there is a white pill with a thin border: on the left a black disc with the play triangle, then the word «Showreel», a light vertical rule and the reel's length, 01:48. Hover it with the mouse, or slide a finger across it on the phone, and a thin red playhead appears and follows the pointer on a spring: it overshoots by a pixel and comes back, and it leans slightly in the direction it runs, standing up straight when it stops. Behind it, a very light grey veil runs from the left edge to the playhead. The timecode goes from the length to the exact point under the pointer, with the frames opening on the right, smaller and lighter (00:47:12), and every digit sits in its own slot so the number never wobbles. The word rolls to the chapter of the reel you are on, Halden, Northwind, Okra Type, coming in narrow and opening up; along the bottom edge the chapter notches lift and turn red as the playhead crosses them. On click the pill gives and springs back, the triangle folds into the two bars of the pause and the reel plays from there: the frames run and the watched part takes a soft red tint. Another click pauses; moving the pointer away sends the playhead back to where the reel has got to. Until someone touches it, the pill plays the gesture by itself: it scrubs, goes back a little, plays, pauses and rewinds.

How it works

The time under the finger

The 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.

A spring in pixels

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.

A timecode that does not wobble

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 rolling chapter

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 play that folds

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.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#e8412cThe colour of the playhead and of the part already watched.
LABELscript.jsShowreelThe word at rest.
LENGTHscript.js108The length of the reel in seconds (108 means 01:48).
CHAPTERSscript.jsOpening, Halden, Northwind, Okra Type, Field & CoThe chapters of the reel, in order, separated by commas.
CHAPTER_ATscript.js0, 14, 38, 66, 88The second each chapter starts at.
FPSscript.js25The frames per second in the timecode.
SPRINGscript.js1How springy the playhead and the press are: 0.4 calm, 2 very bouncy.
LEANscript.js1How much the playhead leans with the finger's speed: 0 never.
SPEEDscript.js1The speed of everything: 2 twice as fast, 0.5 half.
AUTOscript.jstrueThe button plays the gesture by itself until someone touches it.

Try them in the Playground

When to use 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 phones

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.

With reduced motion

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.

Pitfalls

  • With tabular-nums the Mona Sans zero comes out slashed: the digits sit in slots of the same width with the character centred, otherwise the timecode shook on every frame.
  • The playhead spring worked out in seconds was twitchy with a short reel and sluggish with a long one: the error is now measured in pixels and it feels the same at any length.
  • The pill changed width at every chapter and the playhead ran away from the finger: the word cell is as wide as the longest word and is measured again when the font arrives.
  • The press scales the pill: the pointer position is divided by the current scale, otherwise the time under the finger jumped during the bounce.

Libraries

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.

Testing

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