Ask any question about Bootstrap here... and get an instant response.
Post this Question & Answer:
How can I customize the default Bootstrap carousel indicators?
Asked on Feb 20, 2026
Answer
To customize the default Bootstrap carousel indicators, you can apply custom CSS to modify their appearance. Here's a basic example showing how to change the color and size of the indicators.
<!-- BEGIN COPY / PASTE -->
<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-indicators">
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1" aria-label="Slide 2"></button>
<button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="..." class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="..." class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="..." class="d-block w-100" alt="...">
</div>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
<style>
.carousel-indicators button {
width: 15px;
height: 15px;
background-color: #ff0000; /* Red color */
}
.carousel-indicators .active {
background-color: #00ff00; /* Green color */
}
</style>
<!-- END COPY / PASTE -->Additional Comment:
✅ Answered with Bootstrap 5 best practices.- The example above changes the size and color of the carousel indicators.
- The `carousel-indicators button` selector targets all indicators, while `.carousel-indicators .active` targets the active indicator.
- You can further customize by adding more CSS properties like border, margin, etc.
- Ensure your custom styles do not conflict with other Bootstrap components.
Recommended Links:
