Gathering detailed insights and metrics for @tanem/react-nprogress
Gathering detailed insights and metrics for @tanem/react-nprogress
Gathering detailed insights and metrics for @tanem/react-nprogress
Gathering detailed insights and metrics for @tanem/react-nprogress
⌛ A React primitive for building slim progress bars.
npm install @tanem/react-nprogress
Typescript
Module System
Node Version
NPM Version
93.3
Supply Chain
93.3
Quality
79.2
Maintenance
100
Vulnerability
100
License
TypeScript (71.78%)
JavaScript (28.22%)
Total Downloads
10,244,541
Last Day
2,817
Last Week
72,787
Last Month
331,654
Last Year
3,921,857
MIT License
452 Stars
3,274 Commits
20 Forks
3 Watchers
2 Branches
4 Contributors
Updated on Jun 11, 2025
Minified
Minified + Gzipped
Latest Version
5.0.55
Package Id
@tanem/react-nprogress@5.0.55
Unpacked Size
171.58 kB
Size
33.80 kB
File Count
26
NPM Version
11.0.0
Node Version
22.13.1
Published on
Jan 26, 2025
Cumulative downloads
Total Downloads
Last Day
9.1%
2,817
Compared to previous day
Last Week
-10.2%
72,787
Compared to previous week
Last Month
-11.6%
331,654
Compared to previous month
Last Year
44.1%
3,921,857
Compared to previous year
2
42
A React primitive for building slim progress bars.
Background | Usage | Live Examples | API | Installation | License
This is a React port of rstacruz's nprogress
module. It exposes an API that encapsulates the logic of nprogress
and renders nothing, giving you complete control over rendering.
In the following examples, Container
, Bar
and Spinner
are custom components.
Hook
1import { useNProgress } from '@tanem/react-nprogress' 2import React from 'react' 3import { render } from 'react-dom' 4 5import Bar from './Bar' 6import Container from './Container' 7import Spinner from './Spinner' 8 9const Progress = ({ isAnimating }) => { 10 const { animationDuration, isFinished, progress } = useNProgress({ 11 isAnimating, 12 }) 13 14 return ( 15 <Container animationDuration={animationDuration} isFinished={isFinished}> 16 <Bar animationDuration={animationDuration} progress={progress} /> 17 <Spinner /> 18 </Container> 19 ) 20} 21 22render(<Progress isAnimating />, document.getElementById('root'))
Render Props
1import { NProgress } from '@tanem/react-nprogress' 2import React from 'react' 3import { render } from 'react-dom' 4 5import Bar from './Bar' 6import Container from './Container' 7import Spinner from './Spinner' 8 9render( 10 <NProgress isAnimating> 11 {({ animationDuration, isFinished, progress }) => ( 12 <Container animationDuration={animationDuration} isFinished={isFinished}> 13 <Bar animationDuration={animationDuration} progress={progress} /> 14 <Spinner /> 15 </Container> 16 )} 17 </NProgress>, 18 document.getElementById('root') 19)
HOC
1import { withNProgress } from '@tanem/react-nprogress' 2import React from 'react' 3import { render } from 'react-dom' 4 5import Bar from './Bar' 6import Container from './Container' 7import Spinner from './Spinner' 8 9const Inner = ({ animationDuration, isFinished, progress }) => ( 10 <Container animationDuration={animationDuration} isFinished={isFinished}> 11 <Bar animationDuration={animationDuration} progress={progress} /> 12 <Spinner /> 13 </Container> 14) 15 16const Enhanced = withNProgress(Inner) 17 18render(<Enhanced isAnimating />, document.getElementById('root'))
Props
animationDuration
- Optional Number indicating the animation duration in ms
. Defaults to 200
.incrementDuration
- Optional Number indicating the length of time between progress bar increments in ms
. Defaults to 800
.isAnimating
- Optional Boolean indicating if the progress bar is animating. Defaults to false
.minimum
- Optional Number between 0
and 1
indicating the minimum value of the progress bar. Defaults to 0.08
.Hook Example
1const Progress = ({ 2 animationDuration, 3 incrementDuration, 4 isAnimating, 5 minimum 6}) => { 7 const { isFinished, progress } = useNProgress({ 8 animationDuration, 9 incrementDuration, 10 isAnimating, 11 minimum 12 }) 13 14 return ( 15 <Container animationDuration={animationDuration} isFinished={isFinished}> 16 <Bar animationDuration={animationDuration} progress={progress} /> 17 <Spinner /> 18 </Container> 19 ) 20} 21 22<Progress 23 animationDuration={300} 24 incrementDuration={500} 25 isAnimating 26 minimum={0.1} 27/>
Render Props Example
1<NProgress 2 animationDuration={300} 3 incrementDuration={500} 4 isAnimating 5 minimum={0.1} 6> 7 {({ animationDuration, isFinished, progress }) => ( 8 <Container animationDuration={animationDuration} isFinished={isFinished}> 9 <Bar animationDuration={animationDuration} progress={progress} /> 10 <Spinner /> 11 </Container> 12 )} 13</NProgress>
HOC Example
1const Inner = ({ animationDuration, isFinished, progress }) => ( 2 <Container animationDuration={animationDuration} isFinished={isFinished}> 3 <Bar animationDuration={animationDuration} progress={progress} /> 4 <Spinner /> 5 </Container> 6) 7 8const Enhanced = withNProgress(Inner) 9 10<Enhanced 11 animationDuration={300} 12 incrementDuration={500} 13 isAnimating 14 minimum={0.1} 15/>
$ npm install @tanem/react-nprogress
UMD builds are also available for use with pre-React 19 via unpkg:
For the non-minified development version, make sure you have already included:
For the minified production version, make sure you have already included:
MIT
No vulnerabilities found.
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-02
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More