Skip to content

nosoycesaros/offcanvas-muscle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Offcanvas Muscle

A responsive menu with vanilla Javascript and CSS transitions. Looking for a simple and clean solution to create offcanvas left and right menus, we decide to create this little framework, feel free to expand and collaborate. It just works!

See the Demo

Usage

Javascript

Later add this function when your DOM is ready:

import OffcanvasMuscle from './offcanvas/offcanvas'

const transactionTables = document.querySelectorAll('[data-toggle=offcanvas]')

transactionTables.forEach(trigger => {
  const menu = new OffcanvasMuscle(trigger)
})

HTML

The following are the mandatory HTML code that Offcanvas Muscle needs to work

<nav class="offcanvas offcanvas--left" id="left-menu">
...
</nav>

<a class="offcanvas__trigger offcanvas__trigger--left" data-target='left-menu' data-toggle="offcanvas">
</a>

Gratitude

Thanks to Pure CSS Off-screen Navigation Menu by Austin Wulf which was our starting point for this project.

About

A responsive menu with vanilla Javascript and CSS transitions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published