YerkoPalma / vuey

:sparkles: highly opinionated personal collection of components and directives
MIT License
0 stars 0 forks source link

v-ripple specification #1

Open YerkoPalma opened 8 years ago

YerkoPalma commented 8 years ago

v-ripple directive

v-ripple is the radial effect from material design when an object is clicked or taped. In this first version the goal is to have a simple but flexible effect aiming, in some future versions, to have a full featured radial transition effect, compatible with vue-router

General

It supposed to be used like this

<template>
  <div v-ripple></div>
</template>
<script>
export default {
  ripple: {
    // some options
  }
}
</script>

What's defined in the ripple option is applied globally wherever the directive is present in the current component/instance. All of those options can be overwritten for a specific element in the directive declaration. If the directive is applied to a vue component, it might be applied to the $el element of that component or discard silently.

Modifiers

name value
black (default) #000000
red #f44336
pink #e91e63
purple #9c27b0
indigo #3f51b5
blue #2196f3
cyan #00bcd4
teal #009688
green #4caf50
lime #cddc39
yellow #ffeb3b
amber #ffc107
orange #ff9800
brown #795548
grey #9e9e9e
white #ffffff

examples:

<div v-ripple.brown></div>
<div v-ripple.cyan></div>
<div v-ripple.indigo></div>
ripple: {
  trigger: {
    target: '#login',
    event: 'hover'
  }
}
YerkoPalma commented 8 years ago

related https://github.com/YerkoPalma/palmacontabilidad/issues/6

YerkoPalma commented 8 years ago

Use css files instead of javascript to manipulate animations