Bootstrap comes with dozens of components that you can use to create interactive and attractive web pages. Here are some of the most commonly used components:
Cards are flexible content containers with multiple variants and options.
Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Card link Another link
<div class="card">
<img src="..." class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some text here...</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
Alerts provide contextual feedback messages for typical user actions.
This is an alert with additional content. It has a heading, paragraph text, and a horizontal rule.
Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
<div class="alert alert-primary" role="alert">
A simple primary alert—check it out!
</div>
<!-- Dismissible Alert -->
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Holy guacamole!</strong> You should check in on some of those fields below.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
Bootstrap's form controls expand on our Rebooted form styles with classes.
<form>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1">
</div>
<div class="mb-3">
<label for="exampleInputPassword1" class="form-label">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
Modals are dialog boxes/popups that are displayed on top of the current page.
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#exampleModal">
Launch modal
</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">...
<div class="modal-body">...
<div class="modal-footer">...
</div>
</div>
</div>
A slideshow component for cycling through elements—images or slides of text.
<div id="carouselExample" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExample" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<!-- More indicators... -->
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="..." class="d-block w-100" alt="...">
<div class="carousel-caption d-none d-md-block">
<h5>First slide label</h5>
<p>Some content...</p>
</div>
</div>
<!-- More items... -->
</div>
<!-- Controls... -->
</div>