@taishikato/nextjs-progressbar
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Next.js Progressbar Without Spinner

A simple Next.js progressbar based on Next.js Progressbar.

How to install?

npm i @taishikato/nextjs-progressbar

How to use?

After installing the package, import this in your pages/_app.js file.

import NextNprogress from '@taishikato/nextjs-progressbar';

And for rendering add <NextNProgress /> inside Container component.

Default Config

<NextNprogress
  color="#29D"
  startPosition={0.3}
  stopDelayMs={200}
  height="3"
/>
  • color: to change the default color of progressbar. You can also use rgb(,,) or rgba(,,,).
  • startPosition: to set the default starting position : 0.3 = 30%.
  • stopDelayMs: time for delay to stop progressbar in ms.
  • height: height of progressbar in px.

Advanced Config

You can use other configurations which NProgress provides by adding a JSON in options props.

<NextNprogress
  options={{ easing: 'ease', speed: 500 }}
/>

Package Sidebar

Install

npm i @taishikato/nextjs-progressbar

Weekly Downloads

41

Version

1.0.2

License

MIT

Unpacked Size

8.55 kB

Total Files

6

Last publish

Collaborators

  • taishikato