Section indexer introduction

To append a section indexer to the menu, use the sectionIndexer options and configuration.

<script>
    document.addEventListener(
        "DOMContentLoaded", () => {
            new Mmenu( "#menu", {
                sectionIndexer: {
                    // section indexer options
                }
            }, {
                sectionIndexer: {
                    // section indexer configuration
                }
            });
        }
    );
</script>

Example

Give it a go, change the options below and see how it affects the menu.

  • Add a section indexer to the menu.
<script>
    document.addEventListener(
        "DOMContentLoaded", () => {

        }
    );
</script>

Options for the "sectionIndexer" add-on

Option Datatype Default value Description
sectionIndexer
{
add Boolean false Whether or not to automatically append a section indexer to the menu.
}

Configuration for the "sectionIndexer" add-on

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

CSS variables for the "sectionIndexer" add-on

Variable Datatype Default value Description
Sizes
--mm-sectionindexer-size CSS number 20px The width of the section indexer, in pixels.

API methods for the "sectionIndexer" add-on

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

Next add-on:
Set selected