# Same modal trigger for opening & closing

**URL:** <https://forums.realmacsoftware.com/t/same-modal-trigger-for-opening-closing/48875>\
**Category:** Elements\
**Created:** [July 15, 2025, 9:24am UTC](https://forums.realmacsoftware.com/t/same-modal-trigger-for-opening-closing/48875 "2025-07-15T09:24:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [July 15, 2025, 9:24am UTC](https://forums.realmacsoftware.com/t/same-modal-trigger-for-opening-closing/48875/1 "2025-07-15T09:24:47Z")

</div>

hello,

i have created a small modal menu. i want to be able to open and close them with the same button trigger. how do I do this?

i have already try it with `@click=“open = !open”` - but it does not work.  
does anyone have any idea how this could work?

i know that there is also the modal-close component, but I don’t want to use it

---

<div class="post-metadata">

**Author:** ![WeaverPixel](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/weaverpixel/32/25453_2.png) [@WeaverPixel](https://forums.realmacsoftware.com/u/WeaverPixel)\
**Post date:** [July 15, 2025, 10:30am UTC](https://forums.realmacsoftware.com/t/same-modal-trigger-for-opening-closing/48875/2 "2025-07-15T10:30:41Z")

</div>

Hi @Pegasus

I would use the Dropdown Component for that. Does exactly what you are looking for or how I understood it 😀.

I used it on one of my coming templates and it looks like

 ![A website menu with a yellow hamburger icon is open, displaying navigation options including Homepage, Portfolio, Events, Contact Us, Shop, and Blog. (Captioned by AI)](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/3X/2/9/29b61004736b8be8907c7a090fefcaa0c5a65d87.png)

[https://studio-elements.weaverpixel.com](https://studio-elements.weaverpixel.com)

You need to go to the small screen sizes to see it.

---

<div class="post-metadata">

**Author:** ![Pegasus](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/pegasus/32/25035_2.png) [@Pegasus](https://forums.realmacsoftware.com/u/Pegasus)\
**Post date:** [July 15, 2025, 12:37pm UTC](https://forums.realmacsoftware.com/t/same-modal-trigger-for-opening-closing/48875/3 "2025-07-15T12:37:09Z")

</div>

thx… of course. why not the Dropdown Component 😁 ^^
