Backdrop options for a responsive popup with Bootstrap 5. Prevent close on click outside with static backdrop, remove backdrop, enable interactivity & more.
npm install bootstrap-modal-backdropBackdrop options for a responsive popup with Bootstrap 5. Prevent close on click outside with static backdrop, remove backdrop, enable interactivity & more.
Check out Bootstrap Modal Backdrop Documentation for detailed instructions & even more examples.
html
aria-hidden="true" data-mdb-backdrop="true" data-mdb-keyboard="true">
Static Backdrop
If you would like to prevent the modal from closing on a click outside of the modal boundries, you can set the data-mdb-backdrop attribute to static.
`html
aria-hidden="true" data-mdb-backdrop="static" data-mdb-keyboard="true">
No Backdrop
If you would like to get rid of the backdrop, you can set the data-mdb-backdrop attribute to false.
`html
aria-hidden="true" data-mdb-backdrop="false" data-mdb-keyboard="true">