How can I darken the site when the off-canvas menu is open and activated? This provides a nice effect where the focus is on the nav menu after it’s pressed.
The off-canvas nav menu and site right here are a perfect example. Notice how the background darkens on the main site when the hamburger button is pressed. If you inspect the element, there appears to be a div with an ID of “menu-overlay” that’s making this effect possible.
I don’t think you can do this with the regular menu component but you can with interactions. You’ll need to create a div for the menu and a button and trigger the showing of the div via interactions. Then also trigger an overlay div underneath the menu div to show as well when the button is pushed. You will need to use Z index to control what’s on top of each other.
So, I should look to building a custom off-canvas menu (instead of using the Webflow version)? I noticed Step 6 of this tutorial delves into this topic.
What I have done in the past is to wrap the pages content in a single div. The menu is placed outside of the div. In my case I put a darker background on the body and just slightly faded the warping div when the menu was open.
Thanks again, @AlexN. I followed you method and was able to adjust the opacity of the single div with an interaction trigger when the menu was open. But, I’m still confused as to how to darken.
I see the option to adjust the opacity, but that tends to make things a bit more light and faded rather than dark. I don’t know how to temporarily put a darker background on something, as you mentioned you did with the body. Is that possible in Webflow?