Progress Reveal Steps
Two movements in one block, each on its own scroll clock: a thin bar, pinned 8 px from the top, stretches from 0 to 100% over the area's whole travel (104 px in the demo, whose content barely outgrows the frame), while each step card rises 20 px and turns opaque as it crosses the bottom edge. CSS for the most part; a short script makes the bar follow where the browser cannot.
Updated
This effect is part of Effect.Labs — 846 vanilla effects, some free, some premium. Scroll has 74 effects, including 12 free. Explore the category →
3 usage examples



How it works
The bar. .ss-progress-bar-track is a 4 px rounded track set to position: sticky; top: 8px. Its child .ss-progress-bar-fill carries an indigo → magenta gradient (#6366f1 → #d946ef) and starts at transform: scaleX(0), origin on the left. The fx0588ProgressBarGrow animation takes it to scaleX(1); animation-timeline: scroll() plugs it into the nearest scrolling area, .sdc-scroll-container (280 px tall; the content no longer has an imposed height and measures 376 px, hence 104 px of travel). Readings in Chromium: 13.5% of the track after 14 px scrolled, 54% at 52, 81% at 78, full at 104.
The steps. Each .ss-progress-item starts at opacity: 0; translateY(20px) and replays fx0588FadeUp on animation-timeline: view(), range entry entry 50%: the reveal takes the first half of the card's passage under the bottom edge. For the demo's 70 px cards that is 35 px of scrolling — the fourth, the only one below the edge at the start, goes from 0 to 1 opacity between 14 and 49 px (0.29 at 24 px, 0.74 at 40). The first three have already entered on opening: they show in place.
The two clocks do not talk to each other: the bar reads the area, each card reads itself. Everything hidden at the start is hidden inside an @supports (animation-timeline: …); a browser that does not know these timelines therefore shows the cards flat, and the supplied script (it only runs in that case) recomputes the bar on every scroll event. The bar's keyframes spell out both ends, from and to: with to alone, the WebKit 26.5 test build showed 25% at mid-travel instead of 50.
Accessibility
- What the bar says, and to whom: it shows how far the scrolling has gone, not which step is “current”, and only to the eye — two empty
divs with no role and no value. It is a decorative marker; if progress matters, write it out (“step 3 of 4”). - Invisible but present cards: a card at
opacity: 0stays in the reading order, and in the tab order if it holds a link. A screen reader reads all four steps straight away; a keyboard user can reach a link that has not appeared yet, which the browser then scrolls into view. - Headings and contrast: the titles are
h4s with no level above them — replace them with the level that follows yours. Violet#a78bfaon the card background: 6.8:1; text at 50% white, 11.5 px: 5.3:1. The bottom hint, in white, swings between 5.3:1 and 14:1: decorative, it is hidden from screen readers (aria-hidden); remove it in production. - Keyboard and reduced motion: the area carries
tabindex="0",role="region"and anaria-label: it takes focus on Tab in Chromium 149, Firefox 151 and WebKit 26.5 (arrows, End), with a 2 px violet outline drawn inside. Underprefers-reduced-motion, the steps no longer slide: they brighten in place as you scroll (measured: fourth card at 0 at rest, at 1 at the bottom of the travel). The bar keeps following the position: it never moves without the reader's gesture. The hint stops blinking and smooth scrolling is turned off.
Browser compatibility
animation-timeline (scroll() and view()) and animation-range: Chrome and Edge 115, Safari 26, Firefox 159 per the MDN tables. Bench-tested: Chromium 149 and WebKit 26.5 (linear bar and animated cards), Firefox 151 (bar through the script, flat cards). No dependency, no request.
No timeline, script present: the bar follows, the steps sit in place. Neither timeline nor script: empty bar, steps in place — the content stays whole. When the content fits in the area there is no travel: empty bar there too (measured).
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0588-root">
<div class="sdc-scroll-container" tabindex="0" role="region" aria-label="…">
<div class="ss-progress-content">
<div class="ss-progress-bar-track">
<div class="ss-progress-bar-fill"></div>
</div>
<div class="ss-progress-items">
<div class="ss-progress-item">
<h4>…</h4>
<p>…</p>
</div>
… ×4
</div>
</div>
</div>
<span class="sdc-scroll-hint" aria-hidden="true">…</span>
</div>
One-time payment, no subscription — the code is yours forever
Customize
Options passed to the API or data-* attributes:
| Option / property | Default | Effect |
|---|---|---|
Bar colours (CSS — .ss-progress-bar-fill { background }) |
gradient #6366f1 → #d946ef |
The gradient is painted across the full width and then shrunk by scaleX: the second colour tightens with it and stays visible at the tip of the bar from start to finish. |
Thickness and pinning (CSS — .ss-progress-bar-track { height; top }) |
4 px, pinned 8 px from the top | 6 to 8 px reads from a distance (display screen); top: 0 and no radius make an edge bar. Content passes behind the track: add a sticky cover in the background colour if that bothers you. |
Reveal range (CSS — animation-range: entry entry 50%) |
first half of the entry | entry 0% entry 100% spreads the reveal over the card's whole entry; a tall card makes the movement slower, since the range is proportional to its height. |
Distance (CSS — translateY(20px) in the @supports block) |
20 px | 0 keeps the fade only; a negative value makes the card come down to its place instead of rising to it. The value is written in that one place: the keyframes only describe the arrival. |
Gap between steps (CSS — .ss-progress-items { gap }) |
16 px | With four tight cards, three are on screen from the start and only the last one animates. At gap: 160px they arrive one by one all along the travel (tried). |
Content length (CSS — padding on .ss-progress-content, card gap) |
no fixed height: 376 px, 104 px of travel | The bar fills over whatever overflows the area: the more steps you have, or the wider they are spaced, the longer its travel. Remove height and overflow-y from the area so the whole page drives: the bar then pins 8 px from the top of the window (tried). |
FAQ
view() timeline and settles in as it enters. Pick the other one for an article, this one for a series of steps or lines you want to see arrive. Similar name, different effect: Progress Reveal Text (fx-0539) has neither bar nor cards; it fills the letters of a word with colour as you scroll.animation-timing-function: steps(4, end) on .ss-progress-bar-fill cuts the travel into four plateaus (tried: a quarter of the bar every 26 px over the demo's 104 px). They will still be tied to the distance scrolled, not to a card actually passing: that would take a script.