LayerMenu Purchase
New Version 2.0 — rewritten in pure JS

Menus with depth.

A drill-down menu for any number of levels. Every step slides in as a new layer — with twelve transitions, smooth height and full keyboard support.

Twelve ways to go deeper.

Pick a transition and open a submenu. Going back always plays it in reverse.

Rewritten from scratch.

Everything the jQuery version did, minus the bugs — plus the details a modern menu needs.

  • ∞

    Unlimited levels

    Nest lists as deep as you like. Plain <ul> markup, nothing to configure.

  • ↑↓→Esc

    Keyboard & screen readers

    Arrow keys, Home / End and Escape. Focus follows every step; aria-expanded keeps state.

  • ↕

    Smooth height

    The menu box resizes with the level — no jumps between short and long lists.

  • ●

    Opens the current page

    Finds aria-current or WordPress' current-menu-item and starts on the right level.

  • 12

    Transitions + your own

    Built on the Web Animations API. Pass any keyframes to design a custom one.

  • 4KB

    Tiny & typed

    No jQuery, no icon fonts. ESM, CommonJS, browser build, SCSS and TypeScript types.

Up and running in a minute.

  1. 1

    Include the files

    <link rel="stylesheet" href="layer-menu.css">
    <script src="layer-menu.min.js"></script>
  2. 2

    Write a nested list

    <nav data-layer-menu>
      <ul>
        <li><a href="/shop">Shop</a>
          <ul>…</ul>
        </li>
      </ul>
    </nav>
  3. 3

    Or start it from JS

    new LayerMenu('.menu', {
      animation: 'cube',
      backText: 'Back to {parent}',
    });

Give your menu a new layer.

Lifetime updates and six months of support included.

Purchase