
Speeding marquee
Scroll, Text, Hover
A hover animation in the style of premium products: the dropdown for choosing the model in a made up AI chat app, Nerva, in frosted glass on a near black page. A glass pill slides on a spring under the item at the pointer, and beside the menu the model's spec card follows it up and down on a slower spring: name, line and badge come in from the side you arrive from, the three bars for speed, reasoning and cost stretch on springs and the context and the price roll to their numbers. Clicking chooses the model: the check draws itself, the header rolls to the new name and a reflection crosses the card.
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>
<!--
"AI chat dropdown" 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 AI chat dropdown menu with the spec card that follows the item</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 open model dropdown of an AI chat app, Nerva, in frosted glass on a near black page. A glass pill slides
on a spring to the row under the pointer, and beside the menu a spec card follows that row up and down: its
name, line, bars and numbers change for the model you are on. Click a row to choose it: the check draws
itself there and the header rolls to the new name. On a phone the card sits under the menu. -->
<div class="ui" data-ui>
<section class="menu" data-menu aria-label="Choose a model">
<span class="menu__light" data-light aria-hidden="true"></span>
<header class="menu__head">
<span class="menu__title">Model</span>
<span class="menu__current" aria-hidden="true"><span class="menu__current-in" data-current>Nerva Core</span></span>
</header>
<div class="menu__list" data-list role="menu">
<span class="menu__pill" data-pill aria-hidden="true"><span class="menu__pill-glow" data-pill-glow></span></span>
<span class="menu__bridge" data-bridge aria-hidden="true"></span>
<button class="row" type="button" role="menuitemradio" aria-checked="false" data-row>
<span class="row__tile row__tile--auto" data-tile aria-hidden="true">
<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="2.4"/><ellipse cx="12" cy="12" rx="8.2" ry="3.5" transform="rotate(-32 12 12)"/><ellipse cx="12" cy="12" rx="8.2" ry="3.5" transform="rotate(32 12 12)" opacity=".55"/></svg>
</span>
<span class="row__text"><span class="row__name" data-name>Auto</span><span class="row__sub">Picks the model for each message</span></span>
<span class="row__end" aria-hidden="true"><svg class="row__check" viewBox="0 0 24 24"><path data-check pathLength="1" d="M5.5 12.6l4.2 4.1 8.8-9.3"/></svg></span>
</button>
<button class="row" type="button" role="menuitemradio" aria-checked="false" data-row>
<span class="row__tile row__tile--swift" data-tile aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M13.2 3.2 5.6 13.3h5.5l-.9 7.5 7.6-10.1h-5.5z"/></svg>
</span>
<span class="row__text"><span class="row__name" data-name>Nerva Swift</span><span class="row__sub">Fastest for everyday tasks</span></span>
<span class="row__end" aria-hidden="true"><svg class="row__check" viewBox="0 0 24 24"><path data-check pathLength="1" d="M5.5 12.6l4.2 4.1 8.8-9.3"/></svg></span>
</button>
<button class="row" type="button" role="menuitemradio" aria-checked="true" data-row>
<span class="row__tile row__tile--core" data-tile aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M12 3.4l7.4 4.3v8.6L12 20.6l-7.4-4.3V7.7z"/><circle cx="12" cy="12" r="2.6"/></svg>
</span>
<span class="row__text"><span class="row__name" data-name>Nerva Core</span><span class="row__sub">Balanced, great at writing</span></span>
<span class="row__end" aria-hidden="true"><svg class="row__check" viewBox="0 0 24 24"><path data-check pathLength="1" d="M5.5 12.6l4.2 4.1 8.8-9.3"/></svg></span>
</button>
<button class="row" type="button" role="menuitemradio" aria-checked="false" data-row>
<span class="row__tile row__tile--deep" data-tile aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M12 3.8l8 4.4-8 4.4-8-4.4z"/><path d="M4 12.2l8 4.4 8-4.4"/><path d="M4 16l8 4.4 8-4.4" opacity=".55"/></svg>
</span>
<span class="row__text"><span class="row__name" data-name>Nerva Deep <span class="row__tag">New</span></span><span class="row__sub">Thinks longer on hard problems</span></span>
<span class="row__end" aria-hidden="true"><svg class="row__check" viewBox="0 0 24 24"><path data-check pathLength="1" d="M5.5 12.6l4.2 4.1 8.8-9.3"/></svg></span>
</button>
</div>
</section>
<div class="spec-wrap" data-spec-wrap>
<aside class="spec" data-spec aria-live="polite">
<span class="spec__light" data-light aria-hidden="true"></span>
<span class="spec__orb" aria-hidden="true"><span class="spec__orb-a" data-orb></span><span class="spec__orb-b" data-orb-b></span></span>
<span class="spec__sweep" aria-hidden="true"><span class="spec__sweep-band" data-sweep></span></span>
<div class="spec__head">
<span class="spec__name" data-spec-name>Nerva Core</span>
<span class="spec__badge" data-spec-badge>Default</span>
</div>
<p class="spec__line" data-spec-line>Our everyday model: quick, careful and good with long documents.</p>
<div class="spec__bars">
<div class="bar"><span class="bar__label">Speed</span><span class="bar__track"><span class="bar__fill" data-fill><span class="bar__tip"></span></span></span></div>
<div class="bar"><span class="bar__label">Reasoning</span><span class="bar__track"><span class="bar__fill" data-fill><span class="bar__tip"></span></span></span></div>
<div class="bar"><span class="bar__label">Cost</span><span class="bar__track"><span class="bar__fill" data-fill><span class="bar__tip"></span></span></span></div>
</div>
<div class="spec__stats">
<div class="stat"><span class="stat__label">Context</span><span class="stat__value" data-ctx>200K</span></div>
<div class="stat"><span class="stat__label">Per 1M tokens</span><span class="stat__value" data-price>$3.00</span></div>
</div>
</aside>
</div>
</div>
<svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5.2 3.2 18.6 13l-6.1.9 3.6 6.6-2.6 1.3-3.5-6.7-4.6 4.2z"/></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.
38 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 “AI chat dropdown” from Animorio and fit it into my siteMenu and card are two boxes with backdrop-filter, a gradient from the top and five shadows: three inset (the 1px edge and the light at the top) and two soft outer ones. The page has two faint radial-gradients and a feTurbulence grain in an SVG used as an image. The edge that lights up is a layer with a one pixel padding and a radial-gradient masked with the content-box trick, which shows only the frame; the script writes its position in two CSS variables.
All rows have the same height (a --row variable in a clamp with vh), so the item is found with a sum: the pointer's y minus the top of the list, divided by the height of a row. That works the same for the real mouse, for a finger sliding over the list (touch-action: none) and for the drawn pointer of the preview.
The pill, the card and the three bars are springs written by hand: acceleration = stiffness times distance minus damping times velocity, integrated in GSAP's ticker in steps of 1/240 of a second. The card uses the same spring with stiffness and damping multiplied by a lag, so it arrives after the pill and swings less. The positions are written as translate3d on the outer element; the glass inside stays with the CSS.
Name, badge and sentence leave in 0.11 seconds upwards or downwards, depending on whether the new item is above or below, and come back from the other side with a staggered back.out; context and price are an object GSAP takes to the new values with power3.out and that is rewritten in tabular figures at every step. The light behind the card and the one in the pill change colour with backgroundColor.
On click the row goes to 0.975 and comes back with an elastic.out, the old check erases and the new one draws itself with pathLength 1 and strokeDashoffset, the name in the header leaves upwards and comes back from below, and a band of light crosses the card with xPercent. With a finger the choice happens where it is lifted.
A looping timeline moves an object in list units (x in shares of the width, y in rows), and at every update converts it to pixels with the current sizes: the round stays right even if the window changes size. It starts from the load event, so every preview shows the same moment at the same time, and it stops as soon as the real pointer moves.
| Name | File | Default | What it changes |
|---|---|---|---|
BRAND | script.js | 'Nerva' | The name of the made up AI, before the model names. |
START | script.js | 2 | The model chosen at the start: 0 Auto, 1 Swift, 2 Core, 3 Deep. |
STIFFNESS | script.js | 320 | How stiff the pill's spring is. |
DAMPING | script.js | 24 | How quickly it settles: less is bouncier. |
CARD_LAG | script.js | 0.55 | How much slower than the pill the card follows, from 0.2 to 1. |
WIDEN | script.js | 8 | How much the name under the pointer widens, on the width axis. |
EDGE_LIGHT | script.js | 1 | How bright the edges get near the pointer. |
IDLE | script.js | 4 | How many seconds without touching before the drawn pointer comes back. |
AUTO | script.js | true | Whether the drawn pointer goes round by itself until someone moves the real one. |
--violet | style.css | #8f7bff | The first colour: lights, bars, badge. |
--cyan | style.css | #5fd8ff | The second colour. |
--page | style.css | #0a0b0f | The page. |
For an AI chat app, a writing or coding assistant, a SaaS tool that lets you choose between several engines or plans: a dropdown that explains each item as you go over it, without opening another page.
The same animation with adapted sizes: under 600 pixels the spec card sits under the menu, as wide as it, and changes without moving; the rows take their height from the screen too, and on a short screen the card's sentence is left out. A finger slides over the items like the pointer and chooses the one it is lifted from.
Nothing moves: the pill jumps to the item with a fade, the card stays still and changes words, bars and numbers with a fade, the name at the top changes with a fade; in the preview the items light up in turn without a pointer.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.
Tested on 2 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.