Alert
Alert
Ex. <div class="alert alert-primary" role="alert"> A simple primary alert—check it out! </div>
A simple primary alert—check it out!
A simple secondary alert—check it out!
A simple success alert—check it out!
A simple danger alert—check it out!
A simple warning alert—check it out!
A simple info alert—check it out!
Alert with Icons
Ex. <div class="alert bg-soft-primary fw-medium" role="alert"> <i class="uil uil-info-circle fs-5 align-middle me-1"></i> An example alert with an icon </div>
An example alert with an icon
An example success alert with an icon
An example warning alert with an icon
An example danger alert with an icon
Alert Links
Ex. <div class="alert alert-primary" role="alert"> A simple primary alert with <a href="#" class="alert-link"></a>. </div>
A simple primary alert with an link.
A simple secondary alert with an link.
A simple success alert with an link.
A simple danger alert with an link.
A simple warning alert with an link.
A simple info alert with an link.
Additional Content
Well done!
Aww yeah, you successfully read this important alert message. This example text is going to run a bit longer so that you can see how spacing within an alert works with this kind of content.
Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
Dismissing Alert
Ex.
<div class="alert alert-success alert-dismissible fade show" role="alert">
<strong>Well done!</strong> You successfully read this important alert message.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"> </button>
</div>
<strong>Well done!</strong> You successfully read this important alert message.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"> </button>
</div>
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it's not super important.
Holy guacamole! You should check in on some of those fields below.
Oh snap! Change a few things up and try submitting again.
Advanced Alert
Ex.
<div class="alert alert-primary alert-pills" role="alert">
<span class="badge rounded-pill bg-danger"> New </span>
<span class="alert-content"> A Modern primary alert—check it out! </span>
</div>
<span class="badge rounded-pill bg-danger"> New </span>
<span class="alert-content"> A Modern primary alert—check it out! </span>
</div>
New
A Modern primary alert—check it out!
New
A Modern danger alert—check it out!
Advanced Outline Alert
Ex.
<div class="alert alert-outline-primary alert-pills" role="alert">
<span class="badge rounded-pill bg-danger"> New </span>
<span class="alert-content"> A Modern primary alert—check it out! </span>
</div>
<span class="badge rounded-pill bg-danger"> New </span>
<span class="alert-content"> A Modern primary alert—check it out! </span>
</div>
New
A Modern primary alert—check it out!
New
A Modern danger alert—check it out!