Navigation progress
Navigation progress bar
Import
Source
Docs
Package
License
Installation
Package depends on @mantine/core and @mantine/hooks.
Install with yarn:
Install with npm:
Setup NavigationProgress
Render NavigationProgress anywhere in your app within MantineProvider:
Usage
Usage with Next.js
Create RouterTransition component that will handle router events:
Then render it in _app.tsx within MantineProvider:
Accessibility
NavigationProgress uses Progress component under the hood, to pass aria-label use progressLabel props
NavigationProgress component props
| Name | Type | Description | 
|---|---|---|
| autoReset | boolean | Determines whether progress should be automatically reset when 100% is reached | 
| color | MantineColor | Key of theme.colors of any other valid CSS color | 
| exitTimeout | number | Number of ms that should elapse before progressbar is hidden after reaching 100% | 
| exitTransitionDuration | number | Exit transition duration in ms | 
| initialProgress | number | The default progress | 
| onFinish | () => void | Called when the progressbar reaches 100% | 
| progressLabel | string | aria-label for `Progress` | 
| size | number | The height of the progressbar in px | 
| stepInterval | number | Step interval in ms | 
| transitionDuration | number | Transition duration in ms | 
| withinPortal | boolean | Determines whether progressbar should be rendered within Portal, defaults to true | 
| zIndex | ZIndex | Progressbar z-index |