@kitce/react-use-fadeout-scroll
v2.1.1
Published
React hook to apply fadeout effect to scroll container
Downloads
8
Readme
react-use-fadeout-scroll
React hook to apply fadeout effect to scroll container
Install
pnpm add @kitce/react-use-fadeout-scroll
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