Upgrade form 1.0 to 1.3
Upgrade from NProgress-V2 version 1.0 to BProgress version 1.3
In addition to migrating to BProgress, if you are migrating from version 1.0
of NProgress-V2, you may need to make some changes.
With version 1.1
there are a few new features and small changes.
The only change will be in the CSS. If you have a custom css, replace the id selector #
with a class selector .
for nprogress
, which has now become bprogress
.
This will give you something like this:
What's new
The big news is the ability to use multiple progress bars anywhere in your code.
To do this you need to set a template
to null
:
And add one or more templates like this to your code:
Pay Attention
display:none
by default.Another new feature is the addition of the width
value for positionUsing
. This allows for greater flexibility, including the ability to create progress bars positioned absolutely within elements that are not directly aligned with the edges of the screen.
Note
By default, positionUsing
will give priority to translate3d
(depending on browser compatibility), as this method leverages GPU acceleration, providing smoother animations and better performance, especially for complex or frequently updated UI elements. Using translate3d
helps reduce layout recalculations and enhances rendering efficiency compared to other positioning methods.