ScrollPremium

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.

CSSViewReveal

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

Portraits of old apple varieties — page of a heritage orchard — Fade In Reveal example 1

① Portraits of old apple varieties — page of a heritage orchard

WhenOn the left, an illustration and the title stay put; on the right, six variety portraits — name, three lines of description, two tags — scroll with the wheel.
WhyThese are texts to be read to the end: the card arrives, settles, and stops moving while you read. The 30 px travel gives just enough life to a column that would otherwise slide as one block.
SettingsLight theme, titles in Georgia 16 px, cards 125 to 143 px tall and 14 px apart (50 to 57 px of scrolling per reveal), tags added by the scene; range and distance from the code. 360 px area. In the capture, a script advances the scrolling one notch per frame.
Transcribed voice messages — voicemail of a nursing practice on mobile — Fade In Reveal example 2

② Transcribed voice messages — voicemail of a nursing practice on mobile

WhenOn a phone, five messages from the morning: the caller's name and the time as the title, the transcript below, then a playback line with the duration and a tag (“Call back”, “Priority”).
WhyThe code's title + sentence match “who called” + “what they said” exactly. Revealing one card at a time separates the messages without a rule or a number.
SettingsWhite cards 127 px tall and 10 px apart, title as a flex row (name left, time right), playback line added by the scene; 273 px area in a phone frame. Capture scrolling driven by script.
Jury comments at an amateur baking contest — panel opened by clicking a score — Fade In Reveal example 3

③ Jury comments at an amateur baking contest — panel opened by clicking a score

WhenOn the left, three cakes and their scores; on the right, a dark panel with the jury's comments. Clicking a cake slides the panel to its three comments — look, taste, technique — which rise into place.
WhyThe reader has just clicked: the rising cards show that the panel changed content, and which way it moved. Each comment stays a title + sentence card, the mark to the right of the title.
SettingsColours from the code on a brown background, 83 px cards 10 px apart, group subheadings added between cards, scroll-behavior: auto. The panel's slide is done by a script in the scene, which also sends the capture's clicks.

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 (often h3); the styling only depends on the card's class. The h4s also carry an inline style asking 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-motion rule. 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, replace animation-name in that block with animation: 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 an aria-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.

Chrome 115+✓ Full (measured, Chromium 149)
Edge 115+✓ Full according to the tables, not verified
Safari 26+✓ Full in the WebKit 26.5 test build; real Safari not verified
Firefox before 159✓ Text fully visible, no animation (measured, Firefox 151)
Firefox 159+✓ Full according to the tables — not verified
Safari before 26✓ Text fully visible, no animation — not verified

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):

index.html — structure
<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 / propertyDefaultEffect
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

Very little, and you may as well know before buying: Fade Up uses the same 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.
Not with this code: the range only covers the entry, and 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.
The distance travelled stays the same (30 px), but the length changes: the range is 40% of each card's height, so 32 px of scrolling for a 79 px card and 80 px for a 200 px one. A long card looks slower than a short one. For the same length everywhere, state the range in pixels: animation-range: entry 0px entry 40px.