Used for providing direct feedback on user actions. These alerts may be dismissible via click and/or should also disappear after a set amount of time.
|Info||Used to provide the user with more information or additional context|
|Warning||Used to inform the user when they are about to do something that is destructive or when the result of an action is unexpected, but isn't an error|
|Danger||Used to inform the user that something went wrong. The message should explain the problem and try to provide a next step or an alternative if the user needs to take some action in response|
|Success||Used to tell the user when an interaction or task has been completed successfully|
- Use the proper ARIA role:
- "alert" if the user's immediate attention is required
- "alertdialog” if the alert provides actions for the user to perform
Was this helpful?