I have a modal in a layer above everything else. I need to add a click to a button that shows the modal. How do I do this? Everything I've seen online involves adding multiple artboards. I just need to show and hide a layer on click.
-
Hi. Welcome to GDSE. What do you mean by "a modal"?– Billy KerrAug 4 at 9:24
-
Here's a good article to explain what a modal is. blog.hubspot.com/website/modal-web-design– HeathAug 9 at 14:59
-
I see. So my answer should still work for this, as it can be used to show or hide anything basically.– Billy KerrAug 9 at 15:33
1 Answer
One possible method would be to use a component toggle state.
Make a button, and add an image or a group containing the content you want to show or hide. Select both. Make it a component.
Add a component toggle state, by clicking the + button next to the default state.
In the defaule state, set the image/group opacity to 0%
In the toggle state, set the image/group opacity to 100%
That's it really. Just preview it to try it out.
An example
-
Unfortunately, that way allows you to click anywhere on the screen to show it. Not just the button.– HeathAug 14 at 23:10