
Speeding marquee
Scroll, Text, Hover
The case study card of an invented branding studio, the rebrand of a tea brand, split into two halves: Story with a real photo of tea leaves and Proof with the name and the numbers. The border between them follows the pointer on a spring, from 50/50 up to 60/40 either way; the big name grows and stretches with the wdth axis of a variable font, the chip of the bigger half fills with green, and on the border a glass knob stretches with the speed and settles.
Rebuilt from scratch studying loloagency.com by The Agency of Love & Logic, Stas Bondar: the idea is theirs; code, copy and images are ours. Read how it’s made
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>
<!--
"Split case study" 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 split case study with the border that follows the cursor</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" data-stage>
<!-- the case study card of Hinge & Hearth, an invented branding studio, for Morrow, an invented tea brand.
Two halves: Story (a real photo of tea leaves) and Proof (the numbers). The border between them follows the
pointer on a soft spring, and the big name stretches and narrows with the width axis of a variable font. -->
<article class="case" data-case aria-label="Case study: Morrow tea rebrand">
<div class="case__split">
<section class="half half--story" aria-label="Story">
<div class="story__photo" aria-hidden="true">
<img class="story__img" src="foglie.webp" width="682" height="1024" alt="">
</div>
<span class="story__veil" aria-hidden="true"></span>
<span class="chip chip--story" data-in><span class="chip__fill" aria-hidden="true"></span><span class="chip__text">Story</span></span>
<div class="story__copy" data-in>
<p class="story__quote">Grown on one slope. Now it looks like it.</p>
<p class="story__meta">Identity, packaging and shelf, 2026</p>
</div>
</section>
<section class="half half--proof" aria-label="Proof">
<header class="proof__top" data-in>
<span class="chip chip--proof"><span class="chip__fill" aria-hidden="true"></span><span class="chip__text">Proof</span></span>
<span class="studio">
<svg class="studio__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M4 16V8.5a6 6 0 0 1 12 0V16"/><path d="M10 16V9.6"/></svg>
Hinge & Hearth
</span>
</header>
<div class="proof__name" data-in>
<p class="proof__over">Tea rebrand</p>
<h1 class="proof__title" data-title>Morrow</h1>
</div>
<dl class="stats">
<div class="stat" data-in>
<dt>Shelf pickup</dt>
<dd>+38%</dd>
<span class="stat__bar" aria-hidden="true"><i data-bar style="--v:.38"></i></span>
</div>
<div class="stat" data-in>
<dt>Repeat orders</dt>
<dd>2.1x</dd>
<span class="stat__bar" aria-hidden="true"><i data-bar style="--v:.62"></i></span>
</div>
<div class="stat stat--extra" data-in>
<dt>Weeks to launch</dt>
<dd>14</dd>
<span class="stat__bar" aria-hidden="true"><i data-bar style="--v:.27"></i></span>
</div>
</dl>
<button class="open" type="button" data-open data-in>
<span class="open__face" data-face>
<span class="open__shine" data-shine aria-hidden="true"></span>
<span class="open__row" data-row="idle">
<span>View the case</span>
<svg class="open__arrow" data-arrow viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.5 4 12.5 8l-4 4"/></svg>
</span>
<span class="open__row" data-row="done" aria-hidden="true">
<svg class="open__tick" viewBox="0 0 16 16"><path data-tick pathLength="1" d="M3.6 8.4 6.6 11.2 12.4 4.9"/></svg>
<span>Case saved</span>
</span>
</span>
</button>
</section>
</div>
<!-- the border: a hairline that catches the light, a glass handle and the share of each half -->
<div class="border" data-border aria-hidden="true">
<span class="border__line"></span>
<span class="border__knob" data-knob>
<span class="border__glint" aria-hidden="true"></span>
<span class="border__readout" data-readout><span class="border__pill"><b data-left>50</b><i></i><b data-right>50</b></span></span>
<span class="border__handle" data-handle>
<svg viewBox="0 0 24 12"><path d="M7.5 2.5 4 6l3.5 3.5M16.5 2.5 20 6l-3.5 3.5"/></svg>
</span>
</span>
</div>
<span class="case__grain" aria-hidden="true"></span>
</article>
<svg class="pointer" data-pointer viewBox="0 0 20 20" aria-hidden="true"><path d="M4 2.5v13.2l3.5-3.3 2.4 5.3 2.3-1-2.4-5.2 4.8-.2z"/></svg>
<p class="sr" aria-live="polite" data-live></p>
</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.
30 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 “Split case study” from Animorio and fit it into my siteEverything hangs on --split, written on the card every frame: the grid has the columns calc(50% + split * 50%) and the rest, the knob sits at left calc(50% + split * 50%), the photo grows a little, the chips fill through a clamp.
As on the original site: the pointer's x becomes (x - width / 2) / width * -1, is cut at ±0.1 and taken to ±0.2 with mapRange. So a tenth of the page away from the middle is enough for the border to go all the way.
The value is not written at once: gsap.quickTo chases it in 0.8 s with power3, and a ticker copies it into the CSS variable. A second quickTo takes the knob to the pointer's height.
The title has font-size base * (180 - split * 200) / 180, the site's formula, plus font-variation-settings 'wdth' 100 - split * 125: with variable Mona Sans the letters really get wider instead of just bigger.
The border's speed drives how much the knob stretches, integrated with a small hand made spring: it passes the mark and comes back round. The share of the two halves shows while it moves and fades soon after.
| Name | File | Default | What it changes |
|---|---|---|---|
RANGE | script.js | 0.1 | How far from the middle of the page the pointer has to go for the full move (0.1 = a tenth of the width). |
REACH | script.js | 0.2 | How far the border goes: 0.2 = columns at 60/40. |
SPRING | script.js | 0.8 | The seconds the border takes to reach the pointer. |
GROW | script.js | 200 | How much the big name grows and shrinks with the border (200 as in the original). |
STRETCH | script.js | 125 | How much the name stretches on the wdth axis (0 = never). |
AUTO_PILOT | script.js | 2.2 | After how many seconds without a pointer the drawn one starts (0 never). |
LOOP | script.js | true | The drawn cursor walks again and again. |
For a project page in the portfolio of an agency, a branding studio or a freelancer: when a project has two sides, the story and the results, and the visitor chooses which one grows just by moving the mouse.
The same animation with adapted sizes: the card is almost as wide as the screen and as low as the box, the numbers stack when the Proof half narrows, the third number hides on low screens and the border moves by dragging a finger sideways.
The border stays still in the middle and the drawn cursor does not start: the card fades in already in place, and pressing the button the label and the checkmark change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.0 KB; the libraries: GSAP 28 KB.
Tested on 6 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.