
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.
@approximant/next-progress
Advanced tools
Note This is a fork of nextjs-progressbar by apal21. It adds an optional debounce to the progress bar to prevent it from flickering when the page loads quickly.
A simple Next.js progressbar component using NProgress.
After installing the package, import NextProgress in your pages/_app.tsx file and add <NextProgress /> to the render function in App:
import NextProgress from '@approximant/next-progress';
export default function App({ Component, pageProps }) {
return (
<>
<NextProgress />
<Component {...pageProps} />;
</>
);
}
If no props are passed to <NextProgress />, the default configuration is applied.
// Default config
<NextProgress
debounce={300}
color="#29D"
startPosition={0.3}
stopDelayMs={200}
height={3}
showOnShallow={true}
/>
debounce: Debounce time in ms. The progress bar will not be shown if the page loads in less than this time.color: to change the default color of progressbar. You can also use rgb(,,) or rgba(,,,).startPosition: to set the default starting position : 0.3 = 30%.stopDelayMs: time for delay to stop progressbar in ms.height: height of progressbar in px.showOnShallow: You can choose whether you want the progressbar to be displayed if you're using shallow routing. It takes a boolean. Learn more about shallow routing in Next.js docs.We use internal css in this package. If you are using csp, you can add nonce to the <style> tag by providing nonce prop to <NextProgress /> component.
<NextProgress nonce="my-nonce" />
You can use transformCSS prop to pass custom css.
Note: You must return a JSX.Element from the function.
NextProgress<
transformCSS={(css) => {
// css is the default css string. You can modify it and return it or return your own css.
return <style>{css}</style>;
}}
/>
You can use other configurations which NProgress provides by adding a JSON in options props.
<NextProgress options={{ easing: 'ease', speed: 500 }} />
FAQs
NProgress component for Next.js app.
We found that @approximant/next-progress 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.