Skip to Content

Alert

An inline notification surface that displays a title, an optional message, and optional action buttons. The left border is tinted by Severity to communicate urgency. Unlike Dialog the alert does not use an overlay; it is placed directly in the element tree.

Constructor

Alert

Creates an Alert element.

ParameterDescription
titleThe heading text. Must not be null.
messageThe optional body text.
severityThe visual severity level. Defaults to Info.
actionsOptional action buttons as (label, callback) pairs.
keyAn optional key for reconciliation identity.

Properties

Actions

Optional action buttons rendered at the bottom of the alert. Each entry is a (label, callback) pair.

Message

The optional body text displayed below the title.

Severity

Controls the accent color used for the left border and title.

Title

The short heading text displayed at the top of the alert.

Methods

Build

Last updated on