0

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.

3
  • Hi. Welcome to GDSE. What do you mean by "a modal"?
    – Billy Kerr
    Aug 4 at 9:24
  • Here's a good article to explain what a modal is. blog.hubspot.com/website/modal-web-design
    – Heath
    Aug 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 Kerr
    Aug 9 at 15:33

1 Answer 1

0

One possible method would be to use a component toggle state.

  1. 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.

  2. Add a component toggle state, by clicking the + button next to the default state.

  3. In the defaule state, set the image/group opacity to 0%

  4. In the toggle state, set the image/group opacity to 100%

That's it really. Just preview it to try it out.

An example

enter image description here

1
  • Unfortunately, that way allows you to click anywhere on the screen to show it. Not just the button.
    – Heath
    Aug 14 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.