Simple Multi-Level Sidebar Offcanvas Menu In Vanilla JavaScript

Off-Canvas Menu is a simple, mobile-first, multi-level off-canvas menu written in vanilla JavaScript.

multi level slide out menu, off canvas menu multi level, multi level hamburger menu, multi level sidebar menu bs, multi level mobile menu, responsive off canvas menu

How to make use of it:

1. Create a nested navigation menu for a menu outside the panel.

<div class="off-canvas">
  <div class="off-canvas-header">
    <h4 class="off-canvas-title">
      Off-Canvas-Menu
    </h4>
    <div data-bs-dismiss="off-canvas" aria-label="Close">
      <div class="icon-close"></div>
    </div>
  </div>
  <div class="off-canvas-body">
    <nav>
      <ul class="list-level-0">
        <li class="list-item">
          <a class="link-level-1" href="#">
            Home
          </a>
        </li>
        <li class="list-item">
          <a class="link-level-1" href="#">
            Services&nbsp;<span class="link-arrow">&#8250;</span>
          </a>
          <ul class="list-level-1">
            <li class="list-item">
              <a class="link-level-2" href="#">
                UX-Design
              </a>
            </li>
            <li class="list-item">
              <a class="link-level-2" href="#">
                Webdesign
              </a>
            </li>
            <li class="list-item">
              <a class="link-level-2" href="#">
                Content Marketing
              </a>
            </li>
          </ul>
        </li>
        <li class="list-item">
          <a class="link-level-1" href="#">
            Team&nbsp;<span class="link-arrow">&#8250;</span>
          </a>
          <ul class="list-level-1">
            <li class="list-item">
              <a class="link-level-2" href="#">
                John
              </a>
            </li>
            <li class="list-item">
              <a class="link-level-2" href="#">
                Peter
              </a>
            </li>
            <li class="list-item">
              <a class="link-level-2" href="#">
                Gordon
              </a>
            </li>
          </ul>
        </li>
      </ul>
    </nav>
  </div>
</div>

2. Load the main style sheet out of the menu.

<link rel="stylesheet" href="css/off-canvas-menu.css" />

3. Create a hamburger button to toggle the menu off the canvas.

<aside class="icon-open-row">
  <div class="icon-open-container">
    <div class="icon-open-col-1">
      ☰
    </div>
    <div class="icon-open-col-2">
      Open Menu
    </div>
  </div>
</aside>

Simple Multi-level Offcanvas Menu, Off Canvas Menu Plugin/Github, off canvas navigation examples


See Demo And Download

Official Website(magnusmartin85): Click Here

This superior jQuery/javascript plugin is developed by magnusmartin85. For extra advanced usage, please go to the official website.

Related Posts

Input-Values-Using-Mouse-Drag

Create Side Sliders Input Values Using Mouse Drag | Pointer Lock

HTML Range Slider is a lightweight library to create side sliders to adjust values easily and precisely by making use of the Pointer Lock API. Side Slider…

simple-parallax-scrolling-js

Smooth and Lightweight Parallax Scroll Library in Pure Javascript

Lightweight and seamless parallax scrolling library implemented in pure javascript using hardware acceleration for additional performance. Main Features Extremely lightweight with no dependencies A few kilobytes of pure…

Convert-Form-Data-to-JSON

How to Convert Form Data to JSON with HTML Forms | FormsJS

FormsJS is a simple-to-use JavaScript library that covers type subject values to JSON in real time. The items containing the data category will be analyzed automatically. It…

editable-html-table-using-javascript

A Small jQuery Extension to Convert An Editable HTML Table

Editable Table is a small jQuery extension to convert an editable HTML table for fast data entry and validation. A small jQuery extension to convert a static…

jquery.youtube-background

Simple jQuery Plugin for Embedding YouTube Videos As Cover Background

jquery.youtube-background is a jQuery plugin built to facilitate YouTube embeds as cover wallpaper using the YouTube Embed API. There is another jQuery Youtube Video Background plugin that…

Data-Table-Generator-Tabulator

Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…