How to Show and Hide Elements on Click in Webflow
Learn how to show and hide elements on click in Webflow with native interactions or JavaScript.
In this tutorial, Sandro, co-founder of the Gemeos Webflow agency, shows you how to show and hide elements on click in Webflow, using native interactions or JavaScript.
Example
Method 1: Webflow Interactions
Select the trigger button. In Interactions, create a Mouse click (tap) trigger. Add the Display action to the target element, with the Toggle option. This is the fastest method for a simple case.
Method 2: JavaScript with classList.toggle
For more complex cases (multiple elements, CSS animations), use this approach:
With the matching CSS:
Conclusion
Show/hide on click is one of the most commonly used interactions. Use cases:
- Show more details on a product card
- Show/hide an extra form
- Filter toggles on a listing page
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.















