
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@bprogress/next
Advanced tools
NProgress bar like for Next.js compatible with new app directory
BProgress integration on Next.js compatible with /app and /pages directory.
Next NProgress Bar and NProgress V2 become BProgress!
next-nprogress-bar
If you are using next-nprogress-bar
, you can migrate to @bprogress/next
by following the migration guide.
To install BProgress, run the following command:
npm install @bprogress/next
Import into your /app/layout(.js/.jsx/.ts/.tsx)
folder.
import { ProgressProvider } from '@bprogress/next/app';
Import into your /pages/_app(.js/.jsx/.ts/.tsx)
folder.
import { ProgressProvider } from '@bprogress/next/pages';
<ProgressProvider>...</ProgressProvider>
First approach in a use client layout.
// In /app/layout.tsx
'use client';
import { ProgressProvider } from '@bprogress/next/app';
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>
<ProgressProvider
height="4px"
color="#fffd00"
options={{ showSpinner: false }}
shallowRouting
>
{children}
</ProgressProvider>
</body>
</html>
);
}
Second approach wrap in a use client Providers component. (Recommended)
Create a Providers component to wrap your application with all the components requiring 'use client', such as BProgress or your different contexts...
// In /app/providers.tsx
'use client';
import { ProgressProvider } from '@bprogress/next/app';
const Providers = ({ children }: { children: React.ReactNode }) => {
return (
<ProgressProvider
height="4px"
color="#fffd00"
options={{ showSpinner: false }}
shallowRouting
>
{children}
</ProgressProvider>
);
};
export default Providers;
Then wrap your application with the Providers component.
// In /app/layout.tsx
import Providers from './providers';
export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>
<Providers>{children}</Providers>
</body>
</html>
);
}
// In /pages/_app.tsx
import type { AppProps } from 'next/app';
import { ProgressProvider } from '@bprogress/next/pages';
export default function App({ Component, pageProps }: AppProps) {
return (
<ProgressProvider
height="4px"
color="#fffd00"
options={{ showSpinner: false }}
shallowRouting
>
<Component {...pageProps} />
</ProgressProvider>
);
}
Go to the documentation to learn more about BProgress.
If you encounter any problems, do not hesitate to open an issue or make a PR here.
MIT
FAQs
NProgress bar like for Next.js compatible with new app directory
The npm package @bprogress/next receives a total of 49,837 weekly downloads. As such, @bprogress/next popularity was classified as popular.
We found that @bprogress/next demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.