Skip to content

Nextgress is an easy-to-use top navigation loader for Next.js App Router.

License

Notifications You must be signed in to change notification settings

draZer0/nextgress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nextgress

Nextgress

Nextgress is an easy-to-use top navigation loader for Next.js App Router.

Features

  • Lightweight and fast
  • Customizable
  • Automatic progress detection for navigation
  • TypeScript support

Installation

Install the package using npm:

npm install nextgress

Usage

Nextgress

Add the component in your (root) layout:

import { Nextgress } from 'nextgress';

export default function Layout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        <Nextgress />
        {children}
      </body>
    </html>
  );
}

Note

The Nextgress component can be used in Client and Server components.

Configuration

Nextgress

Prop Type Default Description
minimum number 0.25 Minimum position (0-1)
ease string "ease" CSS easing function
speed number 300 Animation speed in milliseconds
backgroundColor string "#fb8500" Background color of the bar
height number | string 3 Height of the bar

License

MIT

Acknowledgments

This package was inspired by and based on ideas from the Holy Loader package.
Some parts of the code were referenced from Holy Loader, which is licensed under the MIT License.

About

Nextgress is an easy-to-use top navigation loader for Next.js App Router.

Topics

Resources

License

Stars

Watchers

Forks