npm.io
2.1.1 • Published 4 years ago

@kitce/react-use-fadeout-scroll

Licence
MIT
Version
2.1.1
Deps
0
Size
18 kB
Vulns
0
Weekly
0

react-use-fadeout-scroll

React hook to apply fadeout effect to scroll container

Install

pnpm add @kitce/react-use-fadeout-scroll

Documentation

Documentation

Example

import useFadeoutScroll from '@kitce/react-use-fadeout-scroll';

const ScrollContainer = () => {
  const [ref, style] = useFadeoutScroll<HTMLDivElement>({ yFadingRate: 0.3 });
  return (
    <div ref={ref} style={style}>
      {/* very long content */}
    </div>
  );
};

License

MIT License

Keywords