1.0.0 • Published 4 years ago
wave-effect v1.0.0
wave-effect
click wave effect with CSS animation.
Install
npm install wave-effectyarn add wave-effectUsage
import wave,{ clearEffect } from 'wave-effect'
import 'wave-effect/dist/wave.css'
const button = document.getElementById("button")
wave(button)
// clear effect
clearEffect(button)API
wave(element: Element, options?: WaveOptions)WaveOptions
interface WaveOptions {
  // current wave effect color
  waveColor?: string 
  // if element includes these className, click doesn't trigger effect
  disabledClass?: string[] 
}Customize Style
you can override less variables to customize style.
@import "~wave-effect/src/wave.less";
@wave-color: red;
@wave-animation-width: 20px;or use css variables.
:root {
  --wave-shadow-color: red;
  --wave-animation-width: 20px;
}Licence
MIT
1.0.0
4 years ago