Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
A small Javascript library for ripple effects
####View a demo here
1. At the root of your index, type npm install ripple-js
into the command line.
2. Add the tag <script src="node_modules/ripple-js/ripple.min.js"></script>
to your index file.
1. Download the project as zip from github.
2. Extract the file and move the folder to your project.
3. Add the tag script src="ripple-js-master/ripple-js-master/ripple.min.js"></script>
to your index file.
Then simply add the class ripple to elements
To customize the ripple effect you can set the following tags on your ripple elements:
°Corresponds to the css background
property. You can set it to a color, a gradient or even a picture.
°Examples: ripple-background="#FF8C00"
, ripple-background="radial-gradient(red, yellow, green)"
, ripple-background="url('some-image.jpg')"
°Default Value: white
°Corresponds to the css opacity
property. Set it to a numerical value between 0 and 1, where 0 means full transparency and 1 no transparency
°Example: ripple-opacity="0.7"
°Default value: 0.6
°Corresponds to the css box-shadow
property.
°Example: ripple-shadow="box-shadow: 0px 0px 25px 2px rgba(112,112,112,0.63)"
°Default value: none
°The unit of measurement is seconds.
°Example: ripple-press-expand-time="10"
°Default value: 3
°The unit of measurement is seconds.
°Example: ripple-release-expand-time="1.5"
°Default value: 0.4
°The unit of measurement is seconds.
°Example: ripple-leave-collapse-time=".8"
°Default Value: 0.4
###Methods
°If you add ripple elements after the document has loaded, you then need to call this function. The function gets called auomatically on initial load.
°Example:
document.body.innerHTML += '<div class="ripple">Added Afterwards</div>';
ripple.registerRipples();
###Events
The only parameter is target
, which is the element that got clicked
To unregister an element, simply remove the ripple
class.
FAQs
A small library for ripple effects
The npm package ripple-js receives a total of 25 weekly downloads. As such, ripple-js popularity was classified as not popular.
We found that ripple-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.