How to Create a Native Modal in Webflow Without a Plugin
Learn how to create a native modal pop-up in Webflow without a plugin: overlay, click-to-open, and close.
In this tutorial, Sandro, cofounder of Gemeos Webflow agency, shows you how to create a native modal pop-up in Webflow without a plugin, with open-on-click and close-by-clicking-the-overlay behavior.
Example
1. Create the modal structure
Create a Div modal-overlay with position Fixed, covering the entire page (top/left/right/bottom: 0), background rgba(0,0,0,0.5), display: none, z-index: 1000. Inside it, add a centered Div modal-box (margin: auto). Add a close-modal button inside the modal-box. Create an open-modal button somewhere else on your page.
2. Add this script in the <body>
Conclusion
A native modal improves conversions and UX without weighing down your site. Use cases:
- Contact or demo form
- Action confirmation (deletion, purchase)
- Lightbox image gallery
Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.















