Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
vue-ripple-directive
Advanced tools
Material Ripple Effect as Vue Directive.
This directive it's meant to be used in any element in which you like to achieve such ripple effect.
npm install vue-ripple-directive --save
Important Notice
The directive will work better if the element where you attach it is relative positioned. Although the directive will try to set
position: relative
if the element does not have this property. This is because the ripple since v2.0.* isposition: absolute
, to avoid trailing issues when elements with the directive in the UI move.
Optional parameter to pass to the directive.
Parameter | Type | Values |
---|---|---|
color-value | String | Default: 'rgba(0, 0, 0, 0.35)'. Accepts either HEX, RGB & RGBA values. For optimal look use RGBA with low opacity. |
By default this directive attaches a click handler to the element as well as the transition is set for 600ms. For those who wants to modify the same, just pass modifiers to the directive:
v-ripple.mouseover.500
Can also modify only one
v-ripple.mouseover
First you need to import the directive and add it to Vue.
import Ripple from 'vue-ripple-directive'
Vue.directive('ripple', Ripple);
Then use on any element you want to achieve the effect.
<div v-ripple class="button is-primary">This is a button</div>
If you want a custom color just pass a color parameter as string
. It's best if you use RGBA colors to achieve a greater effect.
<div v-ripple="'rgba(255, 255, 255, 0.35)'" class="button">I have different color</div>
You can set the default color and z-index for all your ripples as the following example
import Ripple from 'vue-ripple-directive'
Ripple.color = 'rgba(255, 255, 255, 0.35)';
Ripple.zIndex = 55;
Vue.directive('ripple', Ripple);
FAQs
Vue Material Ripple Effect Directive
The npm package vue-ripple-directive receives a total of 3,526 weekly downloads. As such, vue-ripple-directive popularity was classified as popular.
We found that vue-ripple-directive demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.