Allow Users To Close Pop-ups Using The ESC Key
If you want users to close pop-ups using the ESC key, you can easily implement that on Webflow using custom code.
After you properly develop a pop-up, you give the close button a class and add a script. Yes that simple. Here's how it's done
Make sure to name the class of the closing element (in this case the X) to <li-powerful>modal_close<li-powerful>. Insert the custom code in the project settings. Publish and test!
Once that's done, publish the site and test it out
Webflow - Code to the Rescue
The Webflow Library for custom code snippets that unlocks powerful possibilities in Webflow. Includes hand-picked and tested custom code that you can use in Webflow Projects.
Need further help?
Need further help in understanding the resources or how to implement them? Feel free to reach out
About Ali Saeed
Ali Saeed is a Kuwait-based web designer and Webflow developer who has been working as a graphic designer for 4 years, building social brands, company profiles, and presentations. He recently jumped into web design and development. As a web designer, Ali focuses on clarity in design layout and messaging strategy. In his free time, he loves to help the web community, solve problems, and build resources for web designers who want to optimize their websites using Webflow.
Send an email if you'd like to collaborate :)
View his portfolio website