
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-sticker
Advanced tools
Creates instagram style sticky headers that collide when one header scrolls into another.
Creates instagram style sticky headers that collide when one header scrolls into another.
If you need something like this, but this does not work out of the box for you, file an issue and I will work to add configuration options to support a wider set of use cases.
Note: This does not follow idiomatic react. The primary goal of this project is to be performant during scrolling and clean to implement.
Example
react-sticker-example
Create a parent component and put your sticky headers inside of it.
general
<Sticker useWindow={*boolean*}>
...
<Sticky>...</Sticky>
</Sticker>
example
var Sticker = require('react-sticker')
var Sticky = Sticker.Sticky
var jsx = (
<Sticker useWindow={true}>
<div>
<Sticky><h2>First Sticky</h2></Sticky>
<div style={{height: 500}} >Contents</div>
</div>
<div>
<Sticky><h2>Second Sticky</h2></Sticky>
<div style={{height: 500}} >Contents</div>
</div>
<div>
<Sticky><h2>Third Sticky</h2></Sticky>
<div style={{height: 500}} >Contents</div>
</div>
</Sticker>
)
When the Sticker container is scrolled such that the Sticky header reaches the top, the position of the Sticky element will be fixed (i.e. stuck) to the top of the screen. When the top of the second header hits the first header it will begin to push the first header out of the way, and then become sticky itself.
Multiple independent components will work as siblings but not if nested.
If you set useWindow={true} react-sticker should work out of the box. Otherwise you will need to make your sticker container "scrollable" with css, e.g. <Sticker style={{overflow: 'scroll', height: '100%'}}>
FAQs
Creates instagram style sticky headers that collide when one header scrolls into another.
We found that react-sticker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.