Next.js Discord

Discord Forum

Custom Loading/Progress bar in NextJS 15

Answered
StilauGamer posted this in #help-forum
Open in Discord
Hey,
Does anyone know how I can make a custom loading bar when switching between pages?

Before you could use the router.events, but this was removed in NextJS 13 I believe..
routeChangeStart, routeChangeComplete and routeChangeError was the old events.

How can I make a nice loading bar now with NextJS 15?
Answered by B33fb0n3
I like to use this library: https://www.npmjs.com/package/nextjs-toploader

It works perfectly and lets you custimzed mostly everything
View full answer

3 Replies