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 accent 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 -->
<ngb-alert [dismissible]="false" type="primary">
A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</ngb-alert>
<!-- Accent alert -->
<ngb-alert [dismissible]="false" type="accent">
A simple accent alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</ngb-alert>
<!-- Secondary alert -->
<ngb-alert [dismissible]="false" type="secondary">
A simple secondary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</ngb-alert>
<!-- Success alert -->
<ngb-alert [dismissible]="false" type="success">
A simple success alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</ngb-alert>
<!-- Danger alert -->
<ngb-alert [dismissible]="false" type="danger">
A simple danger alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</ngb-alert>
<!-- Warning alert -->
<ngb-alert [dismissible]="false" type="warning">
A simple warning alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</ngb-alert>
<!-- Info alert -->
<ngb-alert [dismissible]="false" type="info">
A simple info alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</ngb-alert>
<!-- Light alert -->
<ngb-alert [dismissible]="false" type="light">
A simple light alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</ngb-alert>
<!-- Dark alert -->
<ngb-alert [dismissible]="false" type="dark">
A simple dark alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.
</ngb-alert>
Alert with icon
A simple primary alert with an example link. Give it a click if you like.
A simple accent 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 -->
<ngb-alert [dismissible]="false" type="primary" class="alert alert-primary d-flex">
<i class="fi-bell me-2 me-sm-3 lead"></i>
<div>A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</ngb-alert>
<!-- Accent alert -->
<ngb-alert [dismissible]="false" type="accent" class="alert alert-accent d-flex">
<i class="fi-bell me-2 me-sm-3 lead"></i>
<div>A accent primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</ngb-alert>
<!-- Secondary alert -->
<ngb-alert [dismissible]="false" type="secondary" class="alert alert-secondary d-flex">
<i class="fi-bell me-2 me-sm-3 lead"></i>
<div>A secondary primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</ngb-alert>
<!-- Success alert -->
<ngb-alert [dismissible]="false" type="success" class="alert alert-success d-flex">
<i class="fi-bell me-2 me-sm-3 lead"></i>
<div>A success primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</ngb-alert>
<!-- Danger alert -->
<ngb-alert [dismissible]="false" type="danger" class="alert alert-danger d-flex">
<i class="fi-bell me-2 me-sm-3 lead"></i>
<div>A danger primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</ngb-alert>
<!-- Warning alert -->
<ngb-alert [dismissible]="false" type="warning" class="alert alert-warning d-flex">
<i class="fi-bell me-2 me-sm-3 lead"></i>
<div>A warning primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</ngb-alert>
<!-- Info alert -->
<ngb-alert [dismissible]="false" type="simple" class="alert alert-simple d-flex">
<i class="fi-bell me-2 me-sm-3 lead"></i>
<div>A simple primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</ngb-alert>
<!-- Light alert -->
<ngb-alert [dismissible]="false" type="light" class="alert alert-light d-flex">
<i class="fi-bell me-2 me-sm-3 lead"></i>
<div>A light primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</ngb-alert>
<!-- Dark alert -->
<ngb-alert [dismissible]="false" type="dark" class="alert alert-dark d-flex">
<i class="fi-bell me-2 me-sm-3 lead"></i>
<div>A dark primary alert with <a href="#" class="alert-link">an example link</a>. Give it a click if you like.</div>
</ngb-alert>
Dismissible alerts
Primary alert: Dismiss me by clicking the close button on the right.
Accent 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 -->
<ngb-alert [dismissible]="false" type="primary" class="alert alert-primary alert-dismissible fade show">
<span class="fw-bold">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>
</ngb-alert>
<!-- Secondary alert -->
<ngb-alert [dismissible]="false" type="secondary" class="alert alert-secondary alert-dismissible fade show">
<span class="fw-bold">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>
</ngb-alert>
<!-- Success alert -->
<ngb-alert [dismissible]="false" type="success" class="alert alert-success alert-dismissible fade show">
<span class="fw-bold">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>
</ngb-alert>
<!-- Danger alert -->
<ngb-alert [dismissible]="false" type="dismissible" class="alert alert-danger alert-dismissible fade show">
<span class="fw-bold">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>
</ngb-alert>
<!-- Warning alert -->
<ngb-alert [dismissible]="false" type="warning" class="alert alert-warning alert-dismissible fade show">
<span class="fw-bold">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>
</ngb-alert>
<!-- Info alert -->
<ngb-alert [dismissible]="false" type="dismissible" class="alert alert-dismissible alert-dismissible fade show">
<span class="fw-bold">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>
</ngb-alert>
<!-- Light alert -->
<ngb-alert [dismissible]="false" type="light" class="alert alert-light alert-dismissible fade show">
<span class="fw-bold">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>
</ngb-alert>
<!-- Dark alert -->
<ngb-alert [dismissible]="false" type="dark" class="alert alert-dark alert-dismissible fade show">
<span class="fw-bold">dark 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>
</ngb-alert>
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.
<!-- Accent alert -->
<div class="alert alert-accent" 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="pt-3 mb-2">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div>