Skip to content

ViewakeWake elements as they enter the view.

A tiny, direction-aware reveal library with predictable once and replay modes. Framework-agnostic core, CDN build, React, Next.js, and Vue support.

Viewake icon
LIVE PLAYGROUND

See the state model, not a magic trick.

ViewportScroll down or use the controls.
sleeping below ↓
fade-up · replay · 200ms + 600ms

Now I’m awake.

Pass me, return above me, and scroll down again to compare modes.

Continue scrolling. The card stays awake above the viewport.
Current markup<div data-viewake="fade-up" data-viewake-mode="replay" data-viewake-delay="200" data-viewake-duration="600" data-viewake-easing="cubic-bezier(0.22, 1, 0.36, 1)">Put threshold: 0.25 in Viewake.init({ threshold: 0.25 }).
  1. Scroll down to wake the card.
  2. Continue until it passes above.
  3. Return to the top so it is below again.
  4. Scroll down once more.
Events

Waiting for movement…

Released under the MIT License.