Skip to content

A lightweight library for making Your Own Custom Menus

License

Notifications You must be signed in to change notification settings

arnav-kr/JS-Menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

JS-Menu

A lightweight library for making Your Own Custom Menus

Syntax:

<button id="myButton">Toggle Menu</button>

<nav-menu items="profile,settings,about" event-listeners="alert('profile'),alert('settings'),alert('about')" toggle-button="myButton" enableLinks="true" links="#profile,/settings,https://example.com/about/"></nav-menu>
properties value Use
items HTML String or Plain Text(seperated By Comma ",") Used to create Menu Items Every String Seperated by comma specifies a single menu item.
event-listener Javascript Functions(seperated By Comma ",") Specifies the function to run when a menu item is clicked.
toggle-button id of a HTML Element Specifies the Button that is Used to Toggle the Menu.
enableLinks a boolean Specifies whether to wrap menu items in a link.
links URLs(seperated By Comma ",") Specifies the destination URL to go when a memu item is pressed if the value of enableLinks is true

About

A lightweight library for making Your Own Custom Menus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published