
The inchworm menu
Menus, Hover, Transitions
The card of an ad campaign in a marketing dashboard, alone on white: Winter launch by Northbay, a made-up outdoor clothing shop. The budget bar fills up to $1,240 of $2,000, clicks, CTR and CPC roll digit by digit, and the line of the last 24 hours of clicks draws itself and slides one hour at a time while the campaign is Live. The switch pauses it: the line stops, flattens and turns grey, the numbers freeze and the equalizer next to Live becomes a pause sign; switched back on, the line springs back. Hovering the line shows the point of that hour with its clicks. People were searching for “digital marketing”.
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>
<!--
"Campaign card" 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>Campaign card</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 card of an ad campaign of a made-up outdoor shop, Northbay: the budget that fills, clicks, CTR and CPC that
roll, the clicks of the last 24 hours that slide along live, and the Live / Paused switch that flattens it all -->
<section class="card" data-card aria-labelledby="cp-title">
<div class="card__in">
<header class="head" data-part>
<span class="brand" aria-hidden="true"><svg viewBox="0 0 20 20"><path d="M5 15V5.2l10 9.6V5"></path></svg></span>
<div class="head__text">
<h2 class="head__name" id="cp-title" data-name>Winter launch</h2>
<p class="head__meta">Northbay · Search & social ads</p>
</div>
<div class="state">
<span class="state__label" data-state-label aria-hidden="true">
<svg class="eq" viewBox="0 0 12 12" aria-hidden="true"><rect data-bar x="1.5" y="2" width="2" height="8" rx="1"></rect><rect data-bar x="5" y="2" width="2" height="8" rx="1"></rect><rect data-bar x="8.5" y="2" width="2" height="8" rx="1"></rect></svg>
<span class="state__word" data-state-word>Live</span>
</span>
<button class="switch" type="button" role="switch" aria-checked="true" aria-label="Campaign running" data-switch>
<span class="switch__track" data-track></span>
<span class="switch__knob" data-knob></span>
</button>
</div>
</header>
<div class="budget" data-part>
<div class="budget__row">
<span class="label">Budget spent</span>
<span class="budget__nums"><span class="roll roll--strong" data-spent></span><span class="budget__of"> of <span data-total>$2,000</span></span></span>
</div>
<div class="bar" data-bar-box>
<span class="bar__fill" data-fill><span class="bar__sheen" data-sheen></span></span>
<span class="bar__tick" style="left:25%"></span><span class="bar__tick" style="left:50%"></span><span class="bar__tick" style="left:75%"></span>
</div>
<div class="budget__row budget__row--small">
<span class="roll" data-pct></span>
<span data-left-line>Ends Dec 15</span>
</div>
</div>
<dl class="stats" data-part>
<div class="stat"><dt class="label">Clicks</dt><dd class="roll roll--big" data-clicks></dd></div>
<div class="stat"><dt class="label">CTR</dt><dd class="roll roll--big" data-ctr></dd></div>
<div class="stat"><dt class="label">CPC</dt><dd class="roll roll--big" data-cpc></dd></div>
</dl>
<figure class="chart" data-part>
<figcaption class="chart__cap"><span class="label">Clicks · last 24 hours</span><span class="chart__hint" data-hint>per hour</span></figcaption>
<div class="chart__box" data-chart>
<svg class="chart__svg" data-svg aria-hidden="true">
<defs>
<linearGradient id="cp-area" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="var(--accento)" stop-opacity="0.2"></stop>
<stop offset="1" stop-color="var(--accento)" stop-opacity="0"></stop>
</linearGradient>
<clipPath id="cp-clip"><rect data-clip x="0" y="0" width="0" height="400"></rect></clipPath>
</defs>
<line class="chart__base" data-base x1="0" x2="0" y1="0" y2="0"></line>
<line class="chart__mid" data-mid x1="0" x2="0" y1="0" y2="0"></line>
<g clip-path="url(#cp-clip)">
<path class="chart__area" data-area fill="url(#cp-area)"></path>
<path class="chart__line" data-line></path>
</g>
<line class="chart__cursor" data-cursor x1="0" x2="0" y1="0" y2="0"></line>
<circle class="chart__ring" data-ring r="4" cx="0" cy="0"></circle>
</svg>
<div class="tip" data-tip aria-hidden="true"><span class="tip__time" data-tip-time>10:00</span><span class="tip__val" data-tip-val>41 clicks</span></div>
</div>
<div class="chart__axis"><span data-axis-start>24h ago</span><span>Now</span></div>
</figure>
</div>
</section>
<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.
36 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 “Campaign card” from Animorio and fit it into my siteThe line is an SVG path rebuilt from an array of 24 hourly values: each point becomes a cubic Bézier curve with Catmull-Rom control points (a sixth of the distance between neighbours), and the area under it is the same path closed at the bottom. The viewBox matches the box in pixels and is remeasured on resize, so the stroke stays 1.8 pixels at any width.
Each hour a value is pushed at the end of the array and GSAP takes a shift from 0 to 1: every point is drawn at (i − shift) times the step, so the whole line slides one step and the new point enters from the right; at the end the first value is dropped and the shift goes back to 0, with no jump.
Each value is drawn as mean + (value − mean) × amplitude. When paused GSAP takes the amplitude to FLATTEN with power3.inOut and the line lies down towards its average; switched on it goes back to 1 with elastic.out, overshooting and bouncing. The data stay true: the hover label always gives the hour's real clicks.
Spend, percentage, clicks, CTR and CPC are built digit by digit: every digit is a column from 0 to 9 in a window one line tall, with tabular-nums, and GSAP takes it to yPercent −10 times the digit, staggered from the right like an odometer.
It is a button with role switch and aria-checked. Pressed, the knob widens from 18 to 22 pixels towards the middle; released, it slides on back.out. The three bars next to Live swing in scaleY with different durations; when paused the middle one fades and the outer two stretch and move a pixel and a half closer, becoming a pause sign.
| Name | File | Default | What it changes |
|---|---|---|---|
CAMPAIGN | script.js | Winter launch | The campaign name. |
BUDGET | script.js | 2000 | The total budget, in dollars. |
SPENT | script.js | 1240 | How much has been spent when the card opens. |
CLICKS | script.js | 8412 | The campaign's clicks so far. |
CTR | script.js | 3.84 | The CTR, as a percentage. |
LIVE_TICK | script.js | 1.4 | How many seconds between new hours of clicks. |
FLATTEN | script.js | 0.08 | How much shape the line keeps when paused (0 = flat). |
BOUNCE | script.js | 0.38 | The line's spring when it restarts (lower, more bounces). |
ROLL_TIME | script.js | 0.7 | How long the digits take to roll. |
LOOP_PAUSE | script.js | 2 | The pause at the end of the self-running loop. |
In the dashboard of a digital marketing or online advertising tool, in the back office of a shop that runs campaigns, in an app that manages social ads, or on a SaaS product page showing how budget and clicks are watched.
The card takes the width with a margin and its spacing and chart height also follow the height with clamp, so it all fits the phone preview box; the line is remeasured on resize even mid-animation. The finger does what hover does: tapping or dragging on the chart shows the point with its label, which goes away shortly after the finger lifts.
No sliding or springs: the card shows the Live campaign straight away with the line already drawn and the numbers in place, new hours do not arrive and the self-running loop does not start. The switch works: the line flattens at once and the colours cross-fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.2 KB; the libraries: GSAP 28 KB.
Tested on 22 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.
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.