apal21 / nextjs-progressbar

A simple Next.js progressbar component using NProgress.
https://www.npmjs.com/package/nextjs-progressbar
MIT License
786 stars 62 forks source link

Loading indicator delay #17

Closed anubra266 closed 3 years ago

anubra266 commented 3 years ago

It's often preferable to delay showing the loading indicator until a request has taken longer than 250ms-500ms. This prevents the loading indicator from appearing constantly on quick page visits, which can be visually distracting.

<NextNprogress
        color="#29D"
        startPosition={0.3}
        delayMs={250}
        stopDelayMs={200}
        height="2"
      />