Webflow’s default mobile nav menu can make it hard to close if the menu overlays the hamburger icon. Adding a custom close button inside the menu is a clean and user-friendly solution.
- Open the Navigator panel and locate your Navbar element.
- Inside the Nav Menu (
nav-menu
), drag in a Button or Link Block element and give it a class like nav-close-button
. - Add an icon (e.g., an "X" SVG or text like "Close") to clearly indicate the close action.
- Style the button for visibility and position (e.g., top-right corner of the menu).
- Select the Close Button you just created.
- Go to the Interactions panel and click + next to Element Trigger > Mouse Click (Tap).
- Add an action that affects the Navbar menu symbol, not just the button:
- Choose Element > Navbar (the parent
Navbar
element). - Use the "Close Navbar" action under Navbar actions.
3. Ensure Hamburger Icon Is Not Obstructed
- Avoid placing or sizing the
nav-menu
in a way that overlaps the hamburger icon. - Do not apply top or left margins to the menu to show the icon; instead:
- Position the close button within the menu itself.
- Optionally style the menu to slide from the side (use
transform: move in
) and not fully cover the UI if that improves UX.
- With the close button selected, go to the Style panel.
- Under Display Settings, set it to Display: None on desktop and tablet breakpoints.
- On mobile landscape and below, set it to Display: Block or Flex.
Summary
To make your mobile nav easier to close, add a custom close button inside the nav-menu
, assign it an interaction to trigger the “Close Navbar” action, and ensure it’s only visible on mobile. Avoid adjusting the menu’s margin to expose the hamburger icon—use layout and interactions instead for a cleaner and more reliable solution.