Table of Contents
Bootstrap Alerts
Bootstrap alerts provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
<div class="alert alert-primary" role="alert">
A simple primary alert
</div>
<div class="alert alert-secondary" role="alert">
A simple secondary alert
</div>
<div class="alert alert-success" role="alert">
A simple success alert
</div>
<div class="alert alert-danger" role="alert">
A simple danger alert
</div>
<div class="alert alert-warning" role="alert">
A simple warning alert
</div>
<div class="alert alert-info" role="alert">
A simple info alert
</div>
<div class="alert alert-light" role="alert">
A simple light alert
</div>
<div class="alert alert-dark" role="alert">
A simple dark alert
</div>
Bootstrap Alerts with SVG Icons
Here are examples of Bootstrap alerts with SVG icons for enhanced visual feedback.
<div class="alert alert-primary d-flex align-items-center" role="alert">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="bi bi-info-circle-fill flex-shrink-0 me-2" viewBox="0 0 16 16" role="img" aria-label="Info:">
<path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/>
</svg>
<div>
An example alert with an icon
</div>
</div>
Bootstrap Alerts with Buttons
Here are examples of Bootstrap alerts with action buttons.
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!