Fade In Reveal
Text cards — a title, a sentence — that settle as you read: each one rises 30 px while going from transparent to opaque over the first 32 pixels of its entry into the area, then stays put. One card every 99 px of scrolling, no cascade, no bounce. animation-timeline: view(), zero JavaScript.
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 stage .sdc-fadein-content stacks five .sdc-fadein-item elements in a column, 20 px apart. Each card is 79 px tall: 20 px of padding, a white 14 px h4, a 12 px p in white at 50%, all left-aligned on a background barely lighter than the page, corners rounded at 14 px. The scrolling area shows 280 px of it at a time.
The starting state — opacity: 0; transform: translateY(30px) — and the fx0556FadeIn animation are declared together, with animation-timeline: view() and animation-range: entry entry 40%. The card drives itself: when its top edge touches the bottom of the area the animation starts; when 40% of its height is in, it is done. On opening, the first two cards are in place and the third, 22 px in, sits at 0.70 opacity. The fourth appears between 77 and 109 px scrolled, the fifth between 176 and 208.
Between two arrivals there are 67 px of scrolling with no movement at all: that idle stretch is what keeps the effect quiet. The travel is short compared with the card (30 px for 79), and animation-fill-mode: both holds the card in place once in, with no exit effect at the top. Scrolling back replays the animation in reverse for cards that pass below the bottom edge again. The stage has no imposed height: the travel ends at 285 px, and the fifth card comes to rest 20 px above the bottom of the area.
Accessibility
- Heading levels: each card opens with an
h4. In your page, give it the level that follows the section's title (oftenh3); the styling only depends on the card's class. Theh4s also carry an inlinestyleasking for the Inter font, which is not supplied: remove the attribute or load the font. - Secondary text: the paragraph in white at 50% reaches 5.3:1 on the card background, above the 4.5:1 threshold — but at 12 px it is small for a full sentence. 13 or 14 px reads better without changing the effect.
- Reduced motion: the code has its own
prefers-reduced-motionrule. The 30 px rise goes away there: the arriving card only turns from transparent to opaque, where it sits, and only while the reader scrolls (measured: fourth card at 0 at rest, at 1 after 120 px). The hint holds still and smooth scrolling is turned off. For a display with no transition at all, replaceanimation-namein that block withanimation: none; opacity: 1. - Keyboard and screen readers: the text of cards not yet revealed is already in the page, read normally. The area carries
tabindex="0",role="region"and anaria-label: Tab stops on it in Chromium 149, Firefox 151 and WebKit 26.5 (which ignored it without the attribute), then the arrows scroll it; focus shows as a 2 px violet outline drawn inside the frame.
Browser compatibility
Everything rests on animation-timeline: view() and animation-range: Chrome and Edge since version 115, Safari since 26, Firefox since 159 per MDN. Same opacities read in Chromium 149 and WebKit 26.5; Firefox 151, without these properties, shows the five cards straight away. No script, no external resource.
The block that hides the cards is wrapped in @supports (animation-timeline: view()): where the timeline does not exist, the text is simply displayed. That is the right fallback for content meant to be read — you lose the movement, never a sentence.
The code
HTML structure to paste into your page (the CSS + JS come with your purchase):
<div class="fx-0556-root">
<div class="sdc-scroll-container" tabindex="0" role="region" aria-label="…">
<div class="sdc-fadein-content">
<div class="sdc-fadein-item">
<h4>…</h4>
<p>…</p>
</div>
… ×5
</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 |
|---|---|---|
Range (CSS — animation-range: entry entry 40%) |
the first 40 percent of the entry (32 px for a 79 px card) | The range is measured as a share of the card's height: a 200 px card takes 80 px to appear. entry 0% entry 25% keeps a lively pace on tall cards. |
Distance (CSS — translateY(30px)) |
30 px | 0 for a fade in place, 16 px for a list of messages, 60 px if the cards are large blocks. The value is written only once, in the starting state. |
Spacing (CSS — .sdc-fadein-content { gap: 20px }) |
20 px, that is one card every 99 px | The larger the gap compared with the range, the longer the pause between two arrivals. At 0 the cards follow on without an idle stretch. |
Card (CSS — .sdc-fadein-item { padding: 20px; border-radius: 14px; background; border }) |
white at 4% on a dark background, border at 8% | Background and border are meant for a dark page: on a light page, swap them for a white background and a light grey border, and turn the title and text dark. |
Title then text (CSS — rule to add on .sdc-fadein-item p) |
title and text arrive together | Give the paragraph its own timeline: opacity: 0; animation: fx0556FadeIn linear both; animation-timeline: view(); animation-range: entry 100% cover 35%, inside an @supports. Tried: the card is full at 109 px, its text only starts at 140. |
Stage and area (CSS — padding on .sdc-fadein-content, .sdc-scroll-container { height: 280px }) |
stage as tall as its cards (555 px) in a 280 px area, 285 px of travel | The stage already fits your text: it has no fixed height. With no height or overflow-y on the area, the page drives: in a 400 px window the fifth card waits below the screen and comes in as you scroll (tried). |
FAQ
view() timeline and the same rising fade. The differences are tuning — 30 px of travel here against 60, a 40% range against 50%, left-aligned text instead of centred, slightly tighter margins. If you have Fade Up, you get this one by changing those values. Its point is to come already tuned for text cards meant to be read, where Fade Up is cut for showier blocks. With Stagger Cards (fx-0540) the movement is identical: same 30 px, same 40% range; it ships single-line centred cards, this one title-plus-sentence cards.animation-fill-mode: both keeps the card opaque afterwards. That choice suits reading — a card that pales at the top of the area is hard to read. If you want it, you need a second animation on the exit range; it is not supplied.animation-range: entry 0px entry 40px.