All Projects → dreambo8563 → Vue Particle Effect Buttons

dreambo8563 / Vue Particle Effect Buttons

Licence: mit
A bursting particles effects buttons component ✨💥❄️🌋

Projects that are alternatives of or similar to Vue Particle Effect Buttons

Tsparticles
tsParticles - Easily create highly customizable particles animations and use them as animated backgrounds for your website. Ready to use components available for React.js, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Inferno, Solid, Riot and Web Components.
Stars: ✭ 2,694 (+1130.14%)
Mutual labels:  particles, animations
Ssspinnerbutton
Forget about typical stereotypic loading, It's time to change. SSSpinnerButton is an elegant button with a diffrent spinner animations.
Stars: ✭ 357 (+63.01%)
Mutual labels:  animations, buttons
PygameWidgets
A module for use with Pygame. Includes fully customisable buttons, textboxes, sliders and many more, as well as the ability to create and run animations on these widgets.
Stars: ✭ 34 (-84.47%)
Mutual labels:  buttons, animations
Konfetti
Celebrate more with this lightweight confetti particle system 🎊
Stars: ✭ 2,278 (+940.18%)
Mutual labels:  particles, animations
Tristatetogglebutton
Customizable tri-state toggle button (with three states, three state toggle) for Android
Stars: ✭ 198 (-9.59%)
Mutual labels:  buttons
Jelly
🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API.
Stars: ✭ 2,319 (+958.9%)
Mutual labels:  animations
Animatable Component
Animate once, use Everywhere! 💫
Stars: ✭ 188 (-14.16%)
Mutual labels:  animations
Twitter Saucenao
A Twitter bot that utilizes the SauceNao API to find the source of images or anime screencaps
Stars: ✭ 186 (-15.07%)
Mutual labels:  anime
Notify.moe
💃 Anime tracker, database and community.
Stars: ✭ 216 (-1.37%)
Mutual labels:  anime
Web Portfolio
Personal portfolio website made with the React
Stars: ✭ 207 (-5.48%)
Mutual labels:  animations
React Portfolio Template
Modern React Portfolio Template (FREE)
Stars: ✭ 188 (-14.16%)
Mutual labels:  animations
Babypiganimation
基本动画、位移动画、缩放动画、旋转动画、组动画、关键帧动画、贝塞尔曲线、进度条动画、复杂动画、OC动画、aniamtion、basicanimation等。
Stars: ✭ 192 (-12.33%)
Mutual labels:  animations
Jikan Rest
The REST API for Jikan
Stars: ✭ 200 (-8.68%)
Mutual labels:  anime
Anime Dl
Anime-dl is a command-line program to download anime from CrunchyRoll and Funimation.
Stars: ✭ 190 (-13.24%)
Mutual labels:  anime
Sbuttons
💡 Simple buttons you can use easily for your next project.
Stars: ✭ 207 (-5.48%)
Mutual labels:  buttons
React Native Animated Spinkit
A collection of loading indicators for React Native
Stars: ✭ 186 (-15.07%)
Mutual labels:  animations
Swiftyanimate
Composable animations in Swift
Stars: ✭ 194 (-11.42%)
Mutual labels:  animations
Particleground Portfolio
A minimalistic particle theme landing page template. ⚛️
Stars: ✭ 204 (-6.85%)
Mutual labels:  particles
Motionlayoutexperiments
Collection of experiments, using motion layout.
Stars: ✭ 194 (-11.42%)
Mutual labels:  animations
Particle Life
Game of life with particles
Stars: ✭ 194 (-11.42%)
Mutual labels:  particles

vue-particle-effect-buttons (demo)

All Contributors Codacy Badge Greenkeeper badge Build Status Known Vulnerabilities License: MIT npm

Bursting particle effect buttons for Vue.

This library is a Vue portal of an awesome Codrops Article by Luis Manuel (original source).

Install

npm install --save animejs vue-particle-effect-buttons

Usage

Check out the Demo to see it in action.

<template>
    <ParticleBtn
      :visible.sync="btnOps.visible"
      :animating.sync="btnOps.animating"
      :options="btnOps"
      cls="btn-cls"
    >
    hello eveybody!
    </ParticleBtn>
    <h2>animating:{{btnOps.animating}}</h2>
    <h2>visible:{{btnOps.visible}}</h2>
    <button @click="btnOps.visible=!btnOps.visible">toggle</button>
  </div>
</template>

<script>
import ParticleEffectButton from "vue-particle-effect-buttons"

export default {
  data() {
    return {
      btnOps: {
        type: "triangle",
        easing: "easeOutQuart",
        size: 6,
        particlesAmountCoefficient: 4,
        oscillationCoefficient: 2,
        color: function () {
          return Math.random() < 0.5 ? "#000000" : "#ffffff";
        },
        onComplete: () => {
          console.log("complete");
        },
        onBegin: () => {
          console.log("begin");
        },
        visible: true,
        animating: false
      },
    }
  },
  components: {
    ParticleEffectButton
  }
};
</script>

Note that children can be anything, The children should represent the button's contents.

You change the visible boolean prop to kick-off an animation, typically as a result of a click on the button's contents. If visible changes to false, the button will perform a disintegrating animation. If visible changes to true, it will reverse and reintegrate the original content.

Props

Property Type Default Description
visible boolean true Whether button should be hidden or visible. Changing this prop starts an animation. support .sync modifier
animating boolean false Get the current status of animating or end of the animation. support .sync modifier
cls string/Object/Arrar noop The class to change the default button styles
duration number 1000 Animation duration in milliseconds.
easing string 'easeInOutCubic' Animation easing.
type string circle 'circle' or 'rectangle' or 'triangle'
style string fill 'fill' or 'stroke'
direction string 'left' 'left' or 'right' or 'top' or 'bottom'
canvasPadding number 150 Amount of extra padding to add to the canvas since the animation will overflow the content's bounds
size number func random(4)
speed number func random(4)
particlesAmountCoefficient number 3 Increases or decreases the relative number of particles
oscillationCoefficient number 20 Increases or decreases the relative curvature of particles
onBegin func noop Callback to be notified once an animation starts.
onComplete func noop Callback to be notified once an animation completes.

I tried to keep the properties exactly the same as in the original codrops version.

Slots

Property Type Default Description
default slot the string of 'content' the content of the button

Related

Contributors

Thanks goes to these wonderful people (emoji key):

Vincent Guo
Vincent Guo

💻 📖 🚇

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].