Off-Canvas Responsive Menu

Responsive Menu

An off-canvas menu keeps navigation out of the way until a visitor opens it. This responsive example slides in from the left on smaller screens and uses a horizontal menu on wider screens.

The menu button works with keyboard or pointer input, reports its expanded state, and closes with Escape. Dropdown sections use buttons so they can be opened from a keyboard as well as by touch or mouse.

Customize the starter before using it

  • Replace the sample menu labels and every #demo-content link with destinations from your own site.
  • Update colors, spacing and the mobile breakpoint in the CSS to match your layout.
  • Keep a visible focus style and test the menu at narrow widths with a keyboard.

The demo is a starter pattern, not a complete site navigation. Open it to try the controls, or download the ZIP and adapt its standalone HTML file.