# react-material-ripple

> A Material Ripple ReactJS component

Latest version **0.1.1** (published 2018-07-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-material-ripple
pnpm add react-material-ripple
yarn add react-material-ripple
bun add react-material-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.1 |
| Published | 2018-07-19 |
| First published | 2016-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Gyorgy Gutai |
| Maintainers | gyorgygutai |
| Keywords | react, material, ripple |

## Links

- npm: https://www.npmjs.com/package/react-material-ripple
- Repository: https://github.com/gyorgygutai/react-material-ripple
- Issues: https://github.com/gyorgygutai/react-material-ripple/issues
- npm.io page: https://npm.io/package/react-material-ripple

## 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.1 (latest) — 2018-07-19
- 0.1.0 — 2016-11-14
- 0.0.9 — 2016-11-12
- 0.0.8 — 2016-11-12
- 0.0.7 — 2016-11-12
- 0.0.6 — 2016-11-12
- 0.0.5 — 2016-11-12
- 0.0.4 — 2016-11-12
- 0.0.3 — 2016-11-12
- 0.0.2 — 2016-11-12
- 0.0.1 — 2016-11-12

## README

# react-material-ripple

A ReactJS component to make awesome components with ripples.

![alt tag](https://raw.githubusercontent.com/gyorgygutai/react-material-ripple/master/preview.gif)

## Installation

It can be installed as an [npm package](https://www.npmjs.org/package/react-material-ripple):

```bash
$ npm install --save react-material-ripple
```

## Why another ripple component?

All other solutions I used try doing some magic with binding to touchStart, touchEnd which is good for response time, but didn't work for me in real life applications, because they show the ripples `on scroll` which is bad UX and causes scroll performance issues. This one just simply listens to `onClick`.

Also, I'd like to have this feature without a full-featured material library that has all the bells and whistles.

## Basic usage

Import the `Ripple` component and pass your content as the single child:

```js
import React from 'react'
import Ripple from 'react-material-ripple'

(
	<Ripple>
      <div>
        A div with some text.
      </div>
    </Ripple>
)
```

You can also apply css to the wrapper if your wrapped component has an unusual shape. `overflow: hidden` is applied by default to contain the ripple, but there are cases you need to do more.

An example with a rounded button:

```js
import React from 'react'
import Ripple from 'react-material-ripple'

(
	<Ripple style={{borderRadius: '10px'}}>
      <button className="button-rounded-10">
        Click me
      </button>
    </Ripple>
)

// of course you can also use a class
(
	<Ripple className="ripple-rounded">
      <button className="button-rounded">
        Click me
      </button>
    </Ripple>
)
```

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