Skip to main content

Spinner

Bootstrap “spinners” can be used to show the loading state in your projects. They’re built only with HTML and CSS, meaning you don’t need any JavaScript to create them. You may, however, need some custom JavaScript to toggle their visibility. Their appearance, alignment, and sizing can be easily customized with our utility classes.

Idea React provides the Spinner wrapper for these examples.

For accessibility purposes, each loader here includes role="status" and a nested <span class="visually-hidden">Loading…</span>.

Border spinner

Use the border spinners for a lightweight loading indicator.

Loading…Loading

Growing spinner

If you don’t fancy a border spinner, switch to the grow spinner. While it doesn’t technically spin, it does repeatedly grow!

Loading…

Variants

Spinners use currentColor for their appearance, meaning you can customize the color with text color utilities. In Idea React, the theme prop applies the matching theme color.

Loading…Loading…

Size

Spinners are 1em by 1em by default. Add the size="sm" prop to make a smaller spinner that can quickly be used within other components.

Loading…Loading…

Or, use custom CSS or inline styles to change the dimensions as needed.

Loading…Loading…

Custom spinners

You can use the .spinner-rotate class to rotate a custom SVG spinner. Render icons through the Icon wrapper and apply the class.

CSS

Variables

Border and growing spinners expose their dimensions, colors, and animation timing through Bootstrap CSS variables. See the upstream spinner CSS for the variable reference and keyframes.

SpinnerButton, TableSpinner, and Loading reuse the same wrapper for component-level and full-page loading states.