
Speeding marquee
Scroll, Text, Hover
The features section of a deploy platform, on near black: six cards in a grid and one soft, wide light that follows the pointer with a small lag, lighting the thin border of the cards it crosses and, faintly, their background. The card under the pointer lifts by a pixel, its icon redraws itself and a small chevron appears; on the way out the light slowly fades.
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>
<!--
"Spotlight cards" 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>Cards lit by a light that follows the pointer</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 features section of a deploy platform: one soft light follows the pointer over the whole grid and lights
the thin borders of the cards it passes; the card under the pointer lifts a pixel and draws its icon -->
<section class="features" aria-labelledby="titolo">
<header class="head">
<p class="eyebrow">Sendra platform</p>
<h1 class="title" id="titolo">Everything ships from one place</h1>
</header>
<div class="grid" data-grid>
<article class="card" data-card tabindex="0">
<span class="icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path pathLength="1" d="M13 2.8 5.2 13.4h5.9L10.4 21.2l8.4-11h-6.1z"/></svg>
</span>
<h2 class="card__title">Instant deploys <svg class="chev" viewBox="0 0 16 16" aria-hidden="true"><path d="m6 4 4 4-4 4"/></svg></h2>
<p class="card__text">Push to main and it is live in eleven seconds.</p>
</article>
<article class="card" data-card tabindex="0">
<span class="icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path pathLength="1" d="M12 3.2a8.8 8.8 0 1 0 0 17.6 8.8 8.8 0 1 0 0-17.6zM3.4 12h17.2M12 3.2c2.4 2.4 3.6 5.3 3.6 8.8s-1.2 6.4-3.6 8.8c-2.4-2.4-3.6-5.3-3.6-8.8S9.6 5.6 12 3.2z"/></svg>
</span>
<h2 class="card__title">Edge cache <svg class="chev" viewBox="0 0 16 16" aria-hidden="true"><path d="m6 4 4 4-4 4"/></svg></h2>
<p class="card__text">Pages served from 38 regions, close to every visitor.</p>
</article>
<article class="card" data-card tabindex="0">
<span class="icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path pathLength="1" d="M10.2 13.8a4.2 4.2 0 0 0 6 0l3-3a4.2 4.2 0 0 0-6-6l-1.1 1.1M13.8 10.2a4.2 4.2 0 0 0-6 0l-3 3a4.2 4.2 0 0 0 6 6l1.1-1.1"/></svg>
</span>
<h2 class="card__title">Preview links <svg class="chev" viewBox="0 0 16 16" aria-hidden="true"><path d="m6 4 4 4-4 4"/></svg></h2>
<p class="card__text">Every branch gets its own address to share.</p>
</article>
<article class="card" data-card tabindex="0">
<span class="icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path pathLength="1" d="M4.2 12a7.8 7.8 0 1 0 2.3-5.5L4.2 8.8M4.2 3.9v4.9h4.9M12 8v4.4l2.8 1.8"/></svg>
</span>
<h2 class="card__title">One-click rollback <svg class="chev" viewBox="0 0 16 16" aria-hidden="true"><path d="m6 4 4 4-4 4"/></svg></h2>
<p class="card__text">Go back to any of the last 50 releases.</p>
</article>
<article class="card card--more" data-card tabindex="0">
<span class="icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path pathLength="1" d="M6.2 16.6V11a5.8 5.8 0 0 1 11.6 0v5.6l1.8 2H4.4zM9.8 18.6a2.2 2.2 0 0 0 4.4 0"/></svg>
</span>
<h2 class="card__title">Usage alerts <svg class="chev" viewBox="0 0 16 16" aria-hidden="true"><path d="m6 4 4 4-4 4"/></svg></h2>
<p class="card__text">A note before you reach your monthly limit.</p>
</article>
<article class="card card--more" data-card tabindex="0">
<span class="icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path pathLength="1" d="M6 3.4h8.6l3.8 3.8v13.4H6zM14.4 3.4v4h4M8.8 11.4h6.6M8.8 14.6h6.6M8.8 17.8h4"/></svg>
</span>
<h2 class="card__title">Audit log <svg class="chev" viewBox="0 0 16 16" aria-hidden="true"><path d="m6 4 4 4-4 4"/></svg></h2>
<p class="card__text">Who changed what, kept for twelve months.</p>
</article>
</div>
</section>
<!-- the fake pointer of the autopilot -->
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 12l-6.3 1.5-3.4 5.8z"/></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.
26 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 “Spotlight cards” from Animorio and fit it into my siteThe light’s position lives in two CSS variables on the grid, --x and --y. Every frame the script hands it to each card minus the card’s own position (--cx, --cy), so each card draws its share of the same light with a radial-gradient: neighbouring cards light up together, as under a real spotlight.
The glowing border is a pseudo-element as big as the card with one pixel of padding: inside it is the light’s gradient, and a mask with mask-composite exclude removes everything but that pixel. A second pseudo-element paints the fill, wider and much fainter.
The light does not jump onto the pointer: every frame it covers part of the remaining distance, 1 minus LIGHT_LAG raised to the elapsed time, so the lag is the same at 60 and 120 frames per second. Turning on and off is a tween on the opacity, --a.
The card holding the point is found from its offsetLeft and offsetTop inside the grid. When it changes, the old one settles down with power3.out and the new one rises by LIFT pixels with back.out, the icon redraws from stroke-dashoffset 1 to 0 (pathLength 1) and the chevron slides in from the left.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | '#8b7cff' | The colour of the light, on the border and inside the cards. |
LIGHT_SIZE | script.js | 260 | How wide the light is, in pixels. |
LIGHT_LAG | script.js | 0.86 | How far the light lags behind the pointer (0 = it follows at once). |
BORDER_GLOW | script.js | 1 | How bright the thin border of the cards gets. |
FILL_GLOW | script.js | 1 | How much the cards’ background lights up under the light. |
LIFT | script.js | 1 | How many pixels the card under the pointer lifts. |
FADE | script.js | 0.6 | How many seconds the light takes to fade on the way out. |
For the features or pricing section of a software product, a developer tool or an AI app on a dark background: the light tells visitors the cards can be touched without extra buttons.
The same light, with touch instead of hover: tapping a card brings the light onto it and lifts it. The cards become four on two columns, so they all fit in the box.
The light does not chase: it appears straight on the card and fades in and out. The cards do not lift and the icons are already drawn.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.8 KB; the libraries: GSAP 28 KB.
Tested on 25 October 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.