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 🙏

© 2026 – Pkg Stats / Ryan Hefner

h9ee-progressbar-next

v1.0.3

Published

A React + TypeScript progress bar provider for Next.js App Router

Readme

h9ee-progressbar-next

npm version license

A minimal, customizable React progress bar component for Next.js App Router (v13+).

Features:

  • Automatic top-loading indicator on client-side route transitions
  • Configurable color and height
  • Support for custom loader components
  • No external dependencies (built-in simulation similar to NProgress)

Table of Contents

  1. Installation

  2. Usage

  3. API

  4. How It Works

  5. Compatibility

  6. Development

  7. Contributing

  8. License


Installation

Install the package via npm or yarn:

npm install h9ee-progressbar-next
# or
yarn add h9ee-progressbar-next

Peer Dependencies:

  • React 18.x
  • Next.js >= 13.4.0 (App Router)

Ensure your project uses the Next.js App Router (i.e., has an /app directory).


Usage

Wrap your Root Layout

In your app/layout.tsx (or equivalent), import and wrap your application:

'use client'

import ProgressBarProvider from 'h9ee-progressbar-next';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <ProgressBarProvider>
          {children}
        </ProgressBarProvider>
      </body>
    </html>
  );
}

Default Bar

By default, the provider renders a thin, fixed-top bar:

<ProgressBarProvider>
  {children}
</ProgressBarProvider>

Customizing Color and Height

Adjust the color or height via props:

<ProgressBarProvider color="#0A2FFF" height="4px">
  {children}
</ProgressBarProvider>

Custom Bar

Supply your own loader component (e.g., spinner, animated indicator):

import ProgressBarProvider from 'h9ee-progressbar-next';
import MySpinner from './MySpinner';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <ProgressBarProvider customBar={<MySpinner />}>
          {children}
        </ProgressBarProvider>
      </body>
    </html>
  );
}

If you pass a JSX element (e.g., <MySpinner />), it will be rendered directly. Passing customBar disables color and height props.


API

| Prop | Type | Default | Description | | ----------- | --------------------------------------- | --------- | ---------------------------------------------------- | | children | React.ReactNode | — | Application UI | | color | string | #2299DD | Bar color (ignored if customBar is set) | | height | string | 3px | Bar height (ignored if customBar is set) | | customBar | React.ComponentType<any> \| ReactNode | — | Custom loader component or element during navigation |


How It Works

  1. Client-Side Only: The provider uses 'use client' and runs in the browser.
  2. Link Click Detection: Attaches a global click listener to capture internal <a> clicks and triggers loading.
  3. Route Change Detection: Uses Next.js App Router hooks (usePathname, useSearchParams) to detect navigation completion.
  4. Progress Simulation: Starts the bar at 10%, increments up to 90% with an interval, then jumps to 100% on completion before resetting.
  5. Custom Bar: Mounts your customBar component instead of the default bar when provided.

This mimics NProgress-like behavior without external dependencies.


Compatibility

  • Next.js: 13.4.0, 14.x, 15.x (App Router only)
  • React: 18.x
  • TypeScript: v4.9+ (strict mode enabled)

Development

Clone the repository and install dependencies:

git clone https://github.com/h9ee/h9ee-progressbar-next.git
cd h9ee-progressbar-next
npm install
  • Build: npm run build (compiles TS to dist/ and types to types/)
  • Publish: Update package.json version and run npm publish

License

This project is licensed under the MIT License. See the LICENSE file for details.