You position the element off the visible canvas ahead of time and slide it in with transform: translateX(). Not display: none — transform is GPU-accelerated, so it's smoother and animatable.
Pair it with a darkened overlay (scrim) so users understand focus has shifted to the panel, and clicking the overlay closes it. Lock background scrolling while the panel is open (overflow: hidden on body), or the page and the panel scroll together in a confusing way.
Beyond nav menus, the same pattern covers carts, filter panels and notification trays — anything that needs most of the screen briefly without being a full separate page.
When to use
Good for tucking away secondary navigation or extras on narrow mobile screens. For something used constantly, an always-visible UI like a bottom tab bar beats hiding it off-canvas.