An inline notification banner for displaying feedback messages. — <cs-alert>
<cs-alert type="info">Informational message.</cs-alert>
<cs-alert type="error" header="Error">Something went wrong.</cs-alert>
<cs-alert type="success" dismissible dismiss-aria-label="Close">
Operation completed.
</cs-alert>
analytics-metadataAlertProps.AnalyticsMetadataSpecifies additional analytics-related metadata.
errorContext - Identifies the error category and sub-category.dismiss-aria-labelstring
default: ''Adds an aria-label to the dismiss button.
dismissibleboolean
default: falseAdds a close button to the alert when set to true.
An onDismiss event is fired when a user clicks the button.
i18n-stringsAlertProps.I18nStringsAn object containing all the necessary localized strings required by the component.
status-icon-aria-labelstring
default: ''Provides a text alternative for the icon.
typeAlertProps.Type
default: 'info'Specifies the type of message you want to display.
visibleboolean
default: trueDetermines whether the alert is displayed.
actionSpecifies an action for the alert message. Although it is technically possible to insert any content, our UX guidelines only allow you to add a button.
buttonTextDisplays an action button next to the message area when set.
An onButtonClick event is fired when the user clicks it.
defaultPrimary text displayed in the element.
headerHeading text.
buttonClickCustomEvent<void>Fired when the user clicks the action button.
Deprecated Replaced by action.
dismissCustomEvent<void>Fired when the user clicks the close icon that is displayed
when the dismissible property is set to true.