
Speeding marquee
Scroll, Text, Hover
A dashboard’s cohort retention: each row is who signed up in one week, each column how many were still there later. The triangle fills in a wave along its diagonals; hover a cell and a sprung frame catches it, its row, its column and the diagonal of the same calendar week stay lit, and the percentage and the people count up on top.
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>
<!--
"Cohort retention chart" 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>Cohort retention chart</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">
<!-- a cohort retention table: each row is the people who signed up in one week, each column how many
were still there N weeks later; a sprung frame follows the cell being read, with its row,
its column and the diagonal of the same calendar week -->
<section class="co" data-co aria-label="Weekly cohort retention">
<header class="co__head">
<span class="co__titles">
<span class="co__name">Retention</span>
<span class="co__roll co__what"><span data-what></span></span>
</span>
<span class="co__read">
<b class="co__num"><span data-num>0</span><i>%</i></b>
<span class="co__roll co__who"><span data-who></span></span>
</span>
</header>
<div class="co__grid" data-grid tabindex="0" role="group" aria-label="Retention by cohort and week. Use the arrow keys to read a cell">
<span class="co__lens" data-lens aria-hidden="true"></span>
</div>
<span class="co__say" data-say aria-live="polite"></span>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
</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.
13 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 “Cohort retention chart” from Animorio and fit it into my siteThe table is a CSS grid with one column for dates and one per week. Newer cohorts have fewer measured weeks: empty cells take their place, and the triangle makes itself.
Each cell mixes the accent colour with white through color-mix, in proportion to the percentage; past a threshold the number inside turns from dark to white to stay readable.
The frame is a single element above the grid: its position chases the cell being read with a spring integrated on GSAP’s ticker, so between distant cells it speeds up and slightly overshoots the arrival.
Row and column give the cohort and its age; the diagonal (row plus column equal) is the cells measured in the same calendar week: if a release went wrong, it shows there.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #ee5a2a | The colour of the cells: the fuller, the more people stayed. |
WEEKS | script.js | 7 | How many weekly cohorts the table shows (4 to 8). |
LIFT | script.js | 1 | How much newer cohorts improve: 0 = all alike, 2 = a lot. |
SNAP | script.js | 1 | How elastic the frame following the cell is: 0.3 = stiff, 2 = very elastic. |
LOOP | script.js | true | Left alone, the demo’s pointer reads a few cells and then lets go. |
In a subscription product’s dashboard, in a monthly investor update, on an analytics tool’s page. The same sprung frame with row, column and diagonal suits any dense table: a timetable, a price matrix, a shift calendar.
The same card, as wide as the screen, with slightly narrower cells. A finger taps or slides over the table and the cell stays read until another is touched.
The cells are already in place, the frame jumps to the cell being read with no spring and numbers and labels change without counting or rolling. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.2 KB; the libraries: GSAP 28 KB.
Tested on 20 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.