Community forum for knowledge and support

Updated 2 months ago

The Best Place To Put A Modal

At a glance

The community member is asking where the best place is to put a modal component, specifically whether it should be inside the page-wrapper but outside the main-wrapper, or inside the main-wrapper. The community member currently has it in the former way but wants to double-check. Other community members suggest that putting the modal at the page-wrapper level is a common preference, as it "pops up" over the main content, and that semantically it is not considered "main" content, so it should be placed outside the main-wrapper. The original poster is satisfied with this feedback.

Hi all, where is the best place to put a modal. Should it go inside the page-wrapper but outside the main-wrapper. Or should it go inside the main wrapper? I currently have it the former way but just wanted to double check.

Modal = Coming Soon component

M
R
G
3 comments

Personally I put modals page-wrapper level as it 'pops up' over the main content. Just preference really 🀷

Semantically it's not 'main' so i generally put that outside of the main aka page-wrapper.

Perfect, thanks πŸ˜€

Add a reply
Sign up and join the conversation on Slack