Metronic customizes the Bootstrap Alerts through creative use of Bootstrap utilities and with handpicked icons.
Basic
Use .alertwith .alert-{color}classes to set the alert's style.
This is a primary alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is a success alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is a warning alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is a danger alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
<!--begin::Alert-->
<div class="alert alert-primary d-flex align-items-center p-5 col-8">
<span class="me-5"><i class="far fa-check-circle fs-2x text-primary"></i></span>
<div class="d-flex flex-column">
<h4 class="text-dark">This is a primary alert</h4>
<span class="text-dark">The alert component can be used to highlight certain parts of your page for higher content visibility.</span>
</div>
</div>
<!--end::Alert-->
Solid Colors
Use .alertwith .bg-{color}classes to set the alert's style with a solid color. Please refer to our Theme colorsfor more info.
Add the class .alert-dismissibleto the parent .alertwrapper and data-bs-dismiss="alert"to the close button to allow dismissing alerts. Please take note of the HTML markup sample below for all required responsive classes.
This is a secondary alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is a success alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is a warning alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is a danger lert
The alert component can be used to highlight certain parts of your page for higher content visibility.
<!--begin::Alert-->
<div class="alert alert-dismissible bg-secondary d-flex flex-column flex-sm-row col-8 p-5">
<span class="me-5"><i class="far fa-check-circle fs-2x text-white"></i></span>
<div class="d-flex flex-column text-light pe-0 pe-sm-10">
<h4 class="text-white">This is a secondary alert</h4>
<span class="text-white">The alert component can be used to highlight certain parts of your page for higher content visibility.</span>
</div>
<button type="button" class="btn btn-icon ms-sm-auto" data-bs-dismiss="alert">
<span><i class="fas fa-times fs-2x text-white"></i></span>
</button>
</div>
<!--end::Alert-->
Rich Content
Here's a sample of an alert with rich content elements inside it. Please take note of the HTML markup sample below for all required classes.
This is an alert
The alert component can be used to highlight certain parts of your page for higher content visibility. Please read our Terms and Conditions for more info.