
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.
header-scroll-up
Advanced tools

When you are building web pages with high text content, you do not want to distract the user with other elements on the screen. When the user is scrolling down your web page, you would want to hide the header elements assuming the reader is interested in reading further. On a scroll up event, you would show pull back the header assuming the reader wants to navigate elsewhere. This medium-like header show/hide is followed by various websites.
This usecase could be more applicable on Mobile-sites where the effective viewport is not very significant, hence, you'd want to show / hide the header based on the scroll-event.
npm install header-scroll-up --save
let headerScroll = require ('header-scroll-up');
headerScroll.setScrollableHeader('.header', {topOffset: 100});
Parameter 1 : Node / Query-selector
Parameter 2 : Options Object (optional)
| Option | Default | Description |
|---|---|---|
| defaultCss | true | Whether you will use your own css / default css to be used, value in boolean. |
| animationDelay | 0.2 | The animation delay to show / hide the header, value in number. |
| topOffset | 0 | Header will be hidden only when the page scroll crosses this mark, value in px. |
| classname | null | When defaultCss is false, passing the classname is mandatory, value in string. |
Eg: headerScroll.setScrollableHeader('.header', {topOffset: 100, animationDelay: 0.5});
MIT © vijaysutrave
FAQs
Hide the header while scrolling down, bring it back on scroll up!
We found that header-scroll-up 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.