react-sticky-content
v1.0.2
Published
Any dom can be sticky.
Downloads
7
Readme
React Sticky Content
Idea
Fork form (originally developed) https://github.com/codecks-io/react-sticky-box
With the original package, we can not pass dynamic top offset. With this change a top offset can be passed. Changes made on top of original package.
See it in action
Installation
npm install react-sticky-content
Usage
import StickyBox from "react-sticky-content";
//...
<SomeContainer>
<StickyBox bottom={false|true} style={{top: "100"}}>
<div className="sidebar">...sidebar...</div>
</StickyBox>
<div className="main">...lots of content...</div>
</SomeContainer>