Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polymer/paper-ripple

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymer/paper-ripple - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

37

package.json
{
"name": "@polymer/paper-ripple",
"version": "0.0.3",
"flat": true,
"version": "0.0.4",
"description": "Adds a material design ripple to any container",
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/paper-ripple.git"
},
"contributors": [
"The Polymer Authors"
],
"keywords": [

@@ -14,20 +14,13 @@ "web-components",

],
"contributors": [
"The Polymer Authors"
],
"license": "BSD-3-Clause",
"main": "paper-ripple.html",
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/paper-ripple.git"
},
"license": "SEE LICENSE IN http://polymer.github.io/LICENSE.txt",
"dependencies": {
"@polymer/polymer": "^1.2.5-npm-test.2",
"@polymer/iron-a11y-keys-behavior": "^0.0.3"
"@polymer/iron-a11y-keys-behavior": "gloo",
"@polymer/polymer": "gloo"
},
"devDependencies": {
"@polymer/iron-component-page": "^0.0.3",
"@polymer/iron-icon": "^0.0.3",
"@polymer/iron-icons": "^0.0.3",
"@polymer/paper-styles": "^0.0.3",
"@polymer/test-fixture": "^0.0.3",
"web-component-tester": "^4.0.0",
"webcomponents.js": "^0.7.0",
"@polymer/iron-test-helpers": "^0.0.3"
}
}
"devDependencies": {}
}

@@ -0,20 +1,3 @@

[![Build status](https://travis-ci.org/PolymerElements/paper-ripple.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-ripple)
<!---
This README is automatically generated from the comments in these files:
paper-ripple.html
Edit those files, and our readme bot will duplicate them over here!
Edit this file, and the bot will squash your changes :)
The bot does some handling of markdown. Please file a bug if it does the wrong
thing! https://github.com/PolymerLabs/tedium/issues
-->
[![Build Status](https://travis-ci.org/PolymerElements/paper-ripple.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-ripple)
_[Demo and API Docs](https://elements.polymer-project.org/elements/paper-ripple)_
##&lt;paper-ripple&gt;

@@ -28,64 +11,31 @@

Example:
```html
<div style="position:relative">
<paper-ripple></paper-ripple>
</div>
<!---
```
Note, it's important that the parent container of the ripple be relative position, otherwise
the ripple will emanate outside of the desired container.
`paper-ripple` listens to "mousedown" and "mouseup" events so it would display ripple
effect when touches on it. You can also defeat the default behavior and
manually route the down and up actions to the ripple element. Note that it is
important if you call `downAction()` you will have to make sure to call
`upAction()` so that `paper-ripple` would end the animation loop.
Example:
```html
<paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple>
...
downAction: function(e) {
this.$.ripple.downAction({detail: {x: e.x, y: e.y}});
},
upAction: function(e) {
this.$.ripple.upAction();
}
<custom-element-demo>
<template>
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="paper-ripple.html">
<style is="custom-style">
div {
height: 100px;
width: 100%;
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24);
}
paper-ripple {
color: #4285f4;
}
</style>
<next-code-block></next-code-block>
</template>
</custom-element-demo>
```
Styling ripple effect:
Use CSS color property to style the ripple:
```css
paper-ripple {
color: #4285f4;
}
```
Note that CSS color property is inherited so it is not required to set it on
the `paper-ripple` element directly.
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.
-->
```html
<paper-ripple recenters></paper-ripple>
<div style="position: relative">
<paper-ripple></paper-ripple>
</div
```
You can also center the ripple inside its container from the start.
```html
<paper-ripple center></paper-ripple>
```
Apply `circle` class to make the rippling effect within a circle.
```html
<paper-ripple class="circle"></paper-ripple>
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc