
Speeding marquee
Scroll, Text, Hover
The opening of a made-up AI assistant, Corvine: a large prompt box with a thin light running around its border, a placeholder that writes and erases its own ideas and, below, two rows of suggestions drifting slowly in opposite directions. A tapped pill flies into the box and types itself, the send button lights up, turns into a stop square when pressed, and the answer arrives with a shimmer over grey lines.
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>
<!--
"Prompt with suggestions" 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 prompt box with scrolling suggestions</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 opening of a made-up AI assistant, Corvine: a prompt box with a slow beam of light on its border, a
placeholder that writes its own ideas, and two rows of suggestions drifting in opposite directions -->
<section class="hero" aria-label="Corvine">
<div class="brand">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2.6c.7 4.9 2.7 6.9 7.6 7.6-4.9.7-6.9 2.7-7.6 7.6-.7-4.9-2.7-6.9-7.6-7.6 4.9-.7 6.9-2.7 7.6-7.6Z"/><path d="M18.4 15.4c.3 1.9 1 2.6 2.9 2.9-1.9.3-2.6 1-2.9 2.9-.3-1.9-1-2.6-2.9-2.9 1.9-.3 2.6-1 2.9-2.9Z"/></svg>
<span class="brand__name" data-brand>Corvine</span>
</div>
<h1 class="title">What should we work on?</h1>
<form class="box" data-box autocomplete="off">
<span class="box__beam" aria-hidden="true"></span>
<div class="box__inner">
<label class="box__field">
<span class="sr">Message</span>
<input class="box__input" data-input type="text" spellcheck="false">
<span class="box__ph" data-ph aria-hidden="true"><span data-phtext></span><span class="box__caret" data-caret></span></span>
</label>
<div class="box__bar">
<div class="box__tools">
<button class="tool tool--round" type="button" aria-label="Attach a file">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 3.2v9.6"/><path d="M3.2 8h9.6"/></svg>
</button>
<button class="tool" type="button" data-search aria-pressed="false">
<svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5.6"/><path d="M2.4 8h11.2"/><path d="M8 2.4c1.6 1.6 2.3 3.5 2.3 5.6S9.6 12 8 13.6C6.4 12 5.7 10.1 5.7 8S6.4 4 8 2.4Z"/></svg>
<span>Search</span>
</button>
</div>
<button class="send" type="submit" data-send aria-label="Send" disabled>
<svg class="send__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 12.8V3.6"/><path d="M4 7.4 8 3.4l4 4"/></svg>
<span class="send__stop" aria-hidden="true"></span>
</button>
</div>
</div>
</form>
<div class="below">
<div class="rows" data-rows>
<div class="row" data-row="0"><div class="row__track" data-track></div></div>
<div class="row" data-row="1"><div class="row__track" data-track></div></div>
</div>
<div class="answer" data-answer aria-live="polite">
<p class="answer__head"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 2.6c.7 4.9 2.7 6.9 7.6 7.6-4.9.7-6.9 2.7-7.6 7.6-.7-4.9-2.7-6.9-7.6-7.6 4.9-.7 6.9-2.7 7.6-7.6Z"/></svg><span class="answer__state" data-state>Thinking</span></p>
<div class="answer__lines" data-lines><span></span><span></span><span></span></div>
<p class="answer__text" data-text></p>
</div>
</div>
</section>
<svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 2.8v16.4l4.2-4 2.8 6.2 2.9-1.3-2.8-6.1h5.9Z"/></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.
19 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 “Prompt with suggestions” from Animorio and fit it into my siteThe box has a one pixel padding and above it a layer with a conic-gradient that is almost all transparent, with a violet and pink tail: a mask with mask-composite lets only the ring of the border show. GSAP takes the --a variable from 0 to 360 in an endless loop and the gradient starts from calc(var(--a) * 1deg); while the assistant answers the same tween runs three times faster with timeScale.
Each row repeats its five pills three times, and the width of one lap is read from the distance between the first pill and the sixth. A single gsap.ticker moves the two tracks in opposite directions and wraps them back with gsap.utils.wrap; each row’s speed chases 1 or 0 with a little damping, so under the pointer it slows down and stops instead of halting at once.
The tapped pill is copied into an absolute element at the same position, read with getBoundingClientRect. A timeline lifts it by six pixels, carries it to the start of the box with power3.inOut and fades it with a touch of blur, while a tween on a number types the real text into the input letter by letter.
When Send is pressed the arrow rises and the stop square comes in on a spring. The suggestions drop away and make room for the answer: three grey lines stretch out with scaleX and a shimmer crosses them, a gradient two and a half times the line’s width slid with background-position from a variable animated by GSAP. After the waiting time the lines fade and the words come in one by one.
The autopilot is an async function that waits with gsap.delayedCall and computes every position on the spot, so it holds up after a resize too: it goes to the row, stops it, picks the pill closest to the centre, presses it, goes to the send button and waits for the answer. The first real touch stops it; after nine quiet seconds it starts again.
| Name | File | Default | What it changes |
|---|---|---|---|
BRAND | script.js | 'Corvine' | The name of the made-up assistant, written above the headline and in the first placeholder. |
DRIFT | script.js | 22 | The pixels per second of the two rows of suggestions. |
BEAM_TURN | script.js | 9 | The seconds of one lap of the light on the border of the box. |
TYPE_SPEED | script.js | 0.026 | The seconds per letter as the suggestion types itself into the box. |
THINK | script.js | 1.9 | The seconds the assistant thinks before answering. |
HOLD | script.js | 2.4 | The seconds the answer stays before the drawn pointer starts again. |
For the opening of an AI assistant, an app with a chat or a tool you use by typing: the box invites you to write, the placeholder and the suggestions show what you can ask, and anyone who doesn’t know where to start taps a pill.
The same animation with adapted sizes: the headline and the box are sized on the width and the height, the Search pill keeps only its globe under 420 pixels, the rows drift the same way and a tap on a pill sends it into the box.
No drifting, no flight and no lap of the light: the rows stay still, the light rests on one corner, the placeholder changes sentence with a fade, the pill’s text appears in the box at once and the answer arrives with a fade, without the shimmer.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.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.