Reveal

@sushindustries/ui

Fades and rises its children the first time they reach the viewport. Never un-reveals.

4 min read
View as MarkdownEdit on GitHub

Props

PropTypeDefaultDoes
childrenReactNode-
delay?number0Stagger within a section, in milliseconds.

Notes

There's no prop to re-trigger a RevealRevealFades and rises its children the first time they reach the viewport. Never un-reveals.@sushindustries/ui · motion or make it un-reveal - once shown flips to true the observer disconnects for good. A RevealRevealFades and rises its children the first time they reach the viewport. Never un-reveals.@sushindustries/ui · motion mounted already past the trigger point (deep in a route that renders scrolled) reveals on its first measurable frame rather than waiting on a scroll event that may never come.

delay only staggers the CSS transition; it doesn't delay when the intersection observer fires. Two RevealRevealFades and rises its children the first time they reach the viewport. Never un-reveals.@sushindustries/ui · motions at the same scroll position both trigger together and differ only in when their own transition starts.