StealThis .dev

Transition Card

Scroll-triggered card transitions with smooth fade, blur, and scale effects. Cards smoothly transition as you scroll through the sequence.

Open in Lab
html css javascript
Targets: JS HTML

Code

Transition Card

A scroll-triggered card component that creates smooth transitions between cards as you scroll. Each card fades, blurs, and scales based on its position relative to the viewport, creating a cinematic scrolling experience.

How it works

The component uses scroll position calculations to determine each card’s visual state:

  1. Scroll Progress — Calculates progress through the scroll area
  2. Distance Calculation — Determines each card’s distance from the active position
  3. Visual Effects — Applies opacity, blur, scale, and translateY based on distance
  4. Smooth Transitions — Uses CSS transitions for smooth visual changes
  5. Performance — Uses requestAnimationFrame for optimized updates

Key features

  • Scroll-triggered card transitions
  • Smooth fade, blur, and scale effects
  • Multiple card themes (Aurora, Ember, Lagoon, Noir)
  • Responsive design
  • Performance optimized with RAF
  • Accessibility support with aria-hidden

When to use it

  • Storytelling sections
  • Product showcases
  • Feature highlights
  • Scroll narratives
  • Portfolio galleries
  • Interactive presentations