Show an attention-grabbing message.
Alerts can be used to communicate important messages to the user, drawing more attention than a standard paragraph or info layout.
alert {
markdown = "Exchange rates are unstable right now, so we can't guarantee this rate."
context = Context.WARNING
}When to use
- When the user needs to perform an action, or be aware of some key information that may impact them.
When not to use
- When the content is supplementary, consider using an Upsell Layout instead.
| Property | Type | Required | Description |
|---|---|---|---|
analyticsId | String | No | An optional identifier to be used in analytics tracking. |
| No | A titled call to action which can be performed by the user.
| |
context | Context | No | The semantics of the alert. Defaults to neutral. |
control | String | No | Specify a particular control to use to represent the layout. If the control is unknown, it will be ignored. |
margin | Size | No | The vertical margin to apply after this component. Defaults to md. |
markdown | String | Yes | The content of the alert as string. The following subset of markdown features are supported: Emphasis, strong emphasis. |
| Array<String> | No | An optional list of identifiers used to configure renderers.
|
type | String | Yes | It must be alert. |
The call to action configuration to be used by Alert Layout.
| Property | Type | Required | Description |
|---|---|---|---|
accessibilityDescription | String | No | A description of the call to action to be used by screen readers. |
behavior | Behavior | Yes | The Behavior that should be performed when user interacts with call to action. |
| No | The semantics of the call-to-action button. Defaults to neutral.
| |
title | String | Yes | A user-facing title. |