Boxes that behave nicely while scrolling
npm install react-sticky-box!Version
!Downloads/Week
!Minified Bundlesize
!Minified Gzipped Bundlesize
Sticky Boxes with sensible behaviour if the content is bigger than the viewport.
``jsx
import StickyBox from "react-sticky-box";
const Page = () => (
$3
`jsx
import {useStickyBox} from "react-sticky-box";const Page = () => {
const stickyRef = useStickyBox({offsetTop: 20, offsetBottom: 20})
Content
};
`
---Contribute
- checkout the repo
-
cd /path/to/repo/packages/docs
- yarn install && yarn startthis will allow you to modify the react-sticky-box sources in
packages/react-sticky-box/src` and check the effects in the docs.