optimized way to create a multiple modal/popup
i have about 2-3 modal and 5/6 pop up in my project. How would you design them? stack all on top of each other ? or stack them in a single page and take advantage of display block/none?
3 Replies
are they all different styles or just different content? I would probably make something that is reusable. You can also make use of <template> which is what I would probably do in vanilla. In a framework you can just make a proper dynamic component.
Also that is lots of modals, please think about how bad they are and use them wisely
Simply search for why modals are bad, you can find lots of reasons why you might want to avoid them.
Yeah they are of different style. One modal is for form, one for are you sure you want to delete this, few popups on based on getboundingrect
ya you could use display: none; if you were not doing any animations out of it