Coder Social home page Coder Social logo

vue-mo-js's Introduction

Vue Mo.js

A Vue JS wrapper for the awesome Mo.js

Limitations

This wrapper currently only supports the burst mo.js component. I may look to add more in the future. It makes it simple to add mojs burst animations to a clickable element in your Vue.js application by adding the vue directive v-mojs

Installation

npm install vue-mo-js --save

Then add the following to your main vue file

import VueMoJS from 'vue-mo-js'
Vue.use(VueMoJS)

Usage

Add this to any element that you want the burst to appear on once it has been clicked.

<a href="/" v-mojs="mojsOptions">Burst Element<a>

Then in your Vue template data option add the mo-js options.

data : function(){
        return {
          mojsOptions : {
            count : 6,
            radius: { 15: 100 },
            origin: '100% 100%',
            degree: 360,
            children: {
              shape: 'polygon',
              fill: ['black','white'],
              isSwirl:true,
              swirlSize: 10,
              swirlFrequency: 2,
              delay: 'stagger(0, 30)'
            }
          }
        }
      }

Now when you click on the html anchor tag it will display the mojs burst.

Please note that there is no need to add the parent mojs option to the data option as the wrapper will pick this up automatically.

A full list of Mo.js Burst options can be found here

vue-mo-js's People

Contributors

aaronlumsden avatar

Stargazers

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

Watchers

 avatar

Forkers

vuelibs

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.