Live demo
Toggle a working modal demo by clicking the button below. It will slide down and fade in from the top of the page.
Static backdrop
When backdrop is set to static, the modal will not close when clicking outside it. Click the button below to try it.
Scrolling long content
When modals become too long for the user’s viewport or device, they scroll independent of the page itself. Try the demo below to see what we mean.
You can also create a scrollable modal that allows scroll the modal body by
adding .modal-dialog-scrollable
to .modal-dialog
.
Vertically centered
Add .modal-dialog-centered
to .modal-dialog
to vertically center the modal.
Toggle between modals
Toggle between multiple modals with some clever placement of the
data-bs-target
and data-bs-toggle
attributes.
For example, you could toggle a password reset modal from within an already
open sign in modal. Please note multiple modals cannot be open at the same
time—this method simply toggles between two separate modals.
Optional sizes
Extra large modal - .modal-dialog .modal-xl
Large modal - .modal-dialog .modal-lg
Small modal - .modal-dialog .modal-sm
Fullscreen modal - .modal-dialog .modal-fullscreen