A toast is a modeless, unobtrusive message used to display a brief, auto-expiring notification to the user.
This transient message appears and fades into the background automatically after a short while, e.g. informing the user that a command has been executed properly. (The name toast is because it is like a friend lifting and lowering his glass towards you non-intrusively thus assuring you that all is well.) Read more about toasts in the UX Guidelines.
Wrap any text and an dismiss button in .toast
for basic toast messages.
There are 4 options for toasts and to apply them simply add one of the following classes: .toast-success
, .toast-info
, .toast-warning
or .toast-danger
.
<!-- Toasts - .toast -->
<div class="toast toast-success" role="alert">
<strong>Well done!</strong> You successfully read this important alert message.
</div>
<div class="toast toast-info" role="alert">
<strong>Heads up!</strong> This alert needs your attention, but it's not super important.
</div>
<div class="toast toast-warning" role="alert">
<strong>Warning!</strong> Better check yourself, you're not looking too good.
</div>
<div class="toast toast-danger" role="alert">
<strong>Oh snap!</strong> Change a few things up and try submitting again.
</div>