npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bprogress/next

v3.2.12

Published

NProgress bar like for Next.js compatible with new app directory

Readme

BProgress for Next.js

BProgress integration on Next.js compatible with /app and /pages directory.

Next NProgress Bar and NProgress V2 become BProgress!

Migration from next-nprogress-bar

If you are using next-nprogress-bar, you can migrate to @bprogress/next by following the migration guide.

Installation

To install BProgress, run the following command:

npm install @bprogress/next

Import

App Directory

Import into your /app/layout(.js/.jsx/.ts/.tsx) folder.

import { ProgressProvider } from '@bprogress/next/app';

Pages Directory

Import into your /pages/_app(.js/.jsx/.ts/.tsx) folder.

import { ProgressProvider } from '@bprogress/next/pages';

Usage

<ProgressProvider>...</ProgressProvider>

Example

App Directory

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>
  );
}

Pages Directory

// 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>
  );
}

More information on documentation

Go to the documentation to learn more about BProgress.

Issues

If you encounter any problems, do not hesitate to open an issue or make a PR here.

LICENSE

MIT