Git Product home page Git Product logo

radial-menu-js's Introduction

Radial Menu in Pure JavaScript, HTML and SVG

Radial menu screenshot

Controls

  1. Go to https://axln.github.io/radial-menu-js/index.html.

  2. Click Open Menu button.

  3. You can use mouse, mouse wheel and keyboard for navigation:

    • Arrow keys and mouse wheel to select menu item.
    • Enter to choose the selected menu item.
    • Esc/Backspace to return to parent menu and close menu.

Usage Example

var svgMenu = new RadialMenu({
   parent      : document.body,
   size        : 400,
   closeOnClick: true,
   menuItems   : [
     {
       id: 'item1',
       title: 'Item 1'
     },
     {
       id: 'item2',
       title: 'Item 2'
     },
     {
       id: 'more',
       title: 'More...',
       items: [
         {
           id: 'subitem1',
           title: 'Subitem 1'
         },
         {
           id: 'item2',
           title: 'Subitem 2'
         }
       ]
     }
   ],
   onClick: function (item) {
     console.log('You have clicked:', item);
   }
});

 var openMenu = document.getElementById('menu');
 openMenu.onclick = function () {
   svgMenu.open();
 };

 var closeMenu = document.getElementById('close');
 closeMenu.onclick = function () {
   svgMenu.close();
 };

License

MIT

radial-menu-js's People

Contributors

axln avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

radial-menu-js's Issues

(Help) Adding Additional Icons

I understand that the icons are defined by the tags in the HTML with the corresponding SVG data and to add additional icons you would add more tags. Considering how little I work with SVG's, although I am trying to learn, I was wondering what the best approach would be to convert/add additional symbols Do you have a list of icons that are easily converted to symbol format or do you have a workflow suggestion for importing icons into a format that is best suited for this menu. How did you make the current SVG data, from scratch or from existing icons?

Any help would be appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.