Skip to content
Cameron Themes

Cardinal docs/Navigation

Menu drawer

The slide-in navigation used on mobile, and optionally on desktop.

On mobile the header menu is always a drawer that slides in from the side. On desktop you can choose it too, by setting Header → Desktop menu to Drawer (hamburger) — a good fit for stores with a small catalog and a strong visual identity, where a permanent menu bar would compete with the imagery.

What it contains

The drawer has no settings of its own. It renders the same menu as the header, plus your localization selectors at the bottom if they are switched on. Search, the account icon and the cart stay in the header bar, so they are always one tap away.

  • Two levels of nesting. A parent item expands in place to reveal its children, which can expand again.
  • Native disclosures. The expanding is built on <details> elements, so it works with JavaScript disabled and is announced correctly by screen readers.
  • Country and language selectors sit at the bottom when they are switched on in the header settings and there is more than one option to choose from.
  • Keyboard friendly. While the drawer is open, focus stays inside it; Escape, the close button or a tap on the dimmed page closes it and returns focus to the menu button.

Designing for it

The drawer is where most of your customers will actually navigate, so it deserves more attention than the desktop bar. Two things matter more than anything else:

  1. 01Put the most-visited item first. Vertical lists are read top-down; there is no visual hierarchy to lean on.
  2. 02Do not nest what does not need nesting. Every level of expansion is a tap. A flat list of eight is easier than three groups of three.

Still stuck? Contact support and we will help.