Skip to content

Confirm

A set of modal boxes simulating system message box, mainly for confirm operations.

Basic usage

Confirm is used to ask users' confirmation.

API

Options

NameDescriptionTypeDefault
titletitle of the MessageBoxstring''
messagecontent of the MessageBoxstring''
submitTextsubmit button textstringCancel
cancelTextcancel button textstringOK
submitMessageBox closing callback if you don't prefer PromiseFunction''
cancelMessageBox closing callback if you don't prefer PromiseFunction''
teleportset the root element for the message boxstring | HTMLElementbody
lockScrollwhether to lock body scroll when MessageBox promptsbooleantrue

Released under the MIT License.