top loading bar for javascript frameworks
npm install top-loading-barSupport :-
- email : vikramksm@hotmail.com
- website: https://vikramsrinivas.me
- Fell free to open PR and Issues
Using npm :-
``bash`
npm i top-loading-bar
Using yarn :-
`bash`
yarn add top-loading-bar
How to use this :-
- demo repo :- https://github.com/vikram2009/top-loading-bar_demo
- demo website :- https://top-loading-bar-demo.vercel.app/
With ref :-
`jsx
import React, { useRef } from 'react'
import LoadingBar from 'top-loading-bar/dist'
const App = () => {
const ref = useRef(null)
return (
export default App
`
With state :-
`jsx
import React, { useState } from 'react'
import LoadingBar from 'top-loading-bar/dist'
const App = () => {
const [progress, setProgress] = useState(0)
return (
export default App
``
recommended frameworks are Nextjs and Reactjs