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.

Modal Title

Scrollable

Apply the mv-scrollable-y class to the modal body element to enable vertical scrolling within the modal body.

Modal Title

Long Content

Apply the mv-scrollable-y class to the modal body element to enable vertical scrolling within the modal body.

Modal Title

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.

Modal Title

No Backdrop

Use the attribute data-mv-modal-backdrop="false" to display a modal without the backdrop layer.

Modal Title

Persistent

Use the data-mv-modal-persistent="true" attribute to prevent modal closure when clicking outside of it.

Modal Title

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.

Modal Title

Page Scroll

Apply the data-mv-modal-disable-scroll="false" attribute to allow the page scrollbar to remain enabled.

Modal Title

Full Width

The example below demonstrates the implementation of a full-width modal.

Modal Title

Overlay

The example below illustrates an overlay modal that spans the entire screen size.

Modal Title

Sizes

Explore various modal width sizes set using Tailwind width classes.

Basic Usage

Click the below toggle button to reveal the default modal example.

Modal Title