Alert
import { AXAlertModule } from '@acorex/components/alert';
Alert displays important messages and comes in six types: primary, secondary, success, warning, danger, and info. It can be closed manually, include a footer button, or be positioned inline. You can also set an automatic closing time.
Overview
Primary
Usage
A simple example of using ax-alert
placeholder
Inline
In linear mode, you can only use ax-title
,ax-icon
, ax-button
and ax-close-button
tags.
placeholder
Props
color | string | primary | Sets the color theme of the alert. |
timeOut | boolean | false | Specifies whether the alert should automatically disappear after a timeout. |
title | boolean | true | Determines whether the alert has a title. |
content | boolean | true | Specifies whether the alert should include content text. |
inlineButton | boolean | false | Determines whether an inline button is displayed within the alert. |
footerButton | boolean | true | Specifies whether a footer button is included in the alert. |
closeButton | boolean | false | Determines whether a close button is displayed on the alert. |
progressbar | boolean | false | Specifies whether a progress bar is displayed in the alert. |
text | string | - | Sets the text content of the alert. |
look | AXStyleLookType | solid | Determines the appearance of the alert. |
Methods
colorChange | AXStyleColorType | Specifies the function to be called when the color of the alert changes. |
onClosed | AXEvent | Specifies the function to be called when the alert is closed. |
onOptionChanged | AXOptionChangedEvent | Specifies the function to be called when an option in the alert is changed. |