Skip to main content

Carousel

A slideshow component for cycling through elements—images or slides of text—like a carousel.

<div id="slideshow" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#slideshow" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#slideshow" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#slideshow" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="assets/img/modern-building-1.jpg" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="assets/img/modern-building-2.jpg" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="assets/img/modern-building-3.jpg" class="d-block w-100" alt="...">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#slideshow" data-bs-slide="prev">
<i class="material-icons icon-2x" aria-hidden="true">arrow_back_ios</i>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#slideshow" data-bs-slide="next">
<i class="material-icons icon-2x" aria-hidden="true">arrow_forward_ios</i>
<span class="visually-hidden">Next</span>
</button>
</div>

Bootstrap Documentation