Skip to content

Commit 2962fb3

Browse files
committed
Fixes for version 2.0, related to positioning and clearing realtive position
2 parents 965cfb4 + 3ecfa20 commit 2962fb3

File tree

4 files changed

+5774
-14
lines changed

4 files changed

+5774
-14
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ This directive it's meant to be used in any element in which you like to achieve
1616
npm install vue-ripple-directive --save
1717
```
1818

19+
>### Important Notice
20+
>The directive will work better if the element where you attach it is **relative positioned**.
21+
>Although the directive will try to set `position: relative` if the element does not have this property.
22+
>This is because the ripple since v2.0.* is `position: absolute`, to avoid trailing issues when elements with the directive in the UI move.
23+
1924
## Options
2025

2126
Optional parameter to pass to the directive.
@@ -60,3 +65,15 @@ If you want a custom color just pass a color parameter as `string`. It's best if
6065
```
6166
<div v-ripple="'rgba(255, 255, 255, 0.35)'" class="button">I have different color</div>
6267
```
68+
69+
## Global settings
70+
71+
You can set the default color and z-index for all your ripples as the following example
72+
73+
```
74+
import Ripple from 'vue-ripple-directive'
75+
76+
Ripple.color = 'rgba(255, 255, 255, 0.35)';
77+
Ripple.zIndex = 55;
78+
Vue.directive('ripple', Ripple);
79+
```

0 commit comments

Comments
 (0)