Sign in


Sign up


Angular Bootstrap progress Bar

Putting loads of content on your website usually results in increasing its loading time. This may lead to wrecking your User Experience, increasing abandonment rate or lowering your position in search engines.

That’s why you should always provide your user with appropriate feedback.

If it takes too long for your website to load up, your user will be less stressed about it when he sees a simple progress bar. It means as much as “Everything is fine. The content you want to see will load in a few seconds”


Basic example MDB Pro component


<mdb-progressbar value="0" min="0" max="100" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></mdb-progressbar>
<mdb-progressbar value="25" min="0" max="100" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></mdb-progressbar>
<mdb-progressbar value="50" min="0" max="100" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></mdb-progressbar>
<mdb-progressbar value="75" min="0" max="100" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></mdb-progressbar>
<mdb-progressbar value="100" min="0" max="100" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></mdb-progressbar>
            

Contextual alternatives MDB Pro component

Progress bars use some of the same button and alert classes for consistent styles.


<mdb-progressbar value="25" min="0" max="100" type="success" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></mdb-progressbar>
<mdb-progressbar value="50" min="0" max="100" type="info" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></mdb-progressbar>
<mdb-progressbar value="75" min="0" max="100" type="warning" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></mdb-progressbar>
<mdb-progressbar value="100" min="0" max="100" type="danger" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></mdb-progressbar>
            

Prealoaders MDB Pro component

Infinite loading


<mdb-progress-bar class="progress primary-color-dark" mode="indeterminate"></mdb-progress-bar>
            

Circles MDB Pro component


<!--Big blue-->
<mdb-spinner spinnerType="big" spinnerColor="blue"></mdb-spinner>

<!--Medium red-->
<mdb-spinner spinnerColor="red"></mdb-spinner>

<!--Small yellow-->
<mdb-spinner spinnerType="small" spinnerColor="yellow"></mdb-spinner>
            

Crazy circles


<!--Big blue-->
<mdb-spinner spinnerType="big crazy" spinnerColor="blue"></mdb-spinner>

<!--Medium red-->
<mdb-spinner spinnerType="crazy" spinnerColor="red"></mdb-spinner>

<!--Small green-->
<mdb-spinner spinnerType="small crazy" spinnerColor="green"></mdb-spinner>
            

Multicolor


<mdb-spinner spinnerType="big"></mdb-spinner>    
            

Preloading script MDB Pro component

Click the button below to see Preloading Script in action

Live demo

Usage

Adding preloader to your project


In order to have working preloaders on every component in your project, you need to add it to yourapp.module and the base index.html.


import { MDBSpinningPreloader } from 'ng-mdb-pro';

@NgModule({
...
providers: [MDBSpinningPreloader],
...
})

            

App.component.ts


import {
  Component,
  OnInit
} from '@angular/core';
import {MDBSpinningPreloader} from 'ng-mdb-pro';
@Component({
  selector: 'app-root',
  templateUrl: 'app.component.html'
})

export class AppComponent implements OnInit {
  constructor(private mdbSpinningPreloader: MDBSpinningPreloader) {}

  ngOnInit() {
    this.mdbSpinningPreloader.stop();
  }
}
            

index.html


<div class="spinning-preloader-container"> 
    <div class="preloader-wrapper big active"> 

          <div class="spinner-layer spinner-blue"> 
            <div class="circle-clipper left"> 
              <div class="circle"> </div> 
            </div> <div class="gap-patch"> 
              <div class="circle"> </div> 
            </div> 
          </div> 

          <div class="spinner-layer spinner-red"> 
            <div class="circle-clipper left"> 
              <div class="circle"> </div> 
            </div> <div class="gap-patch"> 
              <div class="circle"> </div> 
            </div> 
          </div> 

          <div class="spinner-layer spinner-yellow"> 
            <div class="circle-clipper left"> 
              <div class="circle"> </div> 
            </div> <div class="gap-patch"> 
              <div class="circle"> </div> 
            </div> 
          </div> 

          <div class="spinner-layer spinner-green"> 
            <div class="circle-clipper left"> 
              <div class="circle"> </div> 
            </div> <div class="gap-patch"> 
              <div class="circle"> </div> 
            </div> 
          </div> 
          
    </div>     
</div>