The progress of any process can be visually represented using the progress bar element.
You can use it to show the progress of any web-page loading or while completing a transaction process
Bootstrap Basic Progress Bar
A default progress bar can be created using following two contextual classes:
- .progress: Used with the container element like <div>
- .progress-bar: To be used with the child element of the container element.
The width of the progress bar can be adjusted using the CSS width property. The progress representation will be made accordingly.
Basically, the width is increased as per the process flow, representing the progress
The below code shows the creation of a basic progress bar:
Bootstrap Progress Bar Height
The default height of the progress bar is 16px.
Just like the width of the progress bar you can also use the CSS height property to change the height to
Please note, that the height for the progress container and the progress bar must be set as same.
See the code below for illustration:
Bootstrap Progress Bar Labels
For providing better readability to the user, we can show the progress percentage by adding some text content in the progress bar.
See the code below for example:
Bootstrap Colored Progress Bars
The default color of the progress bar is set to blue (primary).
For setting
See the code below for example:
Bootstrap Striped Progress Bars
You can also add stripes to the progress bars. The .progress-bar-striped
The following code is an example
Bootstrap Animated Progress Bar
The .progress-bar-animated class can be used to give animation to the progress bar.
The code below explains the usage for this class: