1.0.4 ā€¢ Published 3 years ago

vue-svg-like v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

vue-svg-like

šŸŽ‰ A Vue component for animated like button šŸŽ‰ preview

Installation

NPM

npm install vue-svg-like

YARN

yarn add vue-svg-like

Usage

<template>
  <vue-svg-like
    :clicked="clicked"
    color="#38b48b"
    subColor="#f08300"
    :size="5"
    :duration="0.5"
    @click="onClickLikeButton"
  />
</template>

<script>
import VueSvgLike from 'vue-svg-like'

export default {
  components: {
    VueSvgLike
  },
  data () {
    return {
      clicked: false
    }
  },
  methods: {
    onClickButtonLike: function () {
      this.clicked = !this.clicked 
    }
  }
}
</script>

Configuration

PropertyTypeDescriptionDefault
colorStringThe main color. This color is assigned to the heart.#f91880
subColorStringThe sub color. This color is assigned to the explosion.#f91880
sizeNumberOverall size of the button. This represents a multiple of the default size and should be a positive number.1
durationNumberAnimation duration. This prepresents animation-duration in CSS and should be a positive number. The unit is s.1
disabledBooleanThis prevents the user from interacting with the button: it cannot be pressed or focused.false
1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago