Button interactions when they trigger a Toggle Hash

Hi!

I have a Button and a Modal elements on a page.

The Button element has interactions such as text color change and Particles.

When the button is clicked, it opens the Modal element with a Toggle Hash.

When the modal gets closed, the button stays in the interaction state, instead of reverting to its pre-hover state.

Thanks!

Great to hear from you. There’s a couple of things I’d like to do here.

I think the hash should definitely change to empty if you are close a modal with a toggle hash or anything with a toggle hash really. Otherwise if you close the modal and reload the page, the modal is going to popup immediately.

With that we could reset the state of buttons. This was simple enough for me to do as well. I don’t know if keeping the current hash is critical though for a page so I might add a fallback. Let me know if anybody has any other thoughts on this one too. Thanks!

1 Like