🤩
Windframe Import Update is finally here.

Spinner

React Bootstrap 5 Spinner

React Bootstrap 5 Spinner is an animation that helps improve the user experience by keeping visitors engaged while the page is loading.

Importing the React Bootstrap 5 Spinner Component

You import CDBSpinner into your project to use the Contrast React Bootstrap 5 Spinner component.

js
import { CDBSpinner } from 'cdbreact';

Default Spinner

The CDBSpinner component takes in characteristics like danger and success, which are 'color' prop values, to give the spinner a background color.

loading...
loading...
loading...
loading...
loading...
loading...
loading...
js
import React from 'react';
import { CDBSpinner, CDBContainer } from 'cdbreact';
export const Spinner = () => {
return (
<CDBContainer>
<CDBSpinner />
<CDBSpinner danger />
<CDBSpinner success />
<CDBSpinner warning />
<CDBSpinner info />
<CDBSpinner dark />
<CDBSpinner secondary />
</CDBContainer>
);
};

Multicolor Spinner

To give your spinner multiple colors, use the multicolor attribute.

loading...
js
import React from 'react';
import { CDBSpinner, CDBContainer } from 'cdbreact';
export const Spinner = () => {
return (
<CDBContainer>
<CDBSpinner multicolor />
</CDBContainer>
);
};

Size Variations

Use the size attribute to indicate how big or small your spinner should be.

loading...
loading...
loading...
js
import React from 'react';
import { CDBSpinner, CDBContainer } from 'cdbreact';
export const Spinner = () => {
return (
<CDBContainer>
<CDBSpinner size="big" />
<CDBSpinner secondary />
<CDBSpinner success size="small" />
</CDBContainer>
);
};

API Reference: Contrast React Bootstrap 5 Spinner Props

This section will expand on the props you'll be using with the Contrast React Bootstrap 5 Spinner component. You'll learn what these props do, how to utilize them, and what their default values are.

The table below details the CDBSpinner 's other prop selections.

NameTypeDefaultDescriptionExample
classNameStringAdds custom classesAdds custom classes<CDBSpinner className="myClass" ... />
tagStringdivChanges default input tag<CDBSpinner tag="input" ... />
sizeStringChanges the spinner's size. Choose one of the following keywords: 'large' or'small'.<CDBSpinner size="big" ... />
successBooleanfalseChanges the color of the spinner to green<CDBSpinner success .../>
secondaryBooleanfalseChanges the color of the spinner to purple<CDBSpinner secondary .../>
darkBooleanfalseChanges the color of the spinner to black<CDBSpinner dark .../>
infoBooleanfalseChanges the color of the spinner to teal<CDBSpinner info .../>
dangerBooleanfalseChanges the color of the spinner to red<CDBSpinner danger .../>
warningBooleanfalseChanges the color of the spinner to yellow<CDBSpinner warning .../>

Trying to build out all user interfaces and components for your website or web app from scratch can become a very tedious task. A huge reason why we created Contrast Bootstrap to help reduce the amount of time we spend doing that, so we can focus on building some other aspects of the project. Contrast Bootstrap PRO consists of a UI Kit featuring over 10000+ component variants. Together with a template of 5 admin dashboards and 23+ additional multipurpose pages template for building almost any type of website or web app. You can view a demo and learn more about Contrast by clicking here.Download the free react template

ad-banner

Contrast Bootstrap PRO was built using the most popular CSS framework Bootstrap to help build your next landing, admin SAAS, prelaunch etc project with a clean, prebuilt and well documented template and UI components.Learn more about Contrast