Scroll motion on every page
Two ideas from the home page proposal, tried on the rest of the site. Both are live now. The background icons are a few of your own style's icons that drift in the margins while you scroll, on every page with room beside the text. The content reveals fade sections up the first time they scroll into view, like the home page's, on every article, tutorial, and landing page. You can change either one in Customize Theme. These copies keep every reveal I compared, so you can still switch between them with the panel at the bottom left.
See sections animate in
Open any of these, then scroll down with your trackpad, mouse wheel, or arrow keys. Each block fades up the first time it scrolls into view, quick flicks included. To watch again, press Replay reveals in the panel at the bottom left, and everything below the window hides until you scroll to it:
-
Home page
The home page proposal's own reveal: each block rises 24px and fades in over 0.7s, 70ms apart.
-
Cascade
Blocks that arrive together fade up one after another, 60ms apart.
-
Fade up
Each block fades in and rises 12px over 0.45s.
-
Headings first
Headings slide in from the left, and the text under them fades in a beat later.
-
Scroll-linked
Blocks fade up in step with your scrolling, so they move only while you do.
-
Figures
Only images and diagrams grow in; the words never move. This is the one I'd ship on articles.
The AI article starts revealing right after its first screen. The tutorial opens with a video, which never animates, so its reveals start a screen further down. Links to a spot on the page, Home and End, the scrollbar, and find in page still show content at once, so you never land on hidden text. If nothing moves at all, check whether your device is set to reduce motion: reveals turn off then, and the panel says so.
The previews
Each one is a copy of a real page. The article, the tutorial, and Learn open on the home page's reveal. Open one with any reveal, or switch from the panel once you're there:
-
A Deeper Look at Objects in JavaScript
A long JavaScript tutorial with 30 code blocks and a dozen diagrams.
-
How an Agent Like Claude Code Works
An AI Fundamentals article with diagrams and the topic rail on the left.
-
Learn
A landing page of topic tiles and the latest articles.
-
Objects and prototype lookup Quiz
The real quiz for that tutorial, so answers count the way they do on the original page. Quizzes get neither icons nor reveals; there's nothing below the fold to reveal, and the quiz itself never animates in.
Background icons: live
Every page with room beside the text now has them, at your pick of settings: Playful motion, Some icons, Faint, and lines On. Customize Theme has all of the options, in every style:
- Motion: Off, Still, Calm, Playful, Lively, or Drift (the home page's dance), and whether Drift rests after you stop scrolling.
- Icons: Sparse, Some, or Lots.
- Strength: Faint, Soft, or Bold.
- Lines: On or Off.
They stay out of quizzes and live demos, and off for data saver, high contrast, and screens without room beside the text. When a device asks for less motion, they stay still. In the comparison below, Playful moved during 21% of a simulated reading session, and never while the reader was reading:
| Motion | What moves | Moving, scroll then read | Moving while reading | Moving, nudge while reading |
|---|---|---|---|---|
| Still | Nothing. The icons scroll with the page. | 0% | 0% | 0% |
| Calm | They drift slower than the page while you scroll, then stop. | 8% | 0% | 5% |
| Playful (live) | They lag, tilt, and spring back within a second of stopping. | 21% | 0% | 35% |
| Lively | They dance while you scroll and freeze 1.2 seconds after. | 25% | 0% | 47% |
| Drift | The home page's wander and dance; it rests 3 seconds after you stop. | 53% | 33% | 100% |
Article reveals: what each one does to reading
A simulated reader went through the JavaScript tutorial at 1440×900 with each reveal. This table is the most common way through a long article: scroll a screenful, stop, and read. It shows how often the reader stopped with text still fading in on screen, and how long until all of it was readable:
| Reveal | What moves | Stops on fading text | Wait to read | Animations a minute |
|---|---|---|---|---|
| None | Nothing, as on the site today. | 0 of 6 | none | 0 |
| Figures | Only images and diagrams grow in, over 0.4s. The words never move. | 0 of 6 | none | 6 |
| Fade up | Each block fades in and rises 12px over 0.45s. | 6 of 6 | 0.22s | 66 |
| Headings first | Headings slide in; the text under them fades in a beat later. | 6 of 6 | 0.23s | 66 |
| Cascade | Blocks that arrive together fade up 60ms apart. | 6 of 6 | 0.31s | 66 |
| Home page | The home page's reveal: a 24px rise over 0.7s, 70ms apart. | 6 of 6 | 0.44s (up to 0.47s) | 66 |
| Scroll-linked | Blocks fade up in step with your scrolling, with no script running. | 6 of 6 | Until you scroll again | – |
With Scroll-linked, whatever sits at the bottom of the window stays partly faded until you scroll again. Smaller nudges while reading barely trigger reveals (1 or 2 stops in 12, a few times a minute). Fast scrolling animates too, so skimming the tutorial meant about 230 reveals a minute and a wait of 0.27–0.46s at each stop. An earlier version showed content at once above 2,400 pixels a second, but ordinary trackpad flicks in Safari pass that speed, so it skipped most reveals. That guard is now Fast scroll: Shows at once in the panel, which brings skimming back to no waits.
So, should articles animate in?
Not their text. Every reveal that moves the words made the reader wait at almost every stop after a screenful: about a quarter second for the quick fades, and nearly half a second for the home page's reveal. It also put about 66 animations a minute beside what they were reading, and the background icons already move during those same scrolls. Those waits are small one at a time and add up over a 20-minute tutorial. That's what NN/g found too.
Figures, yes. Letting only the images and diagrams grow in never delayed the text. It animates about 6 times a minute, and it gives the illustrations a little entrance. Landing pages, yes: Learn and the section indexes are browsed, not read line by line, so the home page's reveal fits there.
It's not a performance problem. No option measurably changed scrolling, layout, or interaction on the long tutorial, even with the processor slowed fourfold.
Recommendation
What shipped: the home page's reveal (a 24px rise over 0.7s, 70ms apart) on every article, tutorial, and landing page, with every guardrail below. If you'd rather read without it, pick Figures only or Off in Customize Theme. Live demos never animate and never get icons beside them: the labs, games, and runnable coding exercises are marked as live demos, and so is any page with a canvas, an embedded example, Flash, or a CodePen. On every other page, anything with controls that work together, an output, or a live status stays exactly where it is.
What I recommended was to ship reveals in two places, with these guardrails:
- Articles and tutorials: Figures only. Images and diagrams grow in once, over 0.4s. Text, code, tables, and demos never animate.
- Landing pages (Learn, section indexes, the home page): Cascade or the home page's reveal. Trim the home page's 0.7s toward 0.4s; NN/g found fades longer than 0.5s read as slow, and people scroll past them.
- Never Scroll-linked. It can't reveal just once, and whatever sits at the bottom of the window stays half-faded whenever you stop.
- Nothing waits, and nothing is lost. Nothing is hidden by the HTML or the stylesheet; the script holds back only what's below the window, so the page is complete without JavaScript, for search engines, and in print. Above the fold never animates. Jumps, anchors (even when the page glides there), find in page, keyboard focus, and content arriving from above all show at once. Turning on reduced motion or hiding the tab finishes any fade in progress.
- Light to run. One shared IntersectionObserver, each block revealed once, only opacity and transform animated, and no will-change.
- The reader decides. A device that asks for less motion gets no reveals. Customize Theme has a Content reveals choice (Off, Figures only, All sections) beside Background icons.
How I checked
- Performance. The long JavaScript tutorial, against the original page, at normal speed and with the processor slowed fourfold, median of 3 runs:
- Every reveal: no layout shift (CLS 0, apart from a 0.0006 shift in the header while loading that shows up with or without reveals) and no long tasks.
- Scrolling: frame times matched the original (95th percentile 16.7–16.8ms, no slow frames), and main-thread time stayed within the run-to-run noise.
- reveal.js used no measurable time while scrolling, and the slowest click or key press was 40–96ms for every variant, the original page included.
- Live, after shipping. The article, the tutorial, and Learn on kirupa.com, with and without reveals, median of 5 runs: layout shift stayed at 0.0006 or less, with no long tasks and frames at 16.7–16.8ms. The slowest click or key press was 32–48ms at normal speed and 40–80ms with the processor slowed fourfold. The site's reveal script takes about 45ms on a long page, spread across idle time, and 6ms on Learn.
- Trackpads. Flicks made of many small wheel steps with momentum, like a Mac trackpad's, on the AI article and the tutorial, in WebKit (Safari's engine) and in Chromium. With every text reveal, each block that scrolled into view animated in, as many as 15 in one WebKit flick at about 3,600 pixels a second, and nothing was still hidden once the page stopped. The first version of these previews showed most of them at once in WebKit instead: a quick flick on the AI article animated 2 blocks and showed 7 at once.
- Access. 84 automated checks across the six reveals, run in both WebKit and Chromium, all passing:
- Without JavaScript nothing is hidden, and above the fold stays fully visible from the first frame.
- End, Home, the scrollbar (a click in its track or a drag), links to #anchors, keyboard focus, and find in page (Ctrl/Cmd+F, or window.find) all land on readable text. The one exception is Scroll-linked's faded bottom edge.
- A fast fling, Page Down, and Space reveal as they go and leave nothing hidden once they stop. With Fast scroll set to Shows at once, a fling lands on readable text at once.
- A smooth scroll, or a link that glides to a heading, lands on fully visible content, even through the scroll's slow finish. Turning on reduced motion or hiding the page mid-fade finishes the fade at once.
- Replay hides only what's below the window, never what's on screen, and the next scroll reveals it again. At the end of an article, it starts over from the top.
- Printing shows everything. Code blocks, tables, embeds, and the topic rail are never touched, and held-back text stays available to screen readers.
- Reduced motion gets no reveals, and Learn's "Show all" brings its items in readable.
- Research. NN/g's studies of scroll-triggered animation found that they delay users and should be kept to secondary content, not the main text (2017). Fades longer than 0.5s read as too slow, and people scroll past them; they suggest 0.1–0.4s, played once (2023). The start of motion pulls the eye even when it means nothing (Abrams and Christ, 2003). WCAG's Animation from Interactions asks that motion triggered by scrolling can be turned off.
- Background icons. 1,032 placement checks on five real page types, with every motion and all six styles, found no icon over the text, the rails, the header, the footer, the docked orange, or kirupaBot. The site's own tests and 29 functional checks pass on kirupa.com.