Alerts
Provide contextual feedback messages for typical user actions.
Basic example
A simple primary alert with an example link. Give it a click if you like.
A simple secondary alert with an example link. Give it a click if you like.
A simple success alert with an example link. Give it a click if you like.
A simple danger alert with an example link. Give it a click if you like.
A simple warning alert with an example link. Give it a click if you like.
A simple info alert with an example link. Give it a click if you like.
A simple light alert with an example link. Give it a click if you like.
A simple dark alert with an example link. Give it a click if you like.
<!-- Primary alert -->
<div class="alert alert-primary" role="alert">
A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<!-- Secondary alert -->
<div class="alert alert-secondary" role="alert">
A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<!-- Success alert -->
<div class="alert alert-success" role="alert">
A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<!-- Danger alert -->
<div class="alert alert-danger" role="alert">
A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<!-- Warning alert -->
<div class="alert alert-warning" role="alert">
A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<!-- Info alert -->
<div class="alert alert-info" role="alert">
A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<!-- Light alert -->
<div class="alert alert-light" role="alert">
A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
<!-- Dark alert -->
<div class="alert alert-dark" role="alert">
A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</div>
// Primary alert
.alert.alert-primary(role="alert")
| A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Secondary alert
.alert.alert-secondary(role="alert")
| A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Success alert
.alert.alert-success(role="alert")
| A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Danger alert
.alert.alert-danger(role="alert")
| A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Warning alert
.alert.alert-warning(role="alert")
| A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Info alert
.alert.alert-info(role="alert")
| A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Light alert
.alert.alert-light(role="alert")
| A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Dark alert
.alert.alert-dark(role="alert")
| A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
Alert with icon
A simple primary alert with an example link. Give it a click if you like.
A simple secondary alert with an example link. Give it a click if you like.
A simple success alert with an example link. Give it a click if you like.
A simple danger alert with an example link. Give it a click if you like.
A simple warning alert with an example link. Give it a click if you like.
A simple info alert with an example link. Give it a click if you like.
A simple light alert with an example link. Give it a click if you like.
A simple dark alert with an example link. Give it a click if you like.
<!-- Primary alert -->
<div class="alert d-flex alert-primary" role="alert">
<i class="ai-bell fs-xl me-3"></i>
<div>A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</div>
<!-- Secondary alert -->
<div class="alert d-flex alert-secondary" role="alert">
<i class="ai-clock fs-xl me-3"></i>
<div>A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</div>
<!-- Success alert -->
<div class="alert d-flex alert-success" role="alert">
<i class="ai-check-circle fs-xl me-3"></i>
<div>A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</div>
<!-- Danger alert -->
<div class="alert d-flex alert-danger" role="alert">
<i class="ai-x-circle fs-xl me-3"></i>
<div>A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</div>
<!-- Warning alert -->
<div class="alert d-flex alert-warning" role="alert">
<i class="ai-alert-triangle fs-xl me-3"></i>
<div>A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</div>
<!-- Info alert -->
<div class="alert d-flex alert-info" role="alert">
<i class="ai-alert-circle fs-xl me-3"></i>
<div>A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</div>
<!-- Light alert -->
<div class="alert d-flex alert-light" role="alert">
<i class="ai-unlock fs-xl me-3"></i>
<div>A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</div>
<!-- Dark alert -->
<div class="alert d-flex alert-dark" role="alert">
<i class="ai-map-pin fs-xl me-3"></i>
<div>A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</div>
// Primary alert
.alert.d-flex.alert-primary(role="alert")
i.ai-bell.fs-xl.me-3
div A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Secondary alert
.alert.d-flex.alert-secondary(role="alert")
i.ai-clock.fs-xl.me-3
div A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Success alert
.alert.d-flex.alert-success(role="alert")
i.ai-check-circle.fs-xl.me-3
div A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Danger alert
.alert.d-flex.alert-danger(role="alert")
i.ai-x-circle.fs-xl.me-3
div A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Warning alert
.alert.d-flex.alert-warning(role="alert")
i.ai-alert-triangle.fs-xl.me-3
div A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Info alert
.alert.d-flex.alert-info(role="alert")
i.ai-alert-circle.fs-xl.me-3
div A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Light alert
.alert.d-flex.alert-light(role="alert")
i.ai-unlock.fs-xl.me-3
div A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
// Dark alert
.alert.d-flex.alert-dark(role="alert")
i.ai-map-pin.fs-xl.me-3
div A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
Dismissible alerts
Primary alert: Dismiss me by clicking the close button on the right.
Secondary alert: Dismiss me by clicking the close button on the right.
Success alert: Dismiss me by clicking the close button on the right.
Danger alert: Dismiss me by clicking the close button on the right.
Warning alert: Dismiss me by clicking the close button on the right.
Info alert: Dismiss me by clicking the close button on the right.
Light alert: Dismiss me by clicking the close button on the right.
Dark alert: Dismiss me by clicking the close button on the right.
<!-- Primary alert -->
<div class="alert alert-primary alert-dismissible fade show" role="alert">
<span class="fw-medium">Primary alert:</span> Dismiss me by clicking the close button on the right.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<!-- Secondary alert -->
<div class="alert alert-secondary alert-dismissible fade show" role="alert">
<span class="fw-medium">Secondary alert:</span> Dismiss me by clicking the close button on the right.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<!-- Success alert -->
<div class="alert alert-success alert-dismissible fade show" role="alert">
<span class="fw-medium">Success alert:</span> Dismiss me by clicking the close button on the right.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<!-- Danger alert -->
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<span class="fw-medium">Danger alert:</span> Dismiss me by clicking the close button on the right.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<!-- Warning alert -->
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<span class="fw-medium">Warning alert:</span> Dismiss me by clicking the close button on the right.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<!-- Info alert -->
<div class="alert alert-info alert-dismissible fade show" role="alert">
<span class="fw-medium">Info alert:</span> Dismiss me by clicking the close button on the right.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<!-- Light alert -->
<div class="alert alert-light alert-dismissible fade show" role="alert">
<span class="fw-medium">Light alert:</span> Dismiss me by clicking the close button on the right.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
<!-- Dark alert -->
<div class="alert alert-dark alert-dismissible fade show" role="alert">
<span class="fw-medium">Dark alert:</span> Dismiss me by clicking the close button on the right.
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
// Primary alert
.alert.alert-primary.alert-dismissible.fade.show(role="alert")
| <span class="fw-medium">Primary alert:</span> Dismiss me by clicking the close button on the right.
button(type="button", data-bs-dismiss="alert", aria-label="Close").btn-close
// Secondary alert
.alert.alert-secondary.alert-dismissible.fade.show(role="alert")
| <span class="fw-medium">Secondary alert:</span> Dismiss me by clicking the close button on the right.
button(type="button", data-bs-dismiss="alert", aria-label="Close").btn-close
// Success alert
.alert.alert-success.alert-dismissible.fade.show(role="alert")
| <span class="fw-medium">Success alert:</span> Dismiss me by clicking the close button on the right.
button(type="button", data-bs-dismiss="alert", aria-label="Close").btn-close
// Danger alert
.alert.alert-danger.alert-dismissible.fade.show(role="alert")
| <span class="fw-medium">Danger alert:</span> Dismiss me by clicking the close button on the right.
button(type="button", data-bs-dismiss="alert", aria-label="Close").btn-close
// Warning alert
.alert.alert-warning.alert-dismissible.fade.show(role="alert")
| <span class="fw-medium">Warning alert:</span> Dismiss me by clicking the close button on the right.
button(type="button", data-bs-dismiss="alert", aria-label="Close").btn-close
// Info alert
.alert.alert-info.alert-dismissible.fade.show(role="alert")
| <span class="fw-medium">Info alert:</span> Dismiss me by clicking the close button on the right.
button(type="button", data-bs-dismiss="alert", aria-label="Close").btn-close
// Light alert
.alert.alert-light.alert-dismissible.fade.show(role="alert")
| <span class="fw-medium">Light alert:</span> Dismiss me by clicking the close button on the right.
button(type="button", data-bs-dismiss="alert", aria-label="Close").btn-close
// Dark alert
.alert.alert-dark.alert-dismissible.fade.show(role="alert")
| <span class="fw-medium">Dark alert:</span> Dismiss me by clicking the close button on the right.
button(type="button", data-bs-dismiss="alert", aria-label="Close").btn-close.btn-close-white
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.
<!-- Primary alert -->
<div class="alert alert-primary" role="alert">
<h4 class="pt-2 alert-heading">Well done!</h4>
<p>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.</p>
<hr>
<p class="mb-2">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div>
// Primary alert
.alert.alert-primary(role="alert")
h4.pt-2.alert-heading Well done!
p 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.
hr
p.mb-2 Whenever you need to, be sure to use margin utilities to keep things nice and tidy.
Background image
<!-- Alert with background image -->
<div class="alert alert-dismissible fade show text-center py-5 bg-position-center bg-repeat-0 bg-size-cover border-0" style="background-image: url(path-to-image)" role="alert">
<i class="ai-clock text-white my-4" style="font-size: 3rem;"></i>
<h2 class="text-white text-shadow">Check Our Limited Offers!</h2>
<h4 class="text-white fw-normal text-shadow mb-4 pb-2">Save up to 50%</h4>
<a href="#" class="btn btn-primary mb-3">View offers</a>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
// Alert with background image
.alert.alert-dismissible.fade.show.text-center.py-5.bg-position-center.bg-repeat-0.bg-size-cover.border-0(style="background-image: url(path-to-image)" role="alert")
i(style="font-size: 3rem;").ai-clock.text-white.my-4
h2.text-white.text-shadow Check Our Limited Offers!
h4.text-white.fw-normal.text-shadow.mb-4.pb-2 Save up to 50%
a(href="#").btn.btn-primary.mb-3 View offers
button(type="button", data-bs-dismiss="alert", aria-label="Close").btn-close.btn-close-white