Alerts
Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.
Default alerts
Wrap any text and an optional dismiss button in .alert
and one of the four contextual classes (e.g., .alert-success
) for basic alert messages.
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it's not super important.
Warning! Better check yourself, you're not looking too good.
Oh snap! Change a few things up and try submitting again.
<div class="alert alert-success" role="alert">...</div>
<div class="alert alert-info" role="alert">...</div>
<div class="alert alert-warning" role="alert">...</div>
<div class="alert alert-danger" role="alert">...</div>
Dismissible alerts
Build on any alert by adding an optional .alert-dismissible
and close button.
Warning! Better check yourself, you're not looking too good.
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Warning!</strong> Better check yourself, you're not looking too good.
</div>
Links in alerts
Use the .alert-link
utility class to quickly provide matching colored links within any alert.
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it's not super important.
Warning! Better check yourself, you're not looking too good.
Oh snap! Change a few things up and try submitting again.
<div class="alert alert-success" role="alert">
<a href="#" class="alert-link">...</a>
</div>
<div class="alert alert-info" role="alert">
<a href="#" class="alert-link">...</a>
</div>
<div class="alert alert-warning" role="alert">
<a href="#" class="alert-link">...</a>
</div>
<div class="alert alert-danger" role="alert">
<a href="#" class="alert-link">...</a>
</div>
Callouts
Callouts also are alerts, but in different style.
Well done!
You successfully read this important alert message.
Heads up!
This alert needs your attention, but it's not super important.
Warning!
Better check yourself, you're not looking too good.
Oh snap!
Change a few things up and try submitting again.
<div class="callout callout-success" role="alert">
<h4>Well done!</h4>
<p>You successfully read this important alert message.</p>
</div>
<div class="callout callout-info" role="alert">
<h4>Heads up!</h4>
<p>This alert needs your attention, but it's not super important.</p>
</div>
<div class="callout callout-warning" role="alert">
<h4>Warning!</h4>
<p>Better check yourself, you're <a href="#">not looking too good</a>.</p>
</div>
<div class="callout callout-danger" role="alert">
<h4>Oh snap!</h4>
<p><a href="#">Change a few things up</a> and try submitting again.</p>
</div>