
Speeding marquee
Scroll, Text, Hover
A post on Slowpost, a made-up blog, where every paragraph keeps its readers’ comments in the margin: a small speech bubble with the count. Point at a paragraph and the others step back while its bubble lifts; touch the bubble and a highlighter sweeps across the sentence the readers quoted while the comments slide out beside it, one after another, with the quote in italics on top. Like a comment and the heart swells and the number rolls; answer and the new comment drops in at the bottom while the bubble in the margin counts one more. On a phone the comments rise from the bottom as a sheet.
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>
<!--
"Margin comments" 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 blog post with readers' comments in the margin of each paragraph</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/newsreader@5.3.0/opsz-italic.css">
<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 post on Slowpost, a made-up blog: every paragraph keeps its readers' comments in the margin, as a small
bubble with the count. Point at a paragraph and the others step back; touch the bubble and the sentence the
readers quoted gets highlighted while the comments slide out beside it. You can like a comment and add yours. -->
<article class="post" data-post>
<header class="post__top">
<span class="brand">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4 5.5h12M4 10h8M4 14.5h10" /></svg>
Slowpost
</span>
<span class="post__meta">Essay · 6 min read</span>
</header>
<h1 class="post__title">The year I stopped <em>answering</em> emails</h1>
<p class="post__by"><span class="av av--small" style="--c:#e7d3c3">NK</span> Noa Kessler · 12 Nov</p>
<div class="post__body">
<div class="par" data-par="0">
<p>For twelve months I read my inbox once a week, on Friday morning, with a coffee and a timer. <span class="hl" data-hl>Nothing urgent ever waited longer than a phone call.</span></p>
<button class="bub" type="button" data-bub aria-label="2 responses to this paragraph">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4 4.5h12a1.5 1.5 0 0 1 1.5 1.5v6.5a1.5 1.5 0 0 1-1.5 1.5H9l-3.6 2.6V14H4a1.5 1.5 0 0 1-1.5-1.5V6A1.5 1.5 0 0 1 4 4.5Z" /></svg>
<span class="bub__n" data-n>2</span>
</button>
</div>
<div class="par" data-par="1">
<p>The surprise was not the quiet. <span class="hl" data-hl>It was how many questions had answered themselves by Friday,</span> and how few people noticed I was slow.</p>
<button class="bub" type="button" data-bub aria-label="14 responses to this paragraph">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4 4.5h12a1.5 1.5 0 0 1 1.5 1.5v6.5a1.5 1.5 0 0 1-1.5 1.5H9l-3.6 2.6V14H4a1.5 1.5 0 0 1-1.5-1.5V6A1.5 1.5 0 0 1 4 4.5Z" /></svg>
<span class="bub__n" data-n>14</span>
</button>
</div>
<div class="par" data-par="2">
<p>I still keep the timer. <span class="hl" data-hl>Twenty minutes, then the laptop closes,</span> whatever is left can wait for next week.</p>
<button class="bub" type="button" data-bub aria-label="5 responses to this paragraph">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4 4.5h12a1.5 1.5 0 0 1 1.5 1.5v6.5a1.5 1.5 0 0 1-1.5 1.5H9l-3.6 2.6V14H4a1.5 1.5 0 0 1-1.5-1.5V6A1.5 1.5 0 0 1 4 4.5Z" /></svg>
<span class="bub__n" data-n>5</span>
</button>
</div>
</div>
<!-- the comments of the chosen paragraph -->
<aside class="panel" data-panel aria-hidden="true" aria-label="Responses">
<div class="panel__head">
<span class="panel__title"><span data-ptotal>14</span> responses</span>
<button class="close" type="button" data-close aria-label="Close responses">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M5.5 5.5l9 9M14.5 5.5l-9 9" /></svg>
</button>
</div>
<blockquote class="quote" data-quote>It was how many questions had answered themselves by Friday,</blockquote>
<ul class="list" data-list></ul>
<form class="reply" data-reply autocomplete="off">
<span class="av av--small" style="--c:#d9e4dc">YO</span>
<input class="reply__in" data-input type="text" placeholder="Add a response" aria-label="Your response">
<button class="reply__go" type="submit" data-send disabled>Post</button>
</form>
</aside>
</article>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.
40 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 “Margin comments” from Animorio and fit it into my siteEach paragraph is a position: relative container and the bubble is an absolutely positioned button in the right margin, outside the text, so the lines never move. The quoted sentence is a span with a gradient background zero wide: the highlighter is only background-size going from 0% to 100%.
On pointerenter GSAP takes the other paragraphs to DIM opacity and lifts the bubble with back.out; while the panel is open the chosen paragraph stays lit and the others dimmed.
The panel lives inside the article, absolutely positioned: on a computer it comes from xPercent 104 to 0 with expo.out, on a phone from yPercent 104, like a sheet. Quote, comments and field come after it, staggered, and the avatars pop in with a little bounce.
Likes and responses share one function: the old number rises and fades, the text changes, the new one comes up from below with back.out. The new comment opens with its height growing from zero and clearProps at the end.
| Name | File | Default | What it changes |
|---|---|---|---|
SLIDE_TIME | script.js | 0.75 | How many seconds the comments panel takes to slide out. |
STAGGER | script.js | 0.07 | The delay between one comment and the next as they come in. |
DIM | script.js | 0.38 | How much the other paragraphs dim while you look at one (1 = not at all). |
HIGHLIGHT_TIME | script.js | 0.6 | How many seconds the highlighter takes to sweep across the quoted sentence. |
LIKE_POP | script.js | 1.4 | How much the heart swells when you like a comment. |
TYPE_SPEED | script.js | 0.04 | Seconds per letter when the autopilot types the reply. |
REPLY | script.js | "Friday inbox is the best habit I picked up this year." | The reply the autopilot types. |
On a personal blog, a newsletter published on the web, an online magazine or product documentation: wherever readers discuss one precise sentence rather than the whole piece, and a reader wants to see at once where the conversation gathers.
Below 560 pixels the panel becomes a sheet rising from the bottom, almost four fifths of the article tall; the bubbles stay in the margin, narrower, and the type is sized on the screen height too.
No movement or bounces: the panel fades in, the highlighter is already there, the numbers change without rolling; the drawn pointer is hidden.
GSAP 3.15.0, Newsreader (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.0 KB; the libraries: GSAP 28 KB.
Tested on 14 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.