Try It
This shortcode has been elminated and replaced with a newer one. This page is yet to be updated but will be shortly.Class Reference
Alert.Notification inherits from Component
Properties
AlertType
Type: Enum
Default: Info
Values: Warning, Error, Success, Info, Question
The type of the modal
AllowEnterKey
Type: Bool
Default: false
If set to false, the user can"t confirm the modal by pressing the Enter or Space keys, unless they manually focus the confirm button.
AllowEscapeKey
Type: Bool
Default: false
If set to false, the user can"t dismiss the modal by pressing the Esc key.
AllowOutsideClick
Type: Bool
Default: false
If set to false, the user can"t dismiss the modal by clicking outside it.
Animation
Type: Bool
Default: true
If set to false, modal CSS animation will be disabled.
Backdrop
Type: Bool
Default: true
Whether or not SweetAlert2 should show a full screen click-to-dismiss backdrop.
CancelButtonColor
Type: String
Default: #aaa
Use this to change the background color of the "Cancel"-button.
CancelButtonText
Type: String
Default: Cancel
Use this to change the text on the "Cancel"-button.
ConfirmButtonColor
Type: String
Default: #3085d6
Use this to change the background color of the "Confirm"-button.
ConfirmButtonText
Type: String
Default: Ok
Use this to change the text on the "Confirm"-button.
FocusCancel
Type: Bool
Default: false
Set to true if you want to focus the "Cancel"-button by default.
FocusConfirm
Type: Bool
Default: true
Set to false if you want to focus the first element in tab order instead of "Confirm"-button by default.
Footer
Type: String
Default: ''
The footer of the modal. Can be either plain text or html.
HTML
Type: String
Default: ''
A HTML description for the modal. If "Text" and "HTML" parameters are provided in the same time, "Text" will be used.
Position
Type: Enum
Default: Center
Values: TopStart, TopEnd, Center, CenterStart, CenterEnd, Bottom, BottomStart, BottomEnd
Modal window position
ShowCancelButton
Type: Bool
Default: false
If set to true, a "Cancel"-button will be shown, which the user can click on to dismiss the modal.
ShowCloseButton
Type: Bool
Default: false
Set to true to show close button in top right corner of the modal.
ShowConfirmButton
Type: Bool
Default: true
If set to false, a "Confirm"-button will not be shown. It can be useful when you"re using custom html description.
Text
Type: String
Default: ''
A description for the modal. It can either be added to the object under the key "text" or passed as the second parameter of the function.
Timer
Type: Int
Default: null
Auto close timer of the modal. Set in ms (milliseconds).
Title
Type: String
Default: ''
The title of the modal, as HTML. It can either be added to the object under the key "title" or passed as the first parameter of the function.
TitleText
Type: String
Default: ''
The title of the modal, as text. Useful to avoid HTML injection.
Toast
Type: Bool
Default: false
Whether or not an alert should be treated as a toast notification. This option is normally coupled with the Position parameter and a timer. Toasts are NEVER auto focused.