1.2.0 • Published 5 years ago

v-ripple-effect v1.2.0

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

v-ripple-effect

A Vue directive that creates a ripple effect on any element (like from Material UI or Vuetify).

Installation

npm i v-ripple-effect

Registering the directive in Vue:

// Global Instance - in your main.js file
import ripple from 'v-ripple-effect';
Vue.use(ripple);

// Single Instance
new Vue({
  directives: { ripple }
})

Options

PropertyDescriptionTypeDefault
timeThe number of seconds for the ripple to complete its animation.Number or Float1
easeThe easing function of the ripple.String'ease'
colorThe color of the ripple.String'#000'
startingOpacityThe opacity the ripple will start with when the animation begins.Float (0 to 1)0.2

Usage

Ripple can be applied onto an element by using "v-ripple".

Basic usage example:

<div v-ripple></div>

Examples

<div v-ripple="{ time: 1.2, ease: 'ease-in', color: '#ff0000', startingOpacity: 0.5 }"></div>
<button v-ripple="{ time: 0.3, ease: 'linear', color: 'rgb(255, 255, 255)' }"></button>

Demo

https://codepen.io/jacobgibellini/pen/mZVGPJ

1.2.0

5 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago