Calcite Alerts are contextual pop-up style messages that can contain actions without obstructing the application.
Alerts are used to communicate to the user in an unobtrusive manner. They are primarily displayed as a response to the user taking action on an element; however they can also be used to communicate non-critical system messages, or to provide updates on actions the user has previously taken.
Try to avoid stacking Alerts. If you find a need to present the user with multiple Alerts at once, or when you want to interrupt the user, please consider using a Modal.
Refer to the UI state colors if you are unsure of what color Alert to use.
- Something important was deleted
- Confirming an important action
- An update is available
- Something was saved
- Something was downloaded
- A problem or error occurred
|Move focus to next item. If the current focus is the last item, the focus will leave the component|
|Move focus to previous item. If the current focus is the first item, the focus will leave the component|
Alerts are meant to quickly convey a message to the user. Consistent Alert structure, verbiage, and copy ensures that the user will have an expected experience across the platform. Keep copy short and to the point.
Is the alert currently active or not
Close the alert automatically (recommended for passive, non-blocking alerts)
Duration of autoDismiss (only used with `autoDismiss`)
Color for the alert (will apply to top border and icon)
when used as a boolean set to true, show a default recommended icon. You can also pass a calcite-ui-icon name to this prop to display a requested icon
string to override English close text
Accessible name for the component
specify the placement of the alert
specify the scale of the alert, defaults to m
Fired when an alert is closed
Fired when an alert is opened
Sets focus on the component.
Optional action to take from the alert (undo, try again, link to page, etc.)
Main text of the alert
Title of the alert (optional)
the width of the alert