| Parameters |
Default Value | Description
Description |
| Title |
Null (required) |
The title of the modal. It can either is added to the object under the key "title" or passed as the first parameter of the function. |
| Text |
Null |
A description for the modal. It can either is added to the object under the key "text" or passed as the second parameter of the function. |
| Type |
Null |
The type of the modal. Sweetalert comes with 4 built-in types which would show a corresponding icon animation: "Warning", "error", "Success" and " Info ". You can also set it as "input" to get a prompt modal. It can either is put in the object under the key "type" or passed as the third parameter of the function. |
| Allowescapekey |
True |
If set to True, the user can dismiss the modal by pressing the Escape key. |
| Customclass |
Null |
A custom CSS class for the modal. It can added to the object under the key "Customclass". |
| Allowoutsideclick |
False |
If set to True, the user can dismiss the modal by clicking outside it. |
| Showcancelbutton |
False |
If set to True, a "Cancel"-button is shown, which the user can click on to dismiss the modal. |
| Showconfirmbutton |
True |
If set to False, the "ok/confirm"-button would be hidden. Make sure your set a timer or set Allowoutsideclick to True if using this, in order not to annoy the user. |
| Confirmbuttontext |
"OK" |
Use the-the text on the "Confirm"-button. If Showcancelbutton is set as true, the Confirm button would automatically show "confirm" instead of "OK". |
| Confirmbuttoncolor |
"#AEDEF4" |
Use the background color of the ' Confirm '-button (must be a HEX value). |
| Cancelbuttontext |
"Cancel" |
Use the-the text on the "Cancel"-button. |
| Closeonconfirm |
True |
Set to False if you want the modal to stay open even if the user presses the "Confirm"-button. This was especially useful if the function attached to the ' Confirm '-button is another sweetalert. |
| Closeoncancel |
True |
Same as closeonconfirm, but for the Cancel button. |
| ImageUrl |
Null |
ADD A customized icon for the modal. Should contain a string with the path to the image. |
| ImageSize |
"80x80" |
If IMAGEURL is set, you can specify imageSize to describes how big are want the icon to being in PX. Pass in a string with the values separated by an "x". The first value is the width of the second is the height. |
| Timer |
Null |
Auto Close timer of the modal. Set in MS (milliseconds). |
| Html |
False |
If set to True, would not escape title and text parameters. (Set to False if your ' re worried about XSS attacks.) |
| Animation |
True |
If set to False, the modal ' s animation would be disabled. Possible (String) values:pop (default when animation set to true), Slide-from-top, Slide-from-bottom |
| InputType |
"Text" |
The type of the input field when using the type: ' Input ' (this can is useful if you want users to type in their passwor D for example). |
| Inputplaceholder |
Null |
When using the Input-type, you can specify a placeholder to the user. |
| Inputvalue |
Null |
Specify a default text value, want your input to show when using type: "Input" |
| Showloaderonconfirm |
False |
Set to True to disable the buttons and show this something is loading. |