New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

material-ripple-effects

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-ripple-effects

Material Design Ripple Effects

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
45K
decreased by-24.25%
Maintainers
1
Weekly downloads
 
Created
Source

material-ripple-effects

Material Design Ripple Effects.

material-ripple-effects makes you able to have Material Design Ripple Effect on any element you want.

material-ripple-effects comes with two colors:
  1. Light
  2. Dark

Installation

Using NPM or Yarn

  1. Install the material-ripple-effects from npm or yarn.
npm i material-ripple-effects

yarn add material-ripple-effects
  1. Import the material-ripple-effects in to your project.
import Ripple from 'material-ripple-effects';
  1. material-ripple-effects works using react events on the element. You need to initialize the Ripple() object first and then use its create() method on the element event.
import React from "react";
import Ripple from 'material-ripple-effects';

export default function Button() {
  const ripple = new Ripple();

  return (
    <>
      <button onMouseUp={(e) => ripple.create(e, 'light')>Material Ripple</button>
      <button onMouseUp={(e) => ripple.create(e, 'dark')>Material Ripple</button>
    </>
  );
}

Using CDN

  1. Add the CDN script of material-ripple-effects in to your HTML file.
<script crossorigin src="https://unpkg.com/material-ripple-effects/ripple.js"></script>
  1. material-ripple-effects cdn works using the data attribute on the element, set the data-ripple-light or data-ripple-dark on the element you want to have material design ripple effect.
<button data-ripple-light="true">Material Ripple</button>
<button data-ripple-dark="true">Material Ripple</button>

Keywords

FAQs

Package last updated on 19 Mar 2021

Did you know?

Socket

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.

Install

Related posts

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