
- Bootstrap - Home
- Bootstrap - Overview
- Bootstrap - Environment Setup
- Bootstrap - RTL
- Bootstrap - CSS Variables
- Bootstrap - Color Modes
- Bootstrap - Breakpoints
- Bootstrap - Containers
- Bootstrap - Grid System
- Bootstrap - Columns
- Bootstrap - Gutters
- Bootstrap - Utilities
- Bootstrap - CSS Grid
- Bootstrap Content
- Bootstrap - Reboot
- Bootstrap - Typography
- Bootstrap - Images
- Bootstrap - Tables
- Bootstrap - Figures
- Bootstrap Components
- Bootstrap - Accordion
- Bootstrap - Alerts
- Bootstrap - Badges
- Bootstrap - Breadcrumb
- Bootstrap - Buttons
- Bootstrap - Button Groups
- Bootstrap - Cards
- Bootstrap - Carousel
- Bootstrap - Close button
- Bootstrap - Collapse
- Bootstrap - Dropdowns
- Bootstrap - List Group
- Bootstrap - Modal
- Bootstrap - Navbars
- Bootstrap - Navs & tabs
- Bootstrap - Offcanvas
- Bootstrap - Pagination
- Bootstrap - Placeholders
- Bootstrap - Popovers
- Bootstrap - Progress
- Bootstrap - Scrollspy
- Bootstrap - Spinners
- Bootstrap - Toasts
- Bootstrap - Tooltips
- Bootstrap Forms
- Bootstrap - Forms
- Bootstrap - Form Control
- Bootstrap - Select
- Bootstrap - Checks & radios
- Bootstrap - Range
- Bootstrap - Input Groups
- Bootstrap - Floating Labels
- Bootstrap - Layout
- Bootstrap - Validation
- Bootstrap Helpers
- Bootstrap - Clearfix
- Bootstrap - Color & background
- Bootstrap - Colored Links
- Bootstrap - Focus Ring
- Bootstrap - Icon Link
- Bootstrap - Position
- Bootstrap - Ratio
- Bootstrap - Stacks
- Bootstrap - Stretched link
- Bootstrap - Text Truncation
- Bootstrap - Vertical Rule
- Bootstrap - Visually Hidden
- Bootstrap Utilities
- Bootstrap - Backgrounds
- Bootstrap - Borders
- Bootstrap - Colors
- Bootstrap - Display
- Bootstrap - Flex
- Bootstrap - Floats
- Bootstrap - Interactions
- Bootstrap - Link
- Bootstrap - Object Fit
- Bootstrap - Opacity
- Bootstrap - Overflow
- Bootstrap - Position
- Bootstrap - Shadows
- Bootstrap - Sizing
- Bootstrap - Spacing
- Bootstrap - Text
- Bootstrap - Vertical Align
- Bootstrap - Visibility
- Bootstrap Demos
- Bootstrap - Grid Demo
- Bootstrap - Buttons Demo
- Bootstrap - Navigation Demo
- Bootstrap - Blog Demo
- Bootstrap - Slider Demo
- Bootstrap - Carousel Demo
- Bootstrap - Headers Demo
- Bootstrap - Footers Demo
- Bootstrap - Heroes Demo
- Bootstrap - Featured Demo
- Bootstrap - Sidebars Demo
- Bootstrap - Dropdowns Demo
- Bootstrap - List groups Demo
- Bootstrap - Modals Demo
- Bootstrap - Badges Demo
- Bootstrap - Breadcrumbs Demo
- Bootstrap - Jumbotrons Demo
- Bootstrap-Sticky footer Demo
- Bootstrap-Album Demo
- Bootstrap-Sign In Demo
- Bootstrap-Pricing Demo
- Bootstrap-Checkout Demo
- Bootstrap-Product Demo
- Bootstrap-Cover Demo
- Bootstrap-Dashboard Demo
- Bootstrap-Sticky footer navbar Demo
- Bootstrap-Masonry Demo
- Bootstrap-Starter template Demo
- Bootstrap-Album RTL Demo
- Bootstrap-Checkout RTL Demo
- Bootstrap-Carousel RTL Demo
- Bootstrap-Blog RTL Demo
- Bootstrap-Dashboard RTL Demo
Bootstrap - Spinners
This chapter will discuss about Bootstrap spinners. Bootstrap spinner display the loading state of projects using .spinner class.
How it works
Bootstrap spinners show the loading state of a project, using HTML and CSS. JavaScript is not required to build them.
Custom JavaScript is needed to toggle their visibility. Appearance, alignment, and sizing can be easily customized with Bootstrap's utility classes.
- Each loader has role="status" and a nested Loading... for accessibility.
Border spinner
Use .spinner-border class to create lightweight spinner/loading indicator.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Border Spinner
Colors
Border spinner uses currentColor for its border-color, which is customizable with text color utilities. Use text color utilities on a standard spinner.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Colored Spinner
Why not use border-color utilities? Border spinners have transparent border on one side, overridden by .border-{color} utilities.
Growing spinner
You can change the spin type of spinner to the grow spinner. It technically doesn't rotate, but it repeatedly grows.
Use .spinner-grow class to create grow spinner.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Growing Spinner
This spinner uses currentColor to change its appearance with text color utilities.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Growing color Spinners
Alignment
Bootstrap spinners are designed with rems, currentColor, and display: inline-flex. They are easily resizable, recolorable, and alignable.
Margin
For simple spacing, use margin utilities like .m-4.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Margin
Placement
Bootstrap spinners can be placed using flexbox utilities, float utilities, or text alignment utilities.
Flex
Use flexbox placement classes to set the position of spinners.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Flex placement at start, center, end
You can change spinner alignment using flexbox placement.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Flex placement
Float
Use float placement classees to set the position of spinners.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Float placement at start and end
Text align
Use .text-align placement classes to set the position of spinners items.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Text Align at start, center, end
Size
Spinner size can be used to create spinners of various sizes.
For small-size spinners, use .spinner-border-sm and .spinner-grow-sm classes.
For medium-size spinners, use .spinner-border-md and .spinner-grow-md classes.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Small Size Spinner
Medium Size Spinner
To modify the dimensions as required, use custom CSS or inline styles.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Spinner using custom CSS
Buttons
Button spinners are used to show an action that is currently processing. Replace spinner element text with button text if required.
Use .btn and .spinner-border class to create spinner button.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Spinner Buttons
Use .btn and .spinner-grow class to create growing spinner buttons.
Example
You can edit and try running this code using Edit & Run option.
Bootstrap - Spinners Growing Spinner Buttons