1.0.3 • Published 12 months ago

@cmdjs/material-ripple-effects v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

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 or Pnpm

  1. Install the material-ripple-effects from npm or yarn or pnpm.
npm i @cmdjs/material-ripple-effects
yarn add @cmdjs/material-ripple-effects
pnpm add @cmdjs/material-ripple-effects
  1. Import the material-ripple-effects in to your project.
import Ripple from '@cmdjs/material-ripple-effects';
  1. use in React.
import React from "react";
import Ripple from '@cmdjs/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>
    </>
  );
}
  1. use in Svelte.
<script lang="ts">
import Ripple from '@cmdjs/material-ripple-effects';

const ripple = new Ripple();
</script>

<button on:click={(e) => ripple.create(e, "light")}>Material Ripple</button>
<button on:click={(e) => ripple.create(e, "dark")}>Material Ripple</button>
1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago