A damn easy expandable menu without any extra dependency

A damn easy expandable menu without any extra dependency

vue-expand-ball a vue component which expose a damn easy way to give a draggable ball like menu on your page. A damn easy expandable menu without any extra dependency GitHub

vue-expand-ball

NPM version

A damn easy expandable menu without any extra dependency for vue.

Read full documentation here: documentation

Getting started

This is a component requires vue ^2.1.10. And ease the way to display a draggable menu item on your page.

Requirements

Install

from npm

npm install --save vue vue-expand-ball

from bower

bower install --save vue vue-expand-ball

Import

ES2015

import {VueExpandBall} from 'vue-expand-ball';

CommonJS

const {VueExpandBall} = require('vue-expand-ball');

script

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>DEMO</title>
</head>
<body>

    <script type="text/javascript" src="node_modules/vue/dist/vue.min.js"></script>
    <script type="text/javascript" src="node_modules/vue-expand-ball/dist/vue-expand-ball.min.js"></script>
    <script type="text/javascript">
        var VueExpandBall = window.VueExpandBall;
    </script>
</body>
</html>

Basic Usage

.ball-pos {
    bottom: 200px;
    right: 200px;
}
<expand-ball class="ball-pos">
    <span slot="menu" @click="clicked('M1')">M1</span>
    <span slot="menu" @click="clicked('M2')">M2</span>
</expand-ball>
export default {
    methods: {
        clicked(str) {
            alert(str + ' is just clicked!!');
        }
    }
};

LICENSE

GPL v3 License

Github Repository

Tags: #VueJs #Menu