1.0.9 • Published 2 years ago

ripple-anything v1.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

ripple-anything.js

NPM Package Build Size

Add click ripple effect to any HTMLElement

just like material ui ripple, easy use, all browser supported, TypeScript supported

play on stackblitz

Demo

Usage

html

<script src="./dist/index.js"></script>
<div onclick="rippleAnything(event)">i am a button</div>

react

import rippleAnything from "./index";

const Com = () => <div
    onclick={(e) => {
        e.persist() // maybe need do this
        rippleAnything(e as unknown as MouseEvent)
    }}>
    i am a button
</div>

angular

<div (click)="rippleAnything($event)">i am a button</div>

vue

<template>
  <div @click="rippleAnything">i am a button</div>
</template>
<script>
import rippleAnything from "ripple-anything";

export default {
  methods: {
    rippleAnything
  }
}
</script>
1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago