0.0.2 • Published 3 years ago

2yy-ngx-ripple v0.0.2

Weekly downloads
33
License
MIT
Repository
github
Last release
3 years ago

NgxRipple

CI Maintainability Test Coverage

Installation

npm i 2yy-ngx-ripple

Motivation

By default, Ripples triggered by click event.

But, if you want trigger Ripples by mouseenter event, you can achieve it with NgxRippleService.

Usage

In your foo.component.ts:

@ViewChild('btn', {read: MatRipple}) btnRef: MatRipple;

constructor(public rippleService: NgxRippleService) {}

Then, in your foo.component.html:

<button #btn matRipple (mouseenter)="rippleService.show(btnRef)" (mouseleave)="rippleService.hide(btnRef)">My Button</button>

License

MIT License