# material-ui-ripple

> Material Ripple core components extracted from material-ui library

Latest version **0.1.0** (published 2021-03-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install material-ui-ripple
pnpm add material-ui-ripple
yarn add material-ui-ripple
bun add material-ui-ripple
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-03-23 |
| First published | 2021-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 48.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Cristian Vasiliev |
| Maintainers | vs.cristian |
| Keywords | react, react component, react ripple, material ripple effect, ripple |

## Links

- npm: https://www.npmjs.com/package/material-ui-ripple
- Repository: https://github.com/Cristians953/material-ui-ripple
- Homepage: https://github.com/Cristians953/material-ui-ripple#readme
- Issues: https://github.com/Cristians953/material-ui-ripple/issues
- npm.io page: https://npm.io/package/material-ui-ripple

## Dependencies (6)

- [clsx](https://npm.io/package/clsx.md) ^1.1.1
- [react](https://npm.io/package/react.md) ^16.8 || ^17.0.x
- [@emotion/react](https://npm.io/package/@emotion/react.md) ^11.1.5
- [@emotion/styled](https://npm.io/package/@emotion/styled.md) ^11.1.5
- [rollup-plugin-terser](https://npm.io/package/rollup-plugin-terser.md) ^7.0.2
- [react-transition-group](https://npm.io/package/react-transition-group.md) ^4.4.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2021-03-23

## README

<h1 align="center">Material UI Ripple</h1>

<p align="center">
    Material UI Ripple is a library with core components extracted from <a href="https://github.com/mui-org/material-ui">material-ui</a> library.
</p>

## Installation

To install the latest version of the library run the following command:

```sh
npm i material-ui-ripple
```

## Usage

The library exports 3 core component - Ripple, TouchRipple and ButtonBase,

The simplest way is to use `ButtonBase` component,
it contains a load of style reset, and some focus/ripple logic.

Example:

```jsx
import { ButtonBase } from 'material-ui-ripple';

function MaterialButton() {
  return (
    <ButtonBase className='my-button'>
      Some Text
    </ButtonBase>
  )
}    
```

Full documentation of component and prop types you can
see on the <a href="https://material-ui.com/api/button-base/#buttonbase-api">official page</a>.


If you want to customize the ripple effect logic you can
use the `TouchRipple` component, from which you can access
the ripple API through the ref.

Example:

```jsx
import { useRef } from 'react';
import { TouchRipple } from 'material-ui-ripple';

function MaterialButton() {
  const rippleRef = useRef(null);
  
  function handleClick() {
    // There are 3 methods by which you can
    // manage the state of the ripple effect
    rippleRef.current.pulsate();
    rippleRef.current.stop();
    rippleRef.current.start();
  }
  
  return (
    <button onClick={handleClick}>
      Some Text
      <TouchRipple />
    </button>
  )
}
```

---
_Source: https://npm.io/package/material-ui-ripple · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
