Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-stickynode
Advanced tools
A performant and comprehensive React sticky component.
A sticky component wraps a sticky target and remains the target in viewport as an user scrolls the page. Most sticky components handle the case where the sticky target is shorter then viewport, but not the case where a sticky target taller then viewport. The reason is the behavior expectation and implementation is much more complicated.
react-stickynode
handles not only regular case but the long sticky target case in a natural way. In regular case, when scrolling page down, react-stickynode
will stick to the top of viewport. But in the case of taller sticky target, it will scroll along with the page until its bottom reaches the bottom of viewport. In other words, it looks like the bottom of viewport pull the bottom of a sticky target down when scrolling page down. On the other hand, when scrolling page up, the top of viewport pulls the top of a sticky target up.
This behavior gives the content in a tall sticky target more chance to be shown. This is especially good for the case where many ADs are in the right rail.
Another highlight is that react-stickynode
can handle the case where a sticky target uses percentage as its width unit. For a responsive designed page, it is especially useful.
This is also inspired by Steve Carlson.
var Sticky = require('react-stickynode');
<Sticky enabled={true} top={50} bottomBoundary={1200}>
<YourComponent/>
</Sticky>
querySelector()
), the offset will be the height of the target.querySelector()
), the offset will be the bottom of the target.Install
npm install react-stickynode
Unit Test
grunt unit
This software is free to use under the BSD license. See the LICENSE file for license text and copyright information.
FAQs
A performant and comprehensive React sticky component
The npm package react-stickynode receives a total of 90,183 weekly downloads. As such, react-stickynode popularity was classified as popular.
We found that react-stickynode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.