4 `paper-ripple` provides a visual effect that other paper elements can
5 use to simulate a rippling effect emanating from the point of contact. The
6 effect can be visualized as a concentric circle with motion.
11 <paper-ripple></paper-ripple>
14 `paper-ripple` listens to "mousedown" and "mouseup" events so it would display ripple
15 effect when touches on it. You can also defeat the default behavior and
16 manually route the down and up actions to the ripple element. Note that it is
17 important if you call downAction() you will have to make sure to call
18 upAction() so that `paper-ripple` would end the animation loop.
23 <paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple>
26 downAction: function(e) {
27 this.$.ripple.downAction({x: e.x, y: e.y});
29 upAction: function(e) {
30 this.$.ripple.upAction();
35 Styling ripple effect:
37 Use CSS color property to style the ripple:
45 Note that CSS color property is inherited so it is not required to set it on
46 the `paper-ripple` element directly.
49 By default, the ripple is centered on the point of contact. Apply the ``recenters`` attribute to have the ripple grow toward the center of its container.
52 <paper-ripple recenters></paper-ripple>
55 Apply `center` to center the ripple inside its container from the start.
58 <paper-ripple center></paper-ripple>
61 Apply `circle` class to make the rippling effect within a circle.
64 <paper-ripple class="circle"></paper-ripple>