# Bootstrap v5.3.8 ## Introduction Bootstrap is a powerful, feature-rich front-end framework for building responsive, mobile-first websites and web applications. Developed originally by Twitter and now maintained by the Bootstrap core team, version 5.3.8 represents a modern evolution with significant improvements over previous versions. The framework no longer depends on jQuery, instead using vanilla JavaScript with ES6+ modules, and has switched from LESS to Sass for CSS preprocessing. Bootstrap 5 provides a comprehensive component library, a flexible grid system based on CSS Flexbox and Grid, extensive utility classes, and powerful JavaScript plugins for interactive UI elements. This version includes 12 JavaScript components built as ES modules that can be imported individually or as a bundle, uses Popper.js v2 for advanced positioning of dropdowns and tooltips, and supports both data attributes for declarative initialization and programmatic JavaScript APIs. The framework emphasizes accessibility with ARIA attributes, supports RTL (right-to-left) languages, offers dark mode support through CSS custom properties, and provides extensive customization through Sass variables and maps. Bootstrap can be integrated via CDN, npm, yarn, or by including the compiled CSS and JavaScript files directly in your project. ## JavaScript Components ### Alert Dismissible alert messages with fade animations for user notifications and feedback. ```javascript // HTML markup // ES Module import import Alert from 'bootstrap/js/dist/alert' // Initialize with JavaScript const alertElement = document.getElementById('myAlert') const alert = new Alert(alertElement) // Methods alert.close() // Close the alert alert.dispose() // Destroy the alert instance // Data API (automatic initialization) // Event handling alertElement.addEventListener('close.bs.alert', () => { console.log('Alert is about to close') }) alertElement.addEventListener('closed.bs.alert', () => { console.log('Alert has been closed') }) // Different alert styles // Static method to get or create instance const alert2 = Alert.getOrCreateInstance(alertElement) // Static method to get existing instance const alert3 = Alert.getInstance(alertElement) ``` ### Button Toggle button states and functionality with loading states and checkbox/radio behavior. ```javascript // HTML markup // ES Module import import Button from 'bootstrap/js/dist/button' // Initialize programmatically const button = document.getElementById('myButton') const bsButton = new Button(button) // Methods bsButton.toggle() // Toggle button state bsButton.dispose() // Destroy button instance // Toggle state is managed via aria-pressed attribute // Button group with radio behavior
// Checkbox button group
// Static methods const button2 = Button.getOrCreateInstance(button) const button3 = Button.getInstance(button) ``` ### Carousel Slideshow component for cycling through images or content with automatic rotation and manual controls. ```javascript // HTML markup // ES Module import import Carousel from 'bootstrap/js/dist/carousel' // Initialize with options const carouselElement = document.querySelector('#carouselExample') const carousel = new Carousel(carouselElement, { interval: 5000, // Auto-cycle interval in ms (default: 5000) keyboard: true, // Respond to keyboard events (default: true) pause: 'hover', // Pause on hover: 'hover' or false (default: 'hover') ride: false, // Auto-play on load: 'carousel' or false wrap: true, // Continuous cycling (default: true) touch: true // Support touch swipe gestures (default: true) }) // Control methods carousel.cycle() // Start auto-cycling carousel.pause() // Pause auto-cycling carousel.next() // Go to next slide carousel.prev() // Go to previous slide carousel.to(2) // Go to specific slide index (0-based) carousel.dispose() // Destroy carousel instance // Event handling carouselElement.addEventListener('slide.bs.carousel', (event) => { console.log('Sliding from:', event.from, 'to:', event.to) console.log('Direction:', event.direction) }) carouselElement.addEventListener('slid.bs.carousel', (event) => { console.log('Slide transition complete') }) // Data API - automatic initialization // Control with data attributes // Static methods const carousel2 = Carousel.getOrCreateInstance(carouselElement, { interval: 3000 }) const carousel3 = Carousel.getInstance(carouselElement) ``` ### Collapse Toggle visibility of content panels with smooth transitions, perfect for accordions and expandable sections. ```javascript // HTML markup - Basic collapsible
Some placeholder content for the collapse component.
// Accordion structure

Content for accordion item 1

Content for accordion item 2
// ES Module import import Collapse from 'bootstrap/js/dist/collapse' // Initialize with options const collapseElement = document.querySelector('#collapseExample') const collapse = new Collapse(collapseElement, { parent: '#accordionExample', // Close other panels in accordion toggle: true // Toggle on initialization (default: true) }) // Methods collapse.show() // Show the collapse element collapse.hide() // Hide the collapse element collapse.toggle() // Toggle the collapse element collapse.dispose() // Destroy the collapse instance // Event handling collapseElement.addEventListener('show.bs.collapse', () => { console.log('About to expand') }) collapseElement.addEventListener('shown.bs.collapse', () => { console.log('Fully expanded') }) collapseElement.addEventListener('hide.bs.collapse', () => { console.log('About to collapse') }) collapseElement.addEventListener('hidden.bs.collapse', () => { console.log('Fully collapsed') }) // Always keep one item open in accordion

Content 1
// Static methods const collapse2 = Collapse.getOrCreateInstance(collapseElement) const collapse3 = Collapse.getInstance(collapseElement) ``` ### Dropdown Context menus with advanced positioning via Popper.js, keyboard navigation, and auto-close behavior. ```javascript // HTML markup // ES Module import import Dropdown from 'bootstrap/js/dist/dropdown' // Initialize with options const dropdownElement = document.querySelector('.dropdown-toggle') const dropdown = new Dropdown(dropdownElement, { autoClose: true, // Auto close: true, false, 'inside', 'outside' boundary: 'clippingParents', // Overflow constraint boundary display: 'dynamic', // Dynamic or static positioning offset: [0, 2], // Offset [skidding, distance] popperConfig: null, // Custom Popper.js config reference: 'toggle' // Reference element: 'toggle', 'parent', or DOM element }) // Methods dropdown.show() // Show the dropdown menu dropdown.hide() // Hide the dropdown menu dropdown.toggle() // Toggle the dropdown menu dropdown.update() // Update the dropdown position dropdown.dispose() // Destroy the dropdown instance // Event handling dropdownElement.addEventListener('show.bs.dropdown', () => { console.log('Dropdown is about to be shown') }) dropdownElement.addEventListener('shown.bs.dropdown', () => { console.log('Dropdown is now visible') }) dropdownElement.addEventListener('hide.bs.dropdown', (event) => { console.log('Dropdown is about to hide') // event.preventDefault() to cancel hiding }) dropdownElement.addEventListener('hidden.bs.dropdown', () => { console.log('Dropdown is now hidden') }) // Dropdown variations
// Dropdown in navbar // Split button dropdown
// Auto close options data-bs-auto-close="true" // Close when clicking inside or outside data-bs-auto-close="false" // Disable auto close data-bs-auto-close="inside" // Close when clicking inside data-bs-auto-close="outside" // Close when clicking outside // Custom Popper config const dropdown2 = new Dropdown(element, { popperConfig: { placement: 'top-start', modifiers: [ { name: 'offset', options: { offset: [0, 8] } } ] } }) // Static methods const dropdown3 = Dropdown.getOrCreateInstance(dropdownElement) const dropdown4 = Dropdown.getInstance(dropdownElement) ``` ### Modal Dialog windows with backdrop, keyboard support, focus management, and optional sizing. ```javascript // HTML markup // ES Module import import Modal from 'bootstrap/js/dist/modal' // Initialize with options const modalElement = document.querySelector('#exampleModal') const modal = new Modal(modalElement, { backdrop: true, // Show backdrop: true, false, or 'static' focus: true, // Focus on modal when initialized (default: true) keyboard: true // Close on ESC key (default: true) }) // Methods modal.show() // Show the modal modal.hide() // Hide the modal modal.toggle() // Toggle the modal modal.dispose() // Destroy the modal instance modal.handleUpdate() // Update modal position (if content changed) // Event handling modalElement.addEventListener('show.bs.modal', (event) => { console.log('Modal is about to be shown') // event.relatedTarget contains the button that triggered the modal }) modalElement.addEventListener('shown.bs.modal', () => { console.log('Modal is now visible and focused') }) modalElement.addEventListener('hide.bs.modal', (event) => { console.log('Modal is about to hide') // event.preventDefault() to cancel hiding }) modalElement.addEventListener('hidden.bs.modal', () => { console.log('Modal is now hidden') }) modalElement.addEventListener('hidePrevented.bs.modal', () => { console.log('Hide was prevented (static backdrop clicked)') }) // Data API - trigger modal // Pass data to modal // Modal sizes // Fullscreen modals // Vertically centered modal // Scrollable modal // Static backdrop (doesn't close on click outside) const staticModal = new Modal(modalElement, { backdrop: 'static', keyboard: false }) // Static methods const modal2 = Modal.getOrCreateInstance(modalElement, { backdrop: 'static' }) const modal3 = Modal.getInstance(modalElement) ``` ### Offcanvas Sidebar component that slides in from the edge of the viewport for navigation or content. ```javascript // HTML markup
Offcanvas
Some text as placeholder. In real life you can have the elements you have chosen.
// ES Module import import Offcanvas from 'bootstrap/js/dist/offcanvas' // Initialize with options const offcanvasElement = document.querySelector('#offcanvasExample') const offcanvas = new Offcanvas(offcanvasElement, { backdrop: true, // Show backdrop: true, false, or 'static' keyboard: true, // Close on ESC key (default: true) scroll: false // Allow body scrolling while open (default: false) }) // Methods offcanvas.show() // Show the offcanvas offcanvas.hide() // Hide the offcanvas offcanvas.toggle() // Toggle the offcanvas offcanvas.dispose() // Destroy the offcanvas instance // Event handling offcanvasElement.addEventListener('show.bs.offcanvas', () => { console.log('Offcanvas is about to show') }) offcanvasElement.addEventListener('shown.bs.offcanvas', () => { console.log('Offcanvas is now visible') }) offcanvasElement.addEventListener('hide.bs.offcanvas', () => { console.log('Offcanvas is about to hide') }) offcanvasElement.addEventListener('hidden.bs.offcanvas', () => { console.log('Offcanvas is now hidden') }) offcanvasElement.addEventListener('hidePrevented.bs.offcanvas', () => { console.log('Hide was prevented (static backdrop clicked)') }) // Data API - trigger offcanvas // Placement options
From left (start)
From right (end)
From top
From bottom
// Allow body scrolling
Scrollable content
// Static backdrop const offcanvas2 = new Offcanvas(offcanvasElement, { backdrop: 'static', keyboard: false }) // Static methods const offcanvas3 = Offcanvas.getOrCreateInstance(offcanvasElement) const offcanvas4 = Offcanvas.getInstance(offcanvasElement) ``` ### Popover Extended tooltips with title and body content, supporting click or hover triggers. ```javascript // HTML markup // ES Module import import Popover from 'bootstrap/js/dist/popover' // Initialize (required - popovers must be explicitly initialized) const popoverTriggerList = document.querySelectorAll('[data-bs-toggle="popover"]') const popoverList = [...popoverTriggerList].map(el => new Popover(el)) // Initialize with options const popoverElement = document.querySelector('#myPopover') const popover = new Popover(popoverElement, { animation: true, // Apply fade transition (default: true) container: false, // Append to specific element (default: false) content: '', // Content text or function customClass: '', // Add custom class delay: 0, // Delay showing/hiding: number or { show, hide } html: false, // Allow HTML in content (default: false) placement: 'top', // Placement: auto, top, bottom, left, right sanitize: true, // Sanitize HTML content (default: true) selector: false, // Delegate to descendant elements template: '
...
', // Base HTML template title: '', // Title text or function trigger: 'click', // Trigger: click, hover, focus, manual offset: [0, 8], // Offset [skidding, distance] fallbackPlacements: ['top', 'right', 'bottom', 'left'], boundary: 'clippingParents', // Overflow constraint boundary popperConfig: null // Custom Popper.js config }) // Methods popover.show() // Show the popover popover.hide() // Hide the popover popover.toggle() // Toggle the popover popover.enable() // Enable the popover popover.disable() // Disable the popover popover.toggleEnabled() // Toggle enabled state popover.update() // Update the popover position popover.dispose() // Destroy the popover instance // Event handling popoverElement.addEventListener('show.bs.popover', () => { console.log('Popover is about to show') }) popoverElement.addEventListener('shown.bs.popover', () => { console.log('Popover is now visible') }) popoverElement.addEventListener('hide.bs.popover', () => { console.log('Popover is about to hide') }) popoverElement.addEventListener('hidden.bs.popover', () => { console.log('Popover is now hidden') }) popoverElement.addEventListener('inserted.bs.popover', () => { console.log('Popover has been added to the DOM') }) // Function-based content const popover2 = new Popover(element, { title: () => { return 'Dynamic title from function' }, content: function() { return `Content for ${this.getAttribute('data-name')}` } }) // HTML content const popover3 = new Popover(element, { html: true, content: 'Bold content with HTML' }) // Different triggers // Delay configuration const popover4 = new Popover(element, { delay: { show: 500, hide: 100 } }) // Dismiss on next click // Custom container const popover5 = new Popover(element, { container: 'body' // Append to body instead of parent }) // Static methods const popover6 = Popover.getOrCreateInstance(popoverElement) const popover7 = Popover.getInstance(popoverElement) ``` ### ScrollSpy Automatically updates navigation based on scroll position for single-page layouts. ```javascript // HTML markup

First heading

Content for first section...

Second heading

Content for second section...

Third heading

Content for third section...

// ES Module import import ScrollSpy from 'bootstrap/js/dist/scrollspy' // Initialize with options const scrollSpyElement = document.querySelector('[data-bs-spy="scroll"]') const scrollSpy = new ScrollSpy(scrollSpyElement, { target: '#navbar-example', // Target navigation element (required) offset: 10, // Offset from top (default: 10) method: 'auto', // Scroll method: auto, offset, position (default: auto) rootMargin: '0px 0px -40%', // Root margin for intersection observer smoothScroll: false, // Enable smooth scrolling (default: false) threshold: [0.1, 0.5, 1.0] // Intersection observer thresholds }) // Methods scrollSpy.refresh() // Refresh scrollspy (after DOM changes) scrollSpy.dispose() // Destroy the scrollspy instance // Event handling scrollSpyElement.addEventListener('activate.bs.scrollspy', (event) => { console.log('New section activated:', event.relatedTarget) // event.relatedTarget is the newly activated nav link }) // Data API - automatic initialization on body // Nested navigation

Item 1

Item 1-1
Item 1-2

Item 2

// List group navigation
Item 1 Item 2 Item 3

Item 1

Content...

Item 2

Content...

Item 3

Content...

// Refresh after adding/removing content const addContent = () => { document.querySelector('.content').innerHTML += '
New content
' scrollSpy.refresh() // Update scrollspy } // Static methods const scrollSpy2 = ScrollSpy.getOrCreateInstance(scrollSpyElement, { offset: 20 }) const scrollSpy3 = ScrollSpy.getInstance(scrollSpyElement) ``` ### Tab Navigational tabs to switch between content panes with support for fade transitions. ```javascript // HTML markup
Home content
Profile content
Contact content
// ES Module import import Tab from 'bootstrap/js/dist/tab' // Initialize and show tab const triggerTabList = document.querySelectorAll('#myTab button') triggerTabList.forEach(triggerEl => { const tabTrigger = new Tab(triggerEl) triggerEl.addEventListener('click', event => { event.preventDefault() tabTrigger.show() }) }) // Programmatic activation const tabElement = document.querySelector('#profile-tab') const tab = new Tab(tabElement) tab.show() // Show this tab // Methods tab.show() // Show the tab pane tab.dispose() // Destroy the tab instance // Event handling const tabEl = document.querySelector('button[data-bs-toggle="tab"]') tabEl.addEventListener('show.bs.tab', event => { console.log('New tab:', event.target) // Newly activated tab console.log('Previous tab:', event.relatedTarget) // Previous active tab }) tabEl.addEventListener('shown.bs.tab', event => { console.log('Tab shown:', event.target) }) tabEl.addEventListener('hide.bs.tab', event => { console.log('Current tab being hidden:', event.target) console.log('New tab being shown:', event.relatedTarget) }) tabEl.addEventListener('hidden.bs.tab', event => { console.log('Tab hidden:', event.target) }) // Select tab by name const firstTabEl = document.querySelector('#myTab button:first-child') const firstTab = new Tab(firstTabEl) firstTab.show() // Select specific tab const someTabTriggerEl = document.querySelector('#profile-tab') const someTab = Tab.getInstance(someTabTriggerEl) someTab.show() // Pills navigation
Home content
Profile content
// Vertical tabs
Content
Content
// Using anchor links // Static methods const tab2 = Tab.getOrCreateInstance(tabElement) const tab3 = Tab.getInstance(tabElement) ``` ### Toast Lightweight notification messages that auto-dismiss after a delay. ```javascript // HTML markup // ES Module import import Toast from 'bootstrap/js/dist/toast' // Initialize with options const toastElement = document.querySelector('.toast') const toast = new Toast(toastElement, { animation: true, // Apply fade transition (default: true) autohide: true, // Auto-hide the toast (default: true) delay: 5000 // Delay in ms before hiding (default: 5000) }) // Methods toast.show() // Show the toast toast.hide() // Hide the toast toast.dispose() // Destroy the toast instance // Event handling toastElement.addEventListener('show.bs.toast', () => { console.log('Toast is about to show') }) toastElement.addEventListener('shown.bs.toast', () => { console.log('Toast is now visible') }) toastElement.addEventListener('hide.bs.toast', () => { console.log('Toast is about to hide') }) toastElement.addEventListener('hidden.bs.toast', () => { console.log('Toast is now hidden') }) // Show toast on page load document.addEventListener('DOMContentLoaded', () => { const toastElList = document.querySelectorAll('.toast') const toastList = [...toastElList].map(el => new Toast(el)) toastList.forEach(toast => toast.show()) }) // Toast container for stacking
// Different positioning
Top left
Top center
Top right
Bottom left
Bottom right
// Color schemes // Custom delay and no auto-hide const toast2 = new Toast(toastElement, { autohide: false // Won't auto-hide }) const toast3 = new Toast(toastElement, { delay: 10000 // Hide after 10 seconds }) // Programmatically create and show toast const createToast = (message) => { const toastHTML = ` ` const container = document.querySelector('.toast-container') container.insertAdjacentHTML('beforeend', toastHTML) const newToast = container.lastElementChild const toast = new Toast(newToast) toast.show() } // Static methods const toast4 = Toast.getOrCreateInstance(toastElement) const toast5 = Toast.getInstance(toastElement) ``` ### Tooltip Hover-triggered overlays with advanced positioning via Popper.js for additional context. ```javascript // HTML markup // ES Module import import Tooltip from 'bootstrap/js/dist/tooltip' // Initialize all tooltips (required - must be explicitly initialized) const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]') const tooltipList = [...tooltipTriggerList].map(el => new Tooltip(el)) // Initialize with options const tooltipElement = document.querySelector('#myTooltip') const tooltip = new Tooltip(tooltipElement, { animation: true, // Apply fade transition (default: true) container: false, // Append to specific element (default: false) customClass: '', // Add custom class delay: 0, // Delay showing/hiding: number or { show, hide } html: false, // Allow HTML in tooltip (default: false) placement: 'top', // Placement: auto, top, bottom, left, right sanitize: true, // Sanitize HTML content (default: true) selector: false, // Delegate to descendant elements template: '
...
', // Base HTML template title: '', // Title text, element, or function trigger: 'hover focus', // Trigger: hover, focus, click, manual offset: [0, 0], // Offset [skidding, distance] fallbackPlacements: ['top', 'right', 'bottom', 'left'], boundary: 'clippingParents', // Overflow constraint boundary popperConfig: null // Custom Popper.js config }) // Methods tooltip.show() // Show the tooltip tooltip.hide() // Hide the tooltip tooltip.toggle() // Toggle the tooltip tooltip.enable() // Enable the tooltip tooltip.disable() // Disable the tooltip tooltip.toggleEnabled() // Toggle enabled state tooltip.update() // Update the tooltip position tooltip.dispose() // Destroy the tooltip instance // Event handling tooltipElement.addEventListener('show.bs.tooltip', () => { console.log('Tooltip is about to show') }) tooltipElement.addEventListener('shown.bs.tooltip', () => { console.log('Tooltip is now visible') }) tooltipElement.addEventListener('hide.bs.tooltip', () => { console.log('Tooltip is about to hide') }) tooltipElement.addEventListener('hidden.bs.tooltip', () => { console.log('Tooltip is now hidden') }) tooltipElement.addEventListener('inserted.bs.tooltip', () => { console.log('Tooltip has been added to the DOM') }) // Different placements // HTML content const tooltip2 = new Tooltip(element, { html: true, title: 'Bold italic content' }) // Function-based title const tooltip3 = new Tooltip(element, { title: function() { return `Dynamic tooltip for ${this.getAttribute('data-name')}` } }) // Custom delay const tooltip4 = new Tooltip(element, { delay: { show: 500, hide: 100 } }) // Disabled elements (need wrapper) // Manual trigger const tooltip5 = new Tooltip(element, { trigger: 'manual' }) // Control manually tooltip5.show() setTimeout(() => tooltip5.hide(), 2000) // Custom triggers const tooltip6 = new Tooltip(element, { trigger: 'click' // Show on click }) // Delegated tooltips (for dynamic content) const tooltip7 = new Tooltip(document.body, { selector: '[data-bs-toggle="tooltip"]' }) // Custom container const tooltip8 = new Tooltip(element, { container: 'body' }) // Custom class const tooltip9 = new Tooltip(element, { customClass: 'my-custom-tooltip-class' }) // Custom Popper config const tooltip10 = new Tooltip(element, { popperConfig: { placement: 'top', modifiers: [ { name: 'offset', options: { offset: [0, 8] } } ] } }) // Static methods const tooltip11 = Tooltip.getOrCreateInstance(tooltipElement) const tooltip12 = Tooltip.getInstance(tooltipElement) ``` ## CSS Grid System ### Responsive Grid Layout Flexbox-based 12-column grid system with responsive breakpoints and extensive customization. ```html
Column
Column
Column
Fixed width responsive container
Full width container
100% width until sm breakpoint
100% width until md breakpoint
100% width until lg breakpoint
100% width until xl breakpoint
100% width until xxl breakpoint
1 of 2
2 of 2
1 of 3
2 of 3
3 of 3
4 columns wide
8 columns wide
Responsive column
Responsive column
Responsive column
Auto
6 columns
Auto
Level 1: .col-sm-9
Level 2: .col-8 .col-sm-6
Level 2: .col-4 .col-sm-6
.col-md-4
.col-md-4 .offset-md-4
.col-md-3 .offset-md-3
.col-md-3 .offset-md-3
No gutters
Small gutters
Default gutters
Large gutters
Horizontal gutters only
Vertical gutters only
Responsive gutters
Column
Column
Column
Column
Column
Column
Column
Column
Align items to top
Align items to center
Align items to bottom
Align self start
Align self center
Align self end
Justify start
Justify center
Justify end
Justify around
Justify between
Justify evenly
First (order-3)
Second (order-1)
Third (order-2)
Responsive order
``` ## Utility Classes ### Spacing, Display, and Layout Utilities ```html
Margin on all sides
Margin top
Margin bottom
Margin start (left in LTR)
Margin end (right in LTR)
Margin horizontal
Margin vertical
Center horizontally
Padding on all sides
Padding top
Padding horizontal and vertical
Responsive margin
Hidden
Block
Inline
Inline block
Flexbox
Inline flexbox
CSS Grid
Table
Hidden on mobile, visible on md+
Visible on mobile, hidden on md+
Flex row (default)
Flex column
Flex row reverse
Flex column reverse
Justify start
Justify center
Justify end
Justify between
Justify around
Justify evenly
Align items start
Align items center
Align items end
Align items baseline
Align items stretch
Flex wrap
Flex no wrap
Flex wrap reverse
Grow
Shrink
Fill
Text align start
Text align center
Text align end
lowercase text
UPPERCASE TEXT
capitalize text
Bold text
Bolder text
Normal weight
Light weight
Lighter weight
Italic text
Normal style
No decoration
Underline
Line through
Primary text
Secondary text
Success text
Danger text
Warning text
Info text
Light text
Dark text
Muted text
White text
Primary background
Secondary background
Success background
Danger background
Warning background
Info background
Light background
Dark background
Transparent background
Border on all sides
Border top
Border end
Border bottom
Border start
No border
No top border
Primary border
Success border
1px border
2px border
3px border
4px border
5px border
Rounded corners
No rounded corners
Small rounded
Medium rounded
Large rounded
Circle
Pill shape
Rounded top
Rounded end
Rounded bottom
Rounded start
Width 25%
Width 50%
Width 75%
Width 100%
Width auto
Height 25%
Height 50%
Height 75%
Height 100%
Height auto
Max width 100%
Max height 100%
Viewport width 100%
Viewport height 100%
Min viewport width 100%
Min viewport height 100%
Static
Relative
Absolute
Fixed
Sticky
Top left
Top right
Bottom left
Bottom right
Centered
No shadow
Small shadow
Default shadow
Large shadow
Visible
Auto overflow
Hidden overflow
Visible overflow
Scroll overflow
Z-index 0
Z-index 1
Z-index 2
Z-index 3
``` ## Main Use Cases and Applications Bootstrap v5.3.8 excels in rapid development of responsive web applications where consistent, professional UI and cross-browser compatibility are essential. It's ideal for building admin dashboards, SaaS platforms, e-commerce sites, corporate websites, web applications, and MVPs where development velocity matters. The framework's extensive component library, utility-first approach, and responsive grid system enable developers to build complex interfaces quickly without writing custom CSS for common patterns. Organizations leverage Bootstrap for enterprise applications, internal tools, and customer-facing products where accessibility (WCAG compliance), mobile responsiveness, and maintainability are critical requirements. The framework integrates seamlessly into modern JavaScript workflows through ES modules and npm packages, supporting tree-shaking for optimal bundle sizes. Import only the components you need, customize the framework through Sass variables and maps, or extend it with custom CSS. Bootstrap works well with React, Vue, Angular, and other frameworks through wrapper libraries, and its data-attribute API allows progressive enhancement without JavaScript. The utility classes follow a consistent naming convention for rapid prototyping, while the comprehensive Sass source enables deep customization of colors, spacing, typography, and component styles. With built-in dark mode support via CSS custom properties and extensive RTL language support, Bootstrap provides a solid foundation for global, accessible web applications.