The mmenu.js plugin provides a set of options for customizing your menu. The default values can be overridden by passing new values to the method.
<script> document.addEventListener( "DOMContentLoaded", () => { new Mmenu( "#menu", { // options }); } ); </script> Options are considered to be arbitrary and can be changed without breaking the plugin.
Note that add-ons might have their own set of options grouped in an object in the options.
<script> document.addEventListener( "DOMContentLoaded", () => { } ); </script> Available options
| Option | Datatype | Default value | Description |
| * See the description. | |||
| hooks | Object | {} | A collection of functions to hook into the API methods before the menu is initialised. |
|---|---|---|---|
| navbar | |||
| { | |||
| add | boolean | true | Whether or not to add a navbar above the panels. |
| title | String | "Menu" | The title for the main panel. |
| titleLink | String | "parent" | The type of link to set for the title. Possible values: "parent", "anchor" or "none". |
| } | |||
| slidingSubmenus | boolean | true | Whether or not submenus should come sliding in from the right. If false, submenus expand below their parent.To expand a single submenu below its parent item, add the class "Vertical" to it. |
| theme | String | "light" | The color scheme to use. Possible values: "light", "light-contrast", "dark", "dark-contrast" "white", "white-contrast", "black" and "black-contrast". |