Bootstrap Alerts
Provide contextual feedback messages for typical user actions with the handful of available and flexible Bootstrap alerts.
Examples
Primary! This is a primary alert—check it out!
Secondary! This is a secondary alert—check it out!
Info! This is a info alert—check it out!
Success! This is a success alert—check it out!
Danger! This is a danger alert—check it out!
Warning! This is a warning alert—check it out!
Light! This is a light alert—check it out!
Dark! This is a dark alert—check it out!
With icon
Warning! This is a warning alert—check it out that has an icon too!
<div class="alert alert-warning" role="alert">
<span class="alert-icon"><i class="ni ni-like-2"></i></span>
<span class="alert-text"><strong>Warning!</strong> This is a warning alert—check it out that has an icon too!</span>
</div>
Dismissing
Primary! This is a primary alert—check it out!
Secondary! This is a secondary alert—check it out!
Info! This is a info alert—check it out!
Success! This is a success alert—check it out!
Danger! This is a danger alert—check it out!
Warning! This is a warning alert—check it out!
Light! This is a light alert—check it out!
Dark! This is a dark alert—check it out!
<div class="alert alert-primary alert-dismissible fade show" role="alert">
<span class="alert-icon"><i class="ni ni-like-2"></i></span>
<span class="alert-text"><strong>Primary!</strong> This is a primary alert—check it out!</span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="alert alert-secondary alert-dismissible fade show" role="alert">
<span class="alert-icon"><i class="ni ni-like-2"></i></span>
<span class="alert-text"><strong>Secondary!</strong> This is a secondary alert—check it out!</span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="alert alert-info alert-dismissible fade show" role="alert">
<span class="alert-icon"><i class="ni ni-like-2"></i></span>
<span class="alert-text"><strong>Info!</strong> This is a info alert—check it out!</span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<span class="alert-icon"><i class="ni ni-like-2"></i></span>
<span class="alert-text"><strong>Success!</strong> This is a success alert—check it out!</span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
<span class="alert-icon"><i class="ni ni-like-2"></i></span>
<span class="alert-text"><strong>Danger!</strong> This is a danger alert—check it out!</span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<span class="alert-icon"><i class="ni ni-like-2"></i></span>
<span class="alert-text"><strong>Warning!</strong> This is a warning alert—check it out!</span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="alert alert-light alert-dismissible fade show" role="alert">
<span class="alert-icon"><i class="ni ni-like-2"></i></span>
<span class="alert-text"><strong>Light!</strong> This is a light alert—check it out!</span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="alert alert-dark alert-dismissible fade show" role="alert">
<span class="alert-icon"><i class="ni ni-like-2"></i></span>
<span class="alert-text"><strong>Dark!</strong> This is a dark alert—check it out!</span>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>