Bootstrap 5 Home
The world's most popular front-end framework
๐ What is Bootstrap 5?
Bootstrap 5 is a powerful, mobile-first CSS framework for building responsive websites quickly. It provides ready-to-use components, utilities, and a flexible grid system to create modern web designs effortlessly.
<!-- Simple Bootstrap Button -->
<button class="btn btn-primary">Click Me</button>
Why Choose Bootstrap 5?
Mobile-First
Bootstrap 5 is designed with mobile devices in mind first, ensuring your website looks perfect on all screen sizes from phones to desktops. Responsive design is built-in by default.
Fast Development
Build websites faster with pre-built components like buttons, cards, navbars, and forms. No need to write CSS from scratch, just use Bootstrap's ready-made classes.
Customizable
Easily customize colors, spacing, and components using CSS variables. Bootstrap 5 offers extensive customization options to match your brand and design requirements perfectly.
Browser Compatible
Works seamlessly across all modern browsers including Chrome, Firefox, Safari, and Edge. Bootstrap ensures consistent appearance and functionality everywhere your users browse.
๐น Bootstrap 5 Features
Bootstrap 5 is a powerful, feature-rich front-end toolkit designed for rapid, responsive web development. Its hallmark is the robust, mobile-first 12-column grid system built with Flexbox. It includes a vast library of utility classes for spacing, sizing, colors, and typography that enable styling directly in the HTML. The component library offers pre-styled, interactive elements like navbars, cards, modals, and carousels. Enhanced by a vanilla JavaScript plugin API (jQuery-free), custom CSS properties, improved form controls, and an updated icon library, Bootstrap 5 provides everything needed to build modern, accessible, and cross-browser compatible interfaces efficiently.
<!-- Bootstrap Grid Example -->
<div class="container">
<div class="row">
<div class="col-md-6">Column 1</div>
<div class="col-md-6">Column 2</div>
</div>
</div>
๐น What's New in Bootstrap 5?
Bootstrap 5 represents a significant evolution, most notably by removing the jQuery dependency in favor of vanilla JavaScript, resulting in lighter bundles and better performance. It introduces a new, more flexible grid tier (xxl) and an improved gutter system. The forms have been completely revamped with a new design and floating labels. A new utilities API allows for easier creation of custom utility classes. Custom CSS properties (variables) are used more extensively for theming. Icons are now first-class citizens with Bootstrap Icons. These changes, alongside refreshed documentation, make Bootstrap 5 more modern, modular, and developer-friendly than its predecessors.
Key Updates:
- No jQuery: Pure JavaScript for better performance
- CSS Variables: Easy customization
- New Components: Offcanvas, accordion improvements
- Utility API: Create custom utilities
- RTL Support: Right-to-left language support
๐น Quick Example
A Bootstrap card component demonstrates the framework's efficiency. With just a few classesโ.card, .card-body, .card-title, .card-textโyou create a polished, flexible content container. You can easily add images (.card-img-top), headers, footers, and contextual backgrounds (.bg-primary). Cards are inherently responsive and work seamlessly with the grid system. This example illustrates Bootstrap's core philosophy: providing pre-built, customizable components that adhere to design best practices, allowing developers to construct professional-looking user interfaces quickly without starting from scratch.
<div class="card" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">Card Title</h5>
<p class="card-text">Some quick example text.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
๐น Getting Started
Beginning with Bootstrap 5 is designed to be easy and accommodate various workflows. The quickest method is to use the CDN links for instant inclusion in any HTML file. For more control, you can download the precompiled CSS and JS files to host locally. For modern, customizable projects, install it via npm or yarn (npm install bootstrap) to integrate it into your asset pipeline and leverage the full power of Sass variables and modular JavaScript imports. Each method is well-documented, allowing developers of all levels, from beginners to experts, to choose the path that best fits their project's needs and complexity.
<!-- Include Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Include Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>