Alert
An inline banner for a warning, error, info, or success message.
alert is an inline message with a colored background and an icon that matches its level. Slack
only accepts it inside modals, so use it for validation feedback or a heads-up in a form.
My App
Fields
typestring
Always `alert`.
stringtext?PlainTextElement | MrkdwnElement
The message. Supports the same `plain_text` and `mrkdwn` text objects as a section.
PlainTextElement | MrkdwnElementlevel?"default" | "info" | "warning" | "error" | "success"
The banner color and icon. An unrecognized or omitted value falls back to `default`.
"default" | "info" | "warning" | "error" | "success""default"Examples
Every level
The preview above shows all five: default, info, warning, error, and success. The error
level is announced to assistive technology as an alert; the others as a status update.
Long text
My App
The icon stays aligned with the first line as the text wraps, and the banner grows to fit the content.