Add an off-canvas menu to your WordPress site in a few minutes with Mosaic’s pre-made designs. They work out of the box on desktop, tablet, and mobile, and the same slide-in panel works for more than navigation, like contact details or a featured image.
Want a fully custom one? Build a full-screen menu with an icon toggle and a frosted glass background from scratch in the Full-screen menu tutorial.
Add the off-canvas menu
Open the template editor and go to the master that holds your site’s navigation.
Open the Add panel and drop a Library element into the master.
In the Library, go to Parts, then Off-canvas, and drop in the design you like.
The off-canvas menu is built on the Modal element. The window holds your content, and the overlay underneath dims the rest of the page. The close icon has a click interaction that closes the modal.
Connect it to your menu icon
In the preview, the menu doesn’t open yet, neither on page load nor when you click the hamburger icon. Close the interaction you were looking at, leave the menu’s scope, and go back to the navbar.
Select the hamburger icon, open the Interaction tab on the right, and add a Click interaction.
Select the modal in the Navigator, then add the Modal action and set it to Open.
Click the hamburger icon in the preview, and the menu slides in. The close icon closes it again, and it works the same way on mobile.
Make it your own
Select the window, then change its max width on the Style panel to control how wide the menu gets.
Select the overlay and change anything you need, like its background color, or add a blur so the page behind it softens.
Open the interaction on the modal. Increase the animation’s duration to make the window slide in more slowly, or animate a different property altogether.
On the Settings tab, choose whether a click on the overlay or the Escape key closes the menu. Turn both off if only a dedicated button should close it.
Use it beyond menus
The same off-canvas panel is useful anywhere you want extra content one click away. On a service website, like a dental clinic, it can show contact details instead of sending visitors to a separate contact page. The pre-made designs range from playful to elegant, some include images, and some have no menu items at all, so you can use one simply to show off a piece of content.
Result
You now have a working off-canvas menu that slides in when visitors click the hamburger icon, closes the way you choose, and works on every device. You’ve also made it your own, with the width, overlay, and animation set the way you want them.