1.2.7 • Published 7 months ago
@bprogress/react v1.2.7
BProgress for React
Create your own progress bar with React
Import
import { ProgressProvider } from '@bprogress/react';The @bprogress/react package is a utility that lets you easily manage a progress bar, while remaining flexible with regard to the router you're using. It doesn't automatically start the progress bar when browsing, so you'll have to manage this logic yourself, unless you're using one of the integrations below.
React Frameworks Integrations
Usage
<ProgressProvider>...</ProgressProvider>Example
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
import { ProgressProvider } from '@bprogress/react';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement,
);
root.render(
<React.StrictMode>
<ProgressProvider>
<App />
</ProgressProvider>
</React.StrictMode>,
);import { useProgress } from '@bprogress/react';
function App() {
const { start, stop, pause, resume } = useProgress();
return (
<div className="App">
<button onClick={start}>Start</button>
<button onClick={stop}>Stop</button>
<button onClick={pause}>Pause</button>
<button onClick={resume}>Resume</button>
</div>
);
}
export default App;More information on documentation
Go to the documentation to learn more about BProgress.
Issues
If you encounter any problems, do not hesitate to open an issue or make a PR here.
LICENSE
MIT
1.2.7
7 months ago
1.2.6
7 months ago
1.2.5
8 months ago
1.2.4
8 months ago
1.2.3
8 months ago
1.2.2
8 months ago
1.2.1
8 months ago
1.2.0
8 months ago
1.1.8
8 months ago
1.1.7
8 months ago
1.1.6
8 months ago
1.1.5
8 months ago
1.1.4
8 months ago
1.1.3
8 months ago
1.1.2
8 months ago
1.1.1
8 months ago
1.1.0
9 months ago
1.0.2
9 months ago
1.0.1
9 months ago
1.0.0
9 months ago