Skip to content

A lightweight vanilla JavaScript context menu library with FontAwesome support.

License

Notifications You must be signed in to change notification settings

browniebraun/Contextify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supports FontAwesome! GitHub Download Count


Contextify


A lightweight vanilla JavaScript context menu library with FontAwesome support.
This library was written for use in a personal project of mine as an AIO solution for the features of a context menu that I wanted that I could only find spread across multiple different context menu libraries. This is very early doors and I will continue to maintain this however slowly that may be as I build my personal projects and use cases change or the need for features arise.

Usage

    //Construct our menu buttons 
    const menuButtons = [
        { icon: 'fa-camera', type: 'button', text: 'Screenshot', click: screenshot },
        { icon: 'fa-times-circle', type: 'button', text: 'Cancel', click: (event) => { menu.hide(false); }}
    ];
    //Create our new Contextify object with the buttons, theme, container
    const menu = new Contextify(menuButtons, "dark", document.body);

Which creates the following menu (note, the example requires you to have a form of FontAwesome installed): Example Menu

Disclaimer: This has only been tested on desktop, MacOS and Windows 10. I have not tested this on any mobile devices.

About

A lightweight vanilla JavaScript context menu library with FontAwesome support.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 65.5%
  • CSS 25.1%
  • HTML 9.4%