Section indexer

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.

<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
--mm-sectionindexer-size pixels 20px The width of the section indexer, in pixels.

API methods for the "sectionIndexer" add-on

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