use-scroll-to-reveal
v1.0.2
Published
React hook for using scroll to reveal components
Downloads
4
Readme
use-scroll-to-reveal
React hook for using scroll to reveal components
Install
npm install --save use-scroll-to-reveal
Usage
import React, { useRef } from 'react'
import { useScrollToReveal } from 'use-scroll-to-reveal'
const Example = () => {
const ref = useRef()
const revealed = useScrollToReveal(ref)
return (
<MyCompnentThatAnimatesWhenRevealedIsTrue
ref={ref} revealed={revealed}/>
)
}
License
MIT © Hermanya