React Spinner Component
Spinner
Limited-time offer for the first 100 customers in 2025. Use code 2025SKY25 at checkout.
Indicate the loading state of a component or page with CoreUI spinners, built entirely with HTML, CSS, and no JavaScript.
Other Frameworks
CoreUI components are available as native Angular, Bootstrap (Vanilla JS), and Vue components. To learn more please visit the following pages.
About#
CoreUI "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 will, however, need some custom JavaScript to toggle their visibility. Their appearance, alignment, and sizing can be easily customized with our amazing utility classes.
For accessibility purposes, each loader here includes role="status"
and a nested <span className="visually-hidden">Loading...</span>
.
Border spinner#
Use the border spinners for a lightweight loading indicator.
Colors#
The border spinner uses currentColor
for its border-color
. You can use any of our text color utilities on the standard spinner.
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!
Once again, this spinner is built with currentColor
, so you can easily change its appearance. Here it is in blue, along with the supported variants.
Alignment#
CoreUI React spinners are built with rems
, currentColor
, and display: inline-flex
. This means they can easily be resized, recolored, and quickly aligned.
Margin#
Use margin utilities like .m-5
for easy spacing.
Placement#
Use flexbox utilities, float utilities, or text alignment utilities to place spinners exactly where you need them in any situation.
Flex#
Floats#
Text align#
Size#
Add size="sm"
property to make a smaller spinner that can quickly be used within other components.
Or, use custom CSS or inline styles to change the dimensions as needed.
Buttons#
Use spinners within buttons to indicate an action is currently processing or taking place. You may also swap the text out of the spinner element and utilize button text as needed.
API#
Check out the documentation below for a comprehensive guide to all the props you can use with the components mentioned here.