# react-native-material-ripple

> Base component for touchable elements

Latest version **0.9.1** (published 2019-09-26) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install react-native-material-ripple
pnpm add react-native-material-ripple
yarn add react-native-material-ripple
bun add react-native-material-ripple
```

## Health

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

Positive: has types package; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.1 |
| Published | 2019-09-26 |
| First published | 2017-02-24 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | separate (@types/react-native-material-ripple) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 413 |
| Author | Alexander Nazarov |
| Maintainers | n4kz |
| Keywords | react, react-component, react-native, ios, android, ripple, material |

## Links

- npm: https://www.npmjs.com/package/react-native-material-ripple
- Repository: https://github.com/n4kz/react-native-material-ripple
- npm.io page: https://npm.io/package/react-native-material-ripple

## Dependencies (1)

- [prop-types](https://npm.io/package/prop-types.md) ^15.5.10

## 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.9.1 (latest) — 2019-09-26
- 0.9.0 — 2019-09-13
- 0.8.0 — 2018-02-13
- 0.7.5 — 2017-09-14
- 0.7.4 — 2017-07-26
- 0.7.3 — 2017-07-15
- 0.7.2 — 2017-05-15
- 0.7.0 — 2017-05-06
- 0.6.0 — 2017-04-25
- 0.5.0 — 2017-04-08
- 0.4.6 — 2017-04-08
- 0.4.5 — 2017-03-26
- 0.4.4 — 2017-03-20
- 0.4.3 — 2017-03-16
- 0.4.2 — 2017-03-10
- … 6 more at https://npm.io/package/react-native-material-ripple/versions

## README

[npm-badge]: https://img.shields.io/npm/v/react-native-material-ripple.svg?colorB=ff6d00
[npm-url]: https://npmjs.com/package/react-native-material-ripple
[license-badge]: https://img.shields.io/npm/l/react-native-material-ripple.svg?colorB=448aff
[license-url]: https://raw.githubusercontent.com/n4kz/react-native-material-ripple/master/license.txt
[codeclimate-badge]: https://img.shields.io/codeclimate/maintainability/n4kz/react-native-material-ripple.svg
[codeclimate-url]: https://codeclimate.com/github/n4kz/react-native-material-ripple
[example-url]: https://cloud.githubusercontent.com/assets/2055622/24832328/459afaf0-1cb6-11e7-975d-accedb67a716.gif
[touchable]: https://facebook.github.io/react-native/docs/touchablewithoutfeedback.html

# react-native-material-ripple

[![npm][npm-badge]][npm-url]
[![license][license-badge]][license-url]
[![codeclimate][codeclimate-badge]][codeclimate-url]

Base component for touchable elements

![example][example-url]

## Features

* Easy to use
* Configurable
* Consistent look and feel on iOS and Android
* Can be used as drop-in replacement for [TouchableWithoutFeedback][touchable]
* Pure javascript implementation
* RTL Support

## Installation

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

## Usage

```javascript
import React, { Component } from 'react';
import { Text } from 'react-native';
import Ripple from 'react-native-material-ripple';

class Example extends Component {
  render() {
    return (
      <Ripple>
        <Text>touch me</Text>
      </Ripple>
    );
  }
}
```

## Properties

 name                        | description                            | type     | default
:--------------------------- |:-------------------------------------- | --------:|:------------
 rippleColor                 | Ripple color                           |   String | rgb(0, 0, 0)
 rippleOpacity               | Ripple opacity                         |   Number | 0.3
 rippleDuration              | Ripple duration in ms                  |   Number | 400
 rippleSize                  | Ripple size restriction                |   Number | 0
 rippleContainerBorderRadius | Ripple container border radius         |   Number | 0
 rippleCentered              | Ripple always starts from center       |  Boolean | false
 rippleSequential            | Ripple should start in sequence        |  Boolean | false
 rippleFades                 | Ripple fades out                       |  Boolean | true
 disabled                    | Ripple should ignore touches           |  Boolean | false
 onPressIn                   | Touch moved in or started callback     | Function | -
 onPressOut                  | Touch moved out or terminated callback | Function | -
 onPress                     | Touch up inside bounds callback        | Function | -
 onLongPress                 | Touch delayed after onPressIn callback | Function | -
 onRippleAnimation           | Animation start callback               | Function | -

Other [TouchableWithoutFeedback][touchable] properties will also work

## Example

```bash
git clone https://github.com/n4kz/react-native-material-ripple
cd react-native-material-ripple/example
npm install
react-native run-ios # or run-android
```

## Copyright and License

BSD License

Copyright 2017-2018 Alexander Nazarov. All rights reserved.

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