[フレーム]

Bootstrap 5 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 »

New

W3Schools Adventure App

Coding fundamentals as a game. Bite-sized lessons and challenges.

Ready to start your journey? Your streak is waiting.
+60 XP
W3Schools Adventure tutor
W3Schools Adventure map
×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

FORUM ABOUT ACADEMY
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.

AltStyle によって変換されたページ (->オリジナル) /