Alert

Displays important alert messages.

Basic Usage

Alert components are non-overlay elements in the page that does not disappear automatically.

Theme

Alert provide two different themes, light and dark.

Customizable Close Button

Customize the close button as texts or other symbols.

With Icon

Displaying an icon improves readability.

Centered Text

Use the center attribute to center the text.

With Description

Description includes a message with more detailed information.

With Icon and Description

Alert API

Attributes

NameDescriptionTypeDefaultRequired
titlealert title.stringNo
typealert type.enuminfoNo
descriptiondescriptive text.stringNo
closablewhether alert can be dismissed.booleantrueNo
centerwhether content is placed in the center.booleanfalseNo
close-textcustomized close button text.stringNo
show-iconwhether a type icon is displayed.booleanfalseNo
effecttheme style.enum'light'No

Events

NameDescriptionType
closetrigger when alert is closed.Function

Slots

NameDescription
defaultcontent of the alert description.
titlecontent of the alert title.