Description
react-sticky is a React component library for making components sticky, so they stay in view as the page scrolls. Version 6 is built around a higher-order component, which the README says gives you control over implementation details, with a StickyContainer that wraps the sticky elements and a Sticky component inside it. When an element would be outside the viewport, the styles needed to pin it to the top of the screen are passed to a render callback, which is a function passed as a child. Most uses only need the style applied to the DOM, but the callback also receives other values for advanced cases. The version 6 notes say the API is minimal and efficient, and that support for older React versions has been dropped. The README includes basic, relative and stacked demos, plus props reference sections for StickyContainer and Sticky. The README also says the project is no longer actively maintained. Version 6.0.3 is the last maintained release, and the author will not consider pull requests or respond to issues until a new maintainer is found, so the README recommends moving to another sticky library.…
Highlights
- Sticky React components via a higher-order component
- StickyContainer and Sticky props
- Render callback with sticky styles
- Basic, relative and stacked demos
Ratings & Reviews
No ratings yet
Be the first to rate react-sticky.
People also visit

@rc-component/listy
Virtualized React list component with grouping and sticky header support
react-sticky FAQ
What is react-sticky?
A React component library for making components sticky while the page scrolls.
Is it still maintained?
No. The README says 6.0.3 is the last maintained release, and it recommends moving to another sticky library.
How does the render callback work?
When an element would be outside the viewport, its sticky styles are passed to a render function you pass as a child.
Where are the demos?
The README links basic, relative and stacked demos.
Is it open source?
Yes. The repository is public on GitHub.
What are the best react-sticky alternatives?
Popular alternatives to react-sticky include react-stickynode, react-scroll and @rc-component/listy. See all react-sticky alternatives






















