Modal
Tailwind Modal allows to add interactive elements, like forms or logins, to a dialog that appears on top of your page content, focusing user attention.
Center
Vertically and horizontally center the modal.
Scrollable
Apply the mv-scrollable-y class to the modal body element to enable vertical scrolling within the modal body.
Long Content
Apply the mv-scrollable-y class to the modal body element to enable vertical scrolling within the modal body.
Static Backdrop
Use the attribute data-mv-modal-backdrop-static="true" to display a modal with a static backdropn that prevents modal closure on click on it.
No Backdrop
Use the attribute data-mv-modal-backdrop="false" to display a modal without the backdrop layer.
Persistent
Use the data-mv-modal-persistent="true" attribute to prevent modal closure when clicking outside of it.
Toggle Modals
Switch between multiple modals for different actions.
Input Auto-focus
To automatically set focus on an input element within a modal when it appears, apply the data-mv-modal-autofocus="true" attribute to that input.
Page Scroll
Apply the data-mv-modal-disable-scroll="false" attribute to allow the page scrollbar to remain enabled.
Full Width
The example below demonstrates the implementation of a full-width modal.
Overlay
The example below illustrates an overlay modal that spans the entire screen size.
Sizes
Explore various modal width sizes set using Tailwind width classes.
Basic Usage
Click the below toggle button to reveal the default modal example.