Metronic customizes the Bootstrap Alerts
through creative use of Bootstrap utilities and with handpicked icons.
Basic
Use .alert with .alert-{color} classes to set the alert's style
defined with $theme-colors mapped in src/assets/sass/core/components/_variables.scss:
This is an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an 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">
<!--begin::Icon-->
<i class="ki-duotone ki-shield-tick fs-2hx text-success me-4"><span class="path1"></span><span class="path2"></span></i>
<!--end::Icon-->
<!--begin::Wrapper-->
<div class="d-flex flex-column">
<!--begin::Title-->
<h4 class="mb-1 text-dark">This is an alert</h4>
<!--end::Title-->
<!--begin::Content-->
<span>The alert component can be used to highlight certain parts of your page for higher content visibility.</span>
<!--end::Content-->
</div>
<!--end::Wrapper-->
</div>
<!--end::Alert-->
Solid Colors
Use .alert with .bg-{color} classes to set the alert's style with a solid color.
Please refer to our Theme colors for more info.
Add the class .alert-dismissible to the parent .alert wrapper 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 an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert
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-primary d-flex flex-column flex-sm-row p-5 mb-10">
<!--begin::Icon-->
<i class="ki-duotone ki-search-list fs-2hx text-light me-4 mb-5 mb-sm-0"><span class="path1"></span><span class="path2"></span><span class="path3"></span></i>
<!--end::Icon-->
<!--begin::Wrapper-->
<div class="d-flex flex-column text-light pe-0 pe-sm-10">
<!--begin::Title-->
<h4 class="mb-2 light">This is an alert</h4>
<!--end::Title-->
<!--begin::Content-->
<span>The alert component can be used to highlight certain parts of your page for higher content visibility.</span>
<!--end::Content-->
</div>
<!--end::Wrapper-->
<!--begin::Close-->
<button type="button" class="position-absolute position-sm-relative m-2 m-sm-0 top-0 end-0 btn btn-icon ms-sm-auto" data-bs-dismiss="alert">
<i class="ki-duotone ki-cross fs-1 text-light"><span class="path1"></span><span class="path2"></span></i>
</button>
<!--end::Close-->
</div>
<!--end::Alert-->
Light Colors
Use .alert with .bg-light-{color} classes to set the alert's style with a light color. Please refer to our Theme colors for more info.
Add the class .alert-dismissible to the parent .alert wrapper 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 an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert
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-light-primary d-flex flex-column flex-sm-row p-5 mb-10">
<!--begin::Icon-->
<i class="ki-duotone ki-notification-bing fs-2hx text-primary me-4 mb-5 mb-sm-0"><span class="path1"></span><span class="path2"></span><span class="path3"></span></i>
<!--end::Icon-->
<!--begin::Wrapper-->
<div class="d-flex flex-column pe-0 pe-sm-10">
<!--begin::Title-->
<h4 class="fw-semibold">This is an alert</h4>
<!--end::Title-->
<!--begin::Content-->
<span>The alert component can be used to highlight certain parts of your page for higher content visibility.</span>
<!--end::Content-->
</div>
<!--end::Wrapper-->
<!--begin::Close-->
<button type="button" class="position-absolute position-sm-relative m-2 m-sm-0 top-0 end-0 btn btn-icon ms-sm-auto" data-bs-dismiss="alert">
<i class="ki-duotone ki-cross fs-1 text-primary"><span class="path1"></span><span class="path2"></span></i>
</button>
<!--end::Close-->
</div>
<!--end::Alert-->
Border Options
Use .alert with .bg-light-{color} and .border classes to set the alert's style with borders.
Please refer to our Theme colors and
Borders for more info.
Add the class .alert-dismissible to the parent .alert wrapper 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 an alert with a basic border
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert with a dashed border
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert with a thick border
The alert component can be used to highlight certain parts of your page for higher content visibility.
This is an alert with a thick dashed border
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-light-primary border border-primary d-flex flex-column flex-sm-row p-5 mb-10">
<!--begin::Icon-->
<i class="ki-duotone ki-search-list fs-2hx text-success me-4 mb-5 mb-sm-0"><span class="path1"></span><span class="path2"></span><span class="path3"></span></i>
<!--end::Icon-->
<!--begin::Wrapper-->
<div class="d-flex flex-column pe-0 pe-sm-10">
<!--begin::Title-->
<h5 class="mb-1">This is an alert</h5>
<!--end::Title-->
<!--begin::Content-->
<span>The alert component can be used to highlight certain parts of your page for higher content visibility.</span>
<!--end::Content-->
</div>
<!--end::Wrapper-->
<!--begin::Close-->
<button type="button" class="position-absolute position-sm-relative m-2 m-sm-0 top-0 end-0 btn btn-icon ms-sm-auto" data-bs-dismiss="alert">
<i class="ki-duotone ki-cross fs-1 text-success"><span class="path1"></span><span class="path2"></span></i>
</button>
<!--end::Close-->
</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.