mmenu light

Small and lightweight

Mmenu light is the extremely small and lightweight alternative to the mmenu.js plugin. It creates a beautiful, intuitive off-canvas menu for mobile websites and web-apps, with the exact look and feel of the mmenu.js plugin.

No concessions

If you're in need of a simple and small mobile menu, but don't want to make any concessions to the mmenu look and feel, give the mmenu light plugin a try.

Really, really small

With a 6kb (minified) .js file and a 6kb (minified) .css file, you could not ask for a smaller disk footprint.

Example

Give it a go, click the hamburger icon to show the menu.

<script>
    document.addEventListener(
        "DOMContentLoaded", () => {
            const node = document.querySelector( "#my-menu" );
            const menu = new MmenuLight( node );

            menu.enable( "(max-width: 600px)" );
            menu.offcanvas();

            document.querySelector( 'a[href="#my-menu"]' )
                .addEventListener( 'click', ( evnt ) => {
                    menu.open();

                    evnt.preventDefault();
                    evnt.stopPropagation();
                });
        }
    );
</script>

Download

The mmenu light plugin is licensed under the Creative Commons Attribution 4.0 International license. You can use it in all your personal, non-commercial and commercial projects.

NPM

Install with NPM:
npm install mmenu-light

GitHub

Download directly from the Github repository.

Supported browsers

The mmenu light plugin by default only supports ECMAScript 6 compliant browsers. For Internet Explorer 10 and 11, you'll need the JavaScript polyfills included in the package.

Documentation Tutorial