0.3.0 • Published 4 years ago

vue-proton v0.3.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

vue-proton

A lightweight Vue library for Proton library

Demonstration

Proton-vue is the vue version of the proton library, which makes it easy to create particle backgrounds.

Installation

npm install vue-proton

or if you prefer yarn

yarn add vue-proton

Global

You may install Proton-Vue globally:

import Vue from 'vue';
import VueProton from 'vue-proton';

Vue.use(VueProton);

This will make <VueProton> component available to all components within your Vue app.

Local

Include the particle directly into your component using import:

import VueProton from 'vue-proton';

export default {
  ...
  components: {
    VueProton
  },
  data: function() {
    return {}
  }
}

Usage

<template>
  <div>
    <VueProton v-bind:config="conf" />
  </div>
</template>

<script>
import VueProton from "vue-proton";

export default {
  name: "app",
  components: {
    VueProton
  },
  data: function() {
    return {
      conf: {
        rate: [20, 0.1],
        scale: [1, 0.1],
        v: [1, 3],
        angle: [0, 20],
        color: ["random", "#ffcccc"]
      }
    };
  }
};
</script>
  

License

This project is licensed under the MIT License.