Is there an example of creating a modal in Plasmic?

Hi, is there an example of creating a modal in Plasmic? I could import modal from a library etc, but i’m wondering more on how to provide a better UI in plasmic where I can create a modal in a page, and still have it be visible without a full screen take over etc.

Hi, the best way is indeed to use a code component that provides the modal behavior. It is indeed a little bit cumbersome to make sure that the code component lets you select the right element when it takes over your screen - this is something we are trying to improve.

As a work around that will allow you to avoid having a modal take over the screen while editing, you can consult the useplasmiccanvascontext hook, which will indicate whether you are in editing mode in Plasmic Studio, and if you are, then you can just render the contents in a normal div instead of a modal, which will make it easier to edit without any quirky behavior. Let me know if that helps.