11# Swup Progress Bar Plugin
22
3- This [ swup] ( https://github.com/swup/swup ) plugin will display a progress bar for
4- all requests taking longer than ~ 300ms.
3+ A [ swup] ( https://swup.js.org ) plugin for displaying a progress bar.
4+
5+ Shows a loading indicator for requests taking longer than ~ 300ms.
6+
57
68## Installation
79
8- This plugin can be installed with npm
10+ Install the plugin from npm and import it into your bundle.
911
1012``` bash
1113npm install @swup/progress-plugin
1214```
1315
14- and included with import
15-
16- ``` shell
16+ ``` js
1717import SwupProgressPlugin from ' @swup/progress-plugin' ;
1818```
1919
20- or included from the dist folder
20+ Or include the minified production file from a CDN:
2121
2222``` html
23- <script src =" ./dist/SwupProgressPlugin.js " ></script >
23+ <script src =" https://unpkg.com/@swup/progress-plugin@3 " ></script >
2424```
2525
2626## Usage
@@ -52,7 +52,7 @@ The progress bar has a class name of `swup-progress-bar` you can use for styling
5252 transition: 300 ,
5353 delay: 300 ,
5454 initialValue: 0.25 ,
55- hideImmediately : true
55+ finishAnimation : true
5656}
5757```
5858
@@ -62,7 +62,7 @@ Class name to use for the container div.
6262
6363### transition
6464
65- Length of CSS transition between loading states, in milliseconds.
65+ Length of the CSS transition between loading states, in milliseconds.
6666
6767### delay
6868
@@ -76,8 +76,6 @@ To create a slightly more "realistic" appearance, the progress bar will start
7676out at a random position beteen 0 and the value of this option. Set to ` 0 ` to
7777always start from the left.
7878
79- ### hideImmediately
80-
81- Whether the progress bar is hidden instantly after a page visit.
79+ ### finishAnimation
8280
83- Set to ` false ` to always complete the transition to ` width: 100%` before hiding it .
81+ Whether the progress bar will complete the transition to 100% before hiding.
0 commit comments