1.0.3 • Published 1 year ago

@cmdjs/material-ripple-effects v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago