
The inchworm menu
Menus, Hover, Transitions
The panel to trim a clip in Reelcut, a made-up editing app: a drawn preview of a harbour at dawn, below it a strip of ten frames, and two amber handles to drag that darken what stays out. The chosen length rolls digit by digit from 00:04.2 to 00:02.8, the start and end times sit under the handles, Play runs the white playhead through the cut and the preview follows it. Trim closes into a spinning ring, then the tick and «Saved · 2.8 s». On black, with a single amber accent.
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>
<!--
"Video trimmer" 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>Video trimmer</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the trim panel of Reelcut, a made-up editing app: a small preview, the strip of frames,
two handles that cut the clip, the length that rolls, Play with the playhead, then Trim -->
<section class="panel" data-panel aria-label="Trim clip in Reelcut">
<span class="panel__edge" aria-hidden="true"></span>
<header class="head">
<div class="head__txt">
<h1 class="head__title">Trim clip</h1>
<p class="head__sub">Reelcut · harbour_dawn.mov</p>
</div>
<p class="total"><span class="total__lab">Source</span> <span class="total__val" data-total>00:06.0</span></p>
</header>
<figure class="preview" aria-label="Preview">
<svg class="scene" viewBox="0 0 200 100" preserveAspectRatio="xMidYMid slice" data-scene aria-hidden="true">
<defs>
<linearGradient id="cielo" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" data-sky-top stop-color="#1b2140"/>
<stop offset="1" data-sky-bot stop-color="#e07a4f"/>
</linearGradient>
<linearGradient id="acqua" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" data-sea-top stop-color="#2a2f52"/>
<stop offset="1" stop-color="#0b0d18"/>
</linearGradient>
</defs>
<rect width="200" height="100" fill="url(#cielo)"/>
<circle r="11" cx="120" cy="64" fill="#ffd7a1" data-sun/>
<rect y="64" width="200" height="36" fill="url(#acqua)"/>
<path d="M0 64 C30 58 46 60 70 64 Z" fill="#0f1224" opacity=".9"/>
<path d="M150 64 C168 55 184 57 200 61 V64 Z" fill="#0f1224" opacity=".9"/>
<g data-glints fill="#ffd7a1" opacity=".55">
<rect x="112" y="69" width="16" height="1.2" rx=".6"/>
<rect x="116" y="74" width="9" height="1" rx=".5"/>
<rect x="114" y="79" width="12" height="1" rx=".5"/>
</g>
<g data-boat fill="#0b0d18">
<path d="M0 0 h18 l-3 4 h-12 z"/>
<rect x="8" y="-11" width="1.2" height="11"/>
<path d="M9.4 -10 L16 -1 H9.4 Z" opacity=".85"/>
</g>
</svg>
<figcaption class="tc" data-tc>00:00.8</figcaption>
</figure>
<div class="strip" data-strip>
<div class="frames" data-frames aria-hidden="true"></div>
<div class="shade shade--l" data-shade-l aria-hidden="true"></div>
<div class="shade shade--r" data-shade-r aria-hidden="true"></div>
<div class="sel" data-sel aria-hidden="true"></div>
<div class="head-line" data-playhead aria-hidden="true"><span class="head-line__cap"></span></div>
<button class="handle handle--l" type="button" data-handle="l" aria-label="Trim start">
<span class="handle__body" data-handle-body><span class="grip" aria-hidden="true"><i></i><i></i></span></span>
</button>
<button class="handle handle--r" type="button" data-handle="r" aria-label="Trim end">
<span class="handle__body" data-handle-body><span class="grip" aria-hidden="true"><i></i><i></i></span></span>
</button>
</div>
<div class="times" aria-hidden="true">
<span class="time" data-time="l">0:00.8</span>
<span class="time" data-time="r">0:05.0</span>
</div>
<div class="controls">
<button class="play" type="button" data-play aria-label="Play selection">
<span class="play__face play__face--go" data-play-go><svg viewBox="0 0 20 20"><path d="M7.2 5.4 14.6 10 7.2 14.6Z"/></svg></span>
<span class="play__face play__face--stop" data-play-stop><svg viewBox="0 0 20 20"><rect x="6" y="5.6" width="2.6" height="8.8" rx=".8"/><rect x="11.4" y="5.6" width="2.6" height="8.8" rx=".8"/></svg></span>
</button>
<p class="len" aria-live="polite"><span class="len__lab">Length</span> <span class="roll" data-roll>00:04.2</span></p>
<button class="trim" type="button" data-trim>
<span class="trim__face trim__face--idle" data-face-idle><span class="trim__lab">Trim</span></span>
<span class="trim__face trim__face--busy" data-face-busy aria-hidden="true">
<svg class="ring" viewBox="0 0 20 20" data-ring><circle cx="10" cy="10" r="7" pathLength="1"/></svg>
</span>
<span class="trim__face trim__face--done" data-face-done aria-hidden="true">
<svg class="tick" viewBox="0 0 20 20"><path d="M5.6 10.4 8.6 13.3 14.4 7.2" pathLength="1" data-tick/></svg>
</span>
</button>
</div>
<p class="saved" data-saved aria-live="polite">Saved · <span data-saved-len>2.8</span> s</p>
</section>
</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.
34 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Video trimmer” from Animorio and fit it into my siteThe state is two times, the start and the end, plus the playhead. One function turns them into pixels from the strip width: handles, frame, shades, times and playhead. Resize, dragging and the autopilot all go down the same road.
The scene is drawn in SVG and depends on a single time: the colours of sky and sea, the height of the sun, the place of the boat. The same function draws the ten frames of the strip and the large preview, which follows the handle or the playhead.
The Trim button has three stacked faces, the label, the ring and the tick, each as wide as the button and centred on its own: no hidden label widens it and the ring sits in the middle.
| Name | File | Default | What it changes |
|---|---|---|---|
CLIP | script.js | 6 | The length of the whole clip, in seconds. |
START_IN | script.js | 0.8 | Where the cut starts at first. |
START_OUT | script.js | 5 | Where the cut ends at first. |
TARGET_IN | script.js | 1.4 | Where the demo moves the start handle. |
TARGET_OUT | script.js | 4.2 | Where the demo moves the end handle. |
MIN_CUT | script.js | 0.6 | The shortest cut the handles allow. |
SPRING | script.js | 0.55 | How springy the handles and buttons are (lower, more bounce). |
ROLL_TIME | script.js | 0.55 | Seconds each digit of the length takes to roll. |
PLAY_SPEED | script.js | 1 | How fast the playhead runs (1 = real time). |
TRIM_TIME | script.js | 1.2 | Seconds the ring spins before the clip is saved. |
IDLE | script.js | 6 | Seconds after your last touch before the demo plays by itself again. |
In video and audio editing apps, in social tools that trim a clip before posting, in video uploads where you choose the part to keep: it shows right away what stays and how long it lasts, and confirms without leaving the panel.
Everything is in em and the size depends on both the width and the height of the window, so the whole panel fits the phone box. The handles have a touch area wider than what you see and drag with a finger (touch-action none).
No springs or rolling: the handles go to their place, the digits change at once, the playhead runs with no bounce, the button changes face with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.9 KB; the libraries: GSAP 28 KB.
Tested on 1 December 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.
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.