Interrupts the user to communicate critical or important information.
Alerts provide contextual feedback and information to users. They come in several types and have different uses:
When using alert boxes, it's crucial to consider the context, user needs, and the potential impact on the overall user experience. Properly designed alert boxes can provide value by communicating important information, but their misuse can have the opposite effect.
Do:
Avoid:
The info alert box title! Use this style of alert to communicate non-urgent information.
The warning alert box title! Use this style of alert to communicate that something important has happened or is about to happen. This also warns the user that they might have to take some action. For example, that they are required to fill in a particular form.
The success alert box title! Use this style of alert to communicate that a positive action has taken place. For example, a task that a user performed has been successful.
The danger alert box title! Use this style of alert to warn the user that something immediate, negative (and possibly serious) might happen. For example, they are about to delete an important form.
The info alert box title! Use this style of alert to communicate non-urgent information.
The info alert box title! Use this style of alert to communicate non-urgent information.
<turas-alert-box alert-box-title="The info alert box title!" alert-box-message="Use this style of alert to communicate non-urgent information.">
</turas-alert-box>
<div class="alert-info alert " role="alert">
<div class="alert-icon">
<span class="fa-info-circle fa" aria-hidden="true"></span>
</div>
<div class="alert-content">
<p class="mb-0"><strong>The info alert box title!</strong> Use this style of alert to communicate non-urgent information.</p>
</div>
</div>
The warning alert box title! Use this style of alert to communicate that something important has happened or is about to happen. This also warns the user that they might have to take some action. For example, that they are required to fill in a particular form.
<turas-alert-box alert-box-style="Warning" alert-box-title="The warning alert box title!" alert-box-message="Use this style of alert to communicate that something important has happened or is about to happen. This also warns the user that they might have to take some action. For example, that they are required to fill in a particular form. ">
</turas-alert-box>
<div class="alert alert-warning " role="alert">
<div class="alert-icon">
<span class="fa-exclamation-triangle fa" aria-hidden="true"></span>
</div>
<div class="alert-content">
<p class="mb-0"><strong>The warning alert box title!</strong> Use this style of alert to communicate that something important has happened or is about to happen. This also warns the user that they might have to take some action. For example, that they are required to fill in a particular form. </p>
</div>
</div>
The success alert box title! Use this style of alert to communicate that a positive action has taken place. For example, a task that a user performed has been successful.
<turas-alert-box alert-box-style="Success" alert-box-title="The success alert box title!" alert-box-message="Use this style of alert to communicate that a positive action has taken place. For example, a task that a user performed has been successful.">
</turas-alert-box>
<div class="alert alert-success " role="alert">
<div class="alert-icon">
<span class="fa-check fa" aria-hidden="true"></span>
</div>
<div class="alert-content">
<p class="mb-0"><strong>The success alert box title!</strong> Use this style of alert to communicate that a positive action has taken place. For example, a task that a user performed has been successful.</p>
</div>
</div>
The danger alert box title! Use this style of alert to warn the user that something immediate, negative (and possibly serious) might happen. For example, they are about to delete an important form.
<turas-alert-box alert-box-style="Danger" alert-box-title="The danger alert box title!" alert-box-message="Use this style of alert to warn the user that something immediate, negative (and possibly serious) might happen. For example, they are about to delete an important form. ">
</turas-alert-box>
<div class="alert alert-danger " role="alert">
<div class="alert-icon">
<span class="fa-bolt fa" aria-hidden="true"></span>
</div>
<div class="alert-content">
<p class="mb-0"><strong>The danger alert box title!</strong> Use this style of alert to warn the user that something immediate, negative (and possibly serious) might happen. For example, they are about to delete an important form. </p>
</div>
</div>
The info alert box title! Use this style of alert to communicate non-urgent information.
<turas-alert-box alert-box-title="The info alert box title!" is-dismissible alert-box-message="Use this style of alert to communicate non-urgent information.">
</turas-alert-box>
<div class="alert-info alert alert-dismissible fade show " role="alert">
<div class="alert-icon">
<span class="fa-info-circle fa" aria-hidden="true"></span>
</div>
<div class="alert-content">
<p class="mb-0"><strong>The info alert box title!</strong> Use this style of alert to communicate non-urgent information.</p>
</div>
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button></div>
This component is fully compliant with the WCAG 2.2 standard.