Alert
The Alert component displays a brief, important message to attract the user's attention without interrupting their work.
Properties
Name | Type | Default | Description |
---|---|---|---|
text | string | The message text to display in the alert. | |
icon | bool | false | If true, overrides the default icon displayed on the alert. |
actionButton | bool | false | If true, will display an action button after the alert message. |
closeText | string | Override for the close label on the popup icon button. |
Style Attributes
Name | Type | Default | Description |
---|---|---|---|
variant | filled outlined standard string | standard | Defines the display type to use. |
severity | error info success warning string | success | The level of importance of the alert. A default color and icon are set based on the severity. |
Subcomponents
The Alert component uses a subcomponent to create an alert title. Two optional subcomponents provide an icon and an action button for the alert component.
Alert Title
The Alert Title component provides a title for the alert.
Properties
Name | Type | Default | Description |
---|---|---|---|
title | string | The title of the alert. |
Icon
Allows the user to add an icon to the alert component.
For further details, see the Icon component.
Properties
Name | Type | Default | Description |
---|---|---|---|
color | inherit primary secondary action disabled error string | inherit | Defines the color of the icon. |
size | inherit small medium large string | small | Defines the size of the icon. |
viewBox | 0 0 24 24 | Defines the size of the view box that displays the icon. | |
fill | hex #ffffff rgb 5,5,5 | The fill color of the icon. | |
stroke | hex #ffffff rgb 5,5,5 | The stroke color of the icon. |
Button
Allows the user to add an action button to the alert.
For further details, see the Button component.
Properties
Name | Type | Default | Description |
---|---|---|---|
text | string | The text label for the button face. |
For more detail on the Alert component, see the MUI developer docs.