A next js (app+page) route top progress bar has all the functionality required, including all the features and fixed from earlier packages. Most popular packages are nextjs-toploader and next-nprogress-bar both has some issues. nextjs-toploader do not come with delay time and even they don't want to give this options as it already has a closed PR . On the other hand next-nprogress-bar has a open issue. I just try solve this issues and give the options also.
Small in Size
delay options
Solve for not showing progress bar on first load
Properly Maintained
Installation
1$ npm i next-app-progress-bar
App Router
Import AppProgressBar in your app/layout.tsx/js and place inside the body tag.
For triggering progress bar in your app folder, please use follow the steps bellow.
1//Import `useRouter` from `next-app-progress-bar` instead `next/navigation`.23import { useRouter } from"next-app-progress-bar";
45//Then simple use it as like you normally use from `next/navigation`6
Page Router
Import PageProgressBar into your pages/_app.tsx/js and place the component on MyApp.