Bootstrap SpinnersSpinner is also called a loading indicator. It is used to display/indicate the loading state of our projects. Bootstrap uses a .spinner class to create a Spinner. We use the below syntax to create a Spinner in Bootstrap - Types of SpinnersThere are the following types of spinners that we create using Bootstrap - 1. Border SpinnerBorder Spinner is used for lightweight indicators. We use the below syntax to create a Border Spinner in Bootstrap - Syntax: Code: Test it Now2. Colored SpinnersWe use the below syntax to create a Colored Spinner in Bootstrap - Code: Test it Now3. Growing SpinnerWe use .spinner-grow class to create a Growing Spinner in Bootstrap. Syntax: Code: Test it Now4. Colored growing spinnerWe use the below syntax to create a colored growing spinner in Bootstrap. Syntax: Code: Test it NowChanging spinner alignmentBootstrap allows us to change the spinner alignment using margin and placement utilities. 1. Using MarginMargin is used to provide proper spacing, according to our project's requirements. Syntax: Syntax: Code: Test it Now2. Changing text alignmentThe .text-center class is used to change the text alignment. Code: Test it Now3. Using FlexboxWe can use the below syntax to change spinner alignment using Flexbox - Syntax: Code: Test it Now4. Using FloatWe use the below syntax to change spinner alignment using Float - Syntax: Code: Test it NowChange Spinner sizeWe can also change the spinner size based on our requirement. The following div classes are used to change the size of spinner - 1. Small spinner - We use .spinner-border-sm and .spinner-grow-sm to make a small spinner. Syntax: Code: Test it Now2. Large Spinner - We use .spinner-border-lg and .spinner-grow-lg class to create a large spinner. Syntax: Code: Test it NowBootstrap Button SpinnerSpinner inside button indicates an action that is currently in the processing stage. Syntax Code: Test it NowNext TopicBootstrap star rating |