Skip to main content

Spinners

Indicate the loading state of a component or page with Bootstrap spinners, built entirely with HTML, CSS, and no JavaScript.

Spinners example

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
            
              <div class="spinner-border text-primary" role="status">
                <span class="visually-hidden">Loading...</span>
              </div>
              <div class="spinner-border text-secondary" role="status">
                <span class="visually-hidden">Loading...</span>
              </div>
              <div class="spinner-border text-success" role="status">
                <span class="visually-hidden">Loading...</span>
              </div>
              <div class="spinner-border text-danger" role="status">
                <span class="visually-hidden">Loading...</span>
              </div>
              <div class="spinner-grow text-warning" role="status">
                <span class="visually-hidden">Loading...</span>
              </div>
              <div class="spinner-grow text-info" role="status">
                <span class="visually-hidden">Loading...</span>
              </div>
              <div class="spinner-grow text-light" role="status">
                <span class="visually-hidden">Loading...</span>
              </div>
              <div class="spinner-grow text-dark" role="status">
                <span class="visually-hidden">Loading...</span>
              </div>
            
          

Preloader

Preloader is the what you see on some sites before the main content of the web page is loaded.

Example code

            
              <!-- preloader -->
              <div id="preloader" class="preloader bg-light">
                <div class="position-absolute start-50 top-50 translate-middle-x">
                  <div class="position-relative mx-auto my-5">
                    <!-- bootstrap spinner -->
                    <div class="spinner-border text-primary" role="status">
                      <span class="visually-hidden">Loading...</span>
                    </div>
                  </div>
                </div>
              </div>
            
          

Add loader-wrapper just below the body tag

If you want to replace loading style, you can replace bootstrap spinner with images or custom loading.

You can read more documentation about spinners in Bootstrap documentation.