npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-nprogress-latest

v1.0.5

Published

A very simple, highly customisable react top progressbar component.

Downloads

47

Readme

NProgress

A very simple, highly customisable react top progressbar component.

Installation

Install react-nprogress-latest with npm

  npm i react-nprogress-latest

Basic usage

To use your library for routing change or as a top progress bar, follow these steps:

  1. For Route Change: If you want to use your library for route changes, you should import it inside your App.js file.
import NProgress from "react-nprogress-latest";
import "react-nprogress-latest/dist/style.css";
function App() {
  return <NProgress options={{ OnRouteChange: true }} />;
}

delayMs (default: 600ms)

The delayMs prop determines the delay in milliseconds before NProgress completes. This value influences the speed of progress completion when the component is triggered. A higher value for delayMs results in a slower progression, while a lower value speeds up the completion.

<NProgress delayMs={800} options={{ OnRouteChange: true }} />
  1. As Top Progress Bar: To use your library as a top progress bar in any part of your application, you can import it anywhere in your code where you want it to appear.(Recommended->Header)
import NProgress from "react-nprogress-latest";
import "react-nprogress-latest/dist/style.css";
function App() {
  return <NProgress options={{ onSectionScroll: true }} />;
}

steps (default: 9)

The steps prop determines the number of steps for progress completion when the component is triggered. The value of steps should not exceed 9, as the calculation (steps * 0.1) must not result in a value greater than 1, causing the NProgress to disappear.

<NProgress steps={8} options={{ onRouteChange: true }} />

Configuration

minimum (default: 0.08)

Changes the minimum percentage used upon starting.

<NProgress configure={{ minimum: 0.1 }} />

template

You can change the markup using the template option. To keep the progress bar working, make sure to include an element with role='bar' in the [template].

<NProgress configure={{ template: "<div class='....'>...</div>" }} />

easing and speed (default: ease and 200)

Adjust animation settings using the easing option (a CSS easing string) and the speed option (in milliseconds).If you are using the options prop, it is recommended not to use the speed option independently.

<NProgress configure={{ easing: "ease", speed: 500 }} />

trickle (default: true)

Turn off the automatic incrementing behavior by setting the trickle option to false. If you are using the options prop, it is recommended not to use the trickle option independently.

<NProgress configure({ trickle: false })/>

trickleSpeed

Adjust how often to trickle/increment, in milliseconds.If you are using the options prop, it is recommended not to use the trickleSpeed option independently.

<NProgress configure={{ trickleSpeed: 200 }} />

showSpinner (default: true)

Turn off loading spinner by setting it to false.

<NProgress configure={{ showSpinner: false }} />

parent (default: body)

Specify this option to change the parent container.

<NProgress configure={{ parent: "#container" }} />