Back button introduction

To navigate through the menu by pressing the browser back button, use the backButton options and configuration.

<script>
   document.addEventListener(
      "DOMContentLoaded", () => {
         new Mmenu( "#my-menu", {
            backButton: {
               // back button options
            }
         }, {
            backButton: {
               // back button options
            }
         });
      }
   );
</script>

Options for the "backButton" add-on

Option Datatype Default value Description
backButton A map of options or true for backButton.close.
{
close Boolean false Whether or not to close a panel (or the menu) when pressing the browser back button.
}

Configuration for the "backButton" add-on

The "backButton" add-on has no configuration options.

API methods for the "backButton" add-on

The "backButton" add-on has no API methods.

CSS variables for the "backButton" add-on

The "backButton" add-on has no CSS variables.

SCSS variables for the "backButton" add-on

The "backButton" add-on has no SCSS variables.

Next add-on:
Columns