Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

Bootstrap 4 Spinners


Spinners

To create a spinner/loader, use the .spinner-border class:

Loading..

Example

<div class="spinner-border"></div>
Try it Yourself »

Colored Spinners

Use any text color utilites to add a color to the spinner:

Loading..
Loading..
Loading..
Loading..
Loading..
Loading..
Loading..
Loading..
Loading..

Example

<div class="spinner-border text-muted"></div>
<div class="spinner-border text-primary"></div>
<div class="spinner-border text-success"></div>
<div class="spinner-border text-info"></div>
<div class="spinner-border text-warning"></div>
<div class="spinner-border text-danger"></div>
<div class="spinner-border text-secondary"></div>
<div class="spinner-border text-dark"></div>
<div class="spinner-border text-light"></div>
Try it Yourself »


Growing Spinners

Use the .spinner-grow class if you want the spinner/loader to grow instead of "spin":

Loading..
Loading..
Loading..
Loading..
Loading..
Loading..
Loading..
Loading..
Loading..

Example

<div class="spinner-grow text-muted"></div>
<div class="spinner-grow text-primary"></div>
<div class="spinner-grow text-success"></div>
<div class="spinner-grow text-info"></div>
<div class="spinner-grow text-warning"></div>
<div class="spinner-grow text-danger"></div>
<div class="spinner-grow text-secondary"></div>
<div class="spinner-grow text-dark"></div>
<div class="spinner-grow text-light"></div>
Try it Yourself »

Spinner Size

Use .spinner-border-sm or .spinner-grow-sm to create a smaller spinner:

Loading..
Loading..

Example

<div class="spinner-border spinner-border-sm"></div>
<div class="spinner-grow spinner-grow-sm"></div>
Try it Yourself »

Spinner Buttons

You can also add spinners to a button, with or without text:

Example

<button class="btn btn-primary">
  <span class="spinner-border spinner-border-sm"></span>
</button>

<button class="btn btn-primary">
  <span class="spinner-border spinner-border-sm"></span>
  Loading..
</button>

<button class="btn btn-primary" disabled>
  <span class="spinner-border spinner-border-sm"></span>
  Loading..
</button>

<button class="btn btn-primary" disabled>
  <span class="spinner-grow spinner-grow-sm"></span>
  Loading..
</button>
Try it Yourself »