npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

softripple-js

v1.2.1

Published

A small library to for creating soft ripples

Downloads

36

Readme

Soft Ripple

A small Javascript library to create soft ripple interaction

Check the demos: here

Installation

You can install softripple-js in your project via npm

npm install --save softripple-js

Or load the ES module directly

<script src="https://unpkg.com/softripple-js/dist/softripple.min.js"></script>

Usage

It's pretty easy to use. Just import the package an declare SoftRipple with the element you want the ripple effect to take place.

const rippleEffect = new SoftRipple(el);

Also you can add effect to multiple elements at once.

const el1 = document.getElementById("el1");
const el2 = document.getElementById("el2");
const rippleEffect = new SoftRipple([el1, el2]);

You can also pass in options as the second argument which needs to be an object.

const rippleEffect = new SoftRipple(el, { options });

Options

To customize the ripple effect you can use the following properties, and then pass them as an object as the second argument of the constructor.

rippleColor

A String representing the color of the ripple. Defaults to the background-color of the element.

transitionDuration

Duration of the transition in seconds. Default is 0.8s. minimum is 0.4 seconds and max is 2 seconds.

rippleWidth

Width of the ripple. Defaults to 4. minimum is 2 and max is 8.

rippleMaxSize

Maximum size of the ripple. Defaults to 100. minimum is 50 and max is 200.

randomSize

Boolean property to set random size of the ripples. Default value is false.

randomColor

Boolean property to set random color of the ripples. Default value is false.

overrideDefaults

Boolean property to override the defaults. Default value is false.