Alerts

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.

Open Bootstrap Docs

Alerts

<div class="alert alert-success alert-dismissible fade show" role="alert">
    <span class="alert-inner--icon"><i class="fas fa-check"></i></span>
    <span class="alert-inner--text"><strong>Success!</strong> This is a success alert—check it out!</span>
    <button type="button" class="undo" aria-label="Undo">Undo</button>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>
<div class="alert alert-info alert-dismissible fade show" role="alert">
    <span class="alert-inner--icon"><i class="fas fa-info"></i></span>
    <span class="alert-inner--text"><strong>Info!</strong> This is an info alert—check it out!</span>
    <button type="button" class="undo" aria-label="Undo">Undo</button>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
    <span class="alert-inner--icon"><i class="fas fa-exclamation"></i></span>
    <span class="alert-inner--text"><strong>Warning!</strong> This is a warning alert—check it out!</span>
    <button type="button" class="undo" aria-label="Undo">Undo</button>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>
<div class="alert alert-danger alert-dismissible fade show" role="alert">
    <span class="alert-inner--icon"><i class="fas fa-times"></i></span>
    <span class="alert-inner--text"><strong>Danger</strong> This is an error alert—check it out!</span>
    <button type="button" class="undo" aria-label="Undo">Undo</button>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>

Inverse alerts

<div class="alert alert-inverse alert-dismissible fade show" role="alert">
    <span class="alert-inner--icon text-success"><i class="fas fa-check"></i></span>
    <span class="alert-inner--text"><strong>Success!</strong> This is a success alert—check it out!</span>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>
<div class="alert alert-inverse alert-dismissible fade show" role="alert">
    <span class="alert-inner--icon text-info"><i class="fas fa-info"></i></span>
    <span class="alert-inner--text"><strong>Info!</strong> This is an info alert—check it out!</span>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>
<div class="alert alert-inverse alert-dismissible fade show" role="alert">
    <span class="alert-inner--icon text-warning"><i class="fas fa-exclamation"></i></span>
    <span class="alert-inner--text"><strong>Warning!</strong> This is a warning alert—check it out!</span>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>
<div class="alert alert-inverse alert-dismissible fade show" role="alert">
    <span class="alert-inner--icon text-danger"><i class="fas fa-times"></i></span>
    <span class="alert-inner--text"><strong>Danger</strong> This is an error alert—check it out!</span>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>

Additional content

<div class="alert alert-success" role="alert">
    <h4 class="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-0">Whenever you need to, be sure to use margin utilities to keep things nice and tidy.</p>
</div>

Drop shadow

<div class="alert alert-primary alert-shadow alert-dismissible fade show" role="alert">
    <strong>Holy guacamole!</strong> You should check in on some of those fields below.
    <button type="button" class="undo" aria-label="Undo">Undo</button>
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
        <span aria-hidden="true">&times;</span>
    </button>
</div>