Bootstrap provides many features for the modal component. These features are generally provided as JSON
properties, while triggering the modal component. Alternatively, you can use these features by using custom data-*
attributes in the .modal
element. Bootstrap's additional features are:
data-backdrop
: This attribute acceptsstatic
ortrue
values. When set tostatic
, it disables the closing of the modal when clicked outside the modal body.data-keyboard
: This accepts Boolean values and is set totrue
by default. Whentrue
, features ofdata-keyboard
closes the modal when the Esc key is pressed.data-show
: This accepts Boolean values and is set tofalse
by default. Whentrue
,data-shows
the modal when it was initialized.