Skip to main content

Alert

Tell people what happened, with an intent, an action & a close button.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
titlestring-The first line, in bold.
The first line, in bold.
descriptionReactNode-More detail under the title.
More detail under the title.
iconReactNode-A glyph in the tile, in place of the intent's own icon.
A glyph in the tile, in place of the intent's own icon.
actionReactNode-A button at the end, such as Upgrade.
A button at the end, such as Upgrade.
onDismiss() => void-Shows a close button, and is called when it is pressed.
Shows a close button, and is called when it is pressed.
dismissLabelstringDismissWhat the close button says to a screen reader.
What the close button says to a screen reader.
intentinfo | success | warning | dangerinfoWhat the alert means; it colors the icon tile only.
What the alert means; it colors the icon tile only.
shapenone | rounded | pillrounded
classNamestring-
focusboolean | stringtrue