Alert
Alert component for feedback.
When To Use
- When you need to show alert messages to users.
- When you need a persistent static container which is closable by user actions.
Examples
Alert API#
Property | Description | Type | Default Value |
---|---|---|---|
AfterClose | ParameterCalled when close animation is finished | EventCallback<MouseEventArgs> | -- |
Banner | ParameterWhether to show as banner | Boolean | false |
Closable | ParameterWhether Alert can be closed | Boolean | false |
CloseText | ParameterClose text to show | String | -- |
Description | ParameterAdditional content of Alert | String | -- |
Icon | ParameterCustom icon, effective when showIcon is true | RenderFragment | -- |
Message | ParameterContent of Alert | String | -- |
MessageTemplate | ParameterTemplate for content | RenderFragment | -- |
ShowIcon | ParameterWhether to show icon. | Boolean? | -- |
Type | ParameterType of Alert styles, options: success, info, warning, error | String | -- |
OnClose | ParameterCallback when Alert is closed. | EventCallback<MouseEventArgs> | -- |
ChildContent | ParameterAdditional Content | RenderFragment | -- |
Id | ParameterID for the component's HTML | String | Uniquely Generated ID |
Class | ParameterSpecifies one or more class names for an DOM element. | String | -- |
Style | ParameterSpecifies an inline style for a DOM element. | String | -- |
RefBack | ParameterA ForwardRef instance. You can get a reference to the internal DOM by using AntDesign.ForwardRef.Current . |
ForwardRef | -- |