1 | # react-native-material-ripple
|
2 |
|
3 | Base component for touchable elements
|
4 |
|
5 | ![Example](https://cloud.githubusercontent.com/assets/2055622/23309410/a363975a-fabf-11e6-8cd8-b9c5cca76b63.gif)
|
6 |
|
7 | ## Installation
|
8 |
|
9 | ```bash
|
10 | npm install --save react-native-material-ripple
|
11 | ```
|
12 |
|
13 | ## Usage
|
14 |
|
15 | ```javascript
|
16 | import React, { Component } from 'react';
|
17 | import { Text } from 'react-native';
|
18 | import Ripple from 'react-native-material-ripple';
|
19 |
|
20 | export default class Example extends Component {
|
21 | render() {
|
22 | return (
|
23 | <Ripple onPressOut={ () => null }>
|
24 | <Text>touch me</Text>
|
25 | </Ripple>
|
26 | );
|
27 | }
|
28 | }
|
29 | ```
|
30 |
|
31 | ## Properties
|
32 |
|
33 | * `rippleColor` - Ripple color (default: black)
|
34 | * `rippleOpacity` - Ripple opacity (default: 0.2)
|
35 | * `rippleDuration` - Ripple duration in ms (default: 400)
|
36 | * `rippleSize` - Ripple size restriction (default: 0)
|
37 | * `rippleContainerBorderRadius` - Border radius for ripple container (default: 0)
|
38 |
|
39 | ## Example
|
40 |
|
41 | ```bash
|
42 | git clone https://github.com/n4kz/react-native-material-ripple.git
|
43 | cd react-native-material-ripple
|
44 | npm install
|
45 | react-native run-ios # or run-android
|
46 | ```
|
47 |
|
48 | ## Copyright and License
|
49 |
|
50 | BSD License
|
51 |
|
52 | Copyright 2017 Alexander Nazarov. All rights reserved.
|