Skip to main content

ScrollDetector

Scroll detector.

Props

  • onAppears = {function}
  • rootMargin = {string}

Example with code

import ScrollDetector from '@components/ScrollDetector';

const MyComponent = () => {
const onAppears = () => {
console.log('Appeared!');
};

return (
<ScrollDetector
onAppears={onAppears}
rootMargin="0px 0px -50% 0px"
/>
);
};