Skip to content

Button Options

ShowConfirmButton

If set to false, a "Confirm"-button will not be shown. Default true

.ShowConfirmButton(false)

ShowDenyButton

If set to true, a "Deny"-button will be shown. It can be useful when you want a popup with 3 buttons. Default false

.ShowDenyButton(true)

ShowCancelButton

If set to true, a "Cancel"-button will be shown, which the user can click on to dismiss the modal. Default false

.ShowCancelButton(true)

ConfirmButtonText

Use this to change the text on the "Confirm"-button. Default 'OK'

.ConfirmButtonText("Yes")

DenyButtonText

Use this to change the text on the "Deny"-button. Default 'No'

.DenyButtonText("Nope")

CancelButtonText

Use this to change the text on the "Cancel"-button. Default 'Cancel'

.CancelButtonText("Exit")

ConfirmButtonColor

Use this to change the background color of the "Confirm"-button. The default color is #3085d6

.ConfirmButtonColor("#3085d6")

DenyButtonColor

Use this to change the background color of the "Deny"-button. The default color is #dd6b55

.DenyButtonColor("#dd6b55")

CancelButtonColor

Use this to change the background color of the "Cancel"-button. The default color is #aaa

.CancelButtonColor("#aaa")

ConfirmButtonAriaLabel

Use this to change the aria-label for the "Confirm"-button.

.ConfirmButtonAriaLabel("confirm")

DenyButtonAriaLabel

Use this to change the aria-label for the "Deny"-button.

.DenyButtonAriaLabel("deny")

CancelButtonAriaLabel

Use this to change the aria-label for the "Cancel"-button.

.CancelButtonAriaLabel("cancel")

ButtonsStyling

Apply default styling to buttons. If you want to use your own classes (e.g. Bootstrap classes) set this parameter to false. Default true

.ButtonsStyling(false)

ReverseButtons

Set to true if you want to invert default buttons positions ("Confirm"-button on the right side). Default false

.ReverseButtons(true)

FocusConfirm

Set to false if you want to focus the first element in tab order instead of "Confirm"-button by default. Default true

.FocusConfirm(false)

ReturnFocus

Set to false if you don't want to return the focus to the element that invoked the modal after the modal is closed. Default true

.ReturnFocus(false)

FocusDeny

Set to true if you want to focus the "Deny"-button by default. Default false

.FocusDeny(true)

FocusCancel

Set to true if you want to focus the "Cancel"-button by default. Default false

.FocusCancel(true)

ShowCloseButton

Set to true to show close button in top right corner of the popup. Default false

.ShowCloseButton(true)

CloseButtonHtml

Use this to change the content of the close button. Default '×'

.CloseButtonHtml("<i class="fas fa-times-circle"></i>")

CloseButtonAriaLabel

Use this to change the aria-label for the close button. Default 'Close this dialog'

.CloseButtonAriaLabel("Close the dialog")