Browse docs

Reveal

Elements that fade/slide in as they enter the viewport. Zero JavaScript via scroll-driven animations.

stableSince 0.2.0

On this page
  1. Semantic HTML
  2. Delay variants
  3. Progressive enhancement
ExampleScroll inside to see moreOpen in a new page

The .pl-c-reveal component applies a fade-and-slide animation triggered by scroll position. Uses animation-timeline: view() with zero JavaScript and no IntersectionObserver.

Semantic HTML

<div class="pl-c-reveal">
  <h2>Section title</h2>
  <p>Content fades in as this enters the viewport.</p>
</div>

Delay variants

Stagger reveals with [data-delay]:

<div class="pl-l-grid">
  <div class="pl-c-card pl-c-reveal">Card 1</div>
  <div class="pl-c-card pl-c-reveal" data-delay="1">Card 2</div>
  <div class="pl-c-card pl-c-reveal" data-delay="2">Card 3</div>
  <div class="pl-c-card pl-c-reveal" data-delay="3">Card 4</div>
</div>

Progressive enhancement

Where animation-timeline: view() is not supported, elements are always visible (opacity: 1, no transform). The same visible fallback applies when the user requests reduced motion or forced colors. In supporting browsers with motion enabled, offscreen elements become visible as they enter the viewport.

Search Porchlight