Package Exports
- react-native-material-ripple
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-material-ripple) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-native-material-ripple
Base component for touchable elements
Installation
npm install --save react-native-material-ripple
Usage
import React, { Component } from 'react';
import { Text } from 'react-native';
import Ripple from 'react-native-material-ripple';
export default class Example extends Component {
render() {
return (
<Ripple onPress={ () => null }>
<Text>touch me</Text>
</Ripple>
);
}
}
Properties
rippleColor
- Ripple color (default: black)rippleOpacity
- Ripple opacity (default: 0.3)rippleDuration
- Ripple duration in ms (default: 400)rippleSize
- Ripple size restriction (default: 0)rippleContainerBorderRadius
- Ripple container border radius (default: 0)rippleCentered
- Ripple always starts from center (default: false)disabled
- Ripple should ignore touches (default: false)onPressIn
- Touch moved in or started callbackonPressOut
- Touch moved out or terminated callbackonPress
- Touch up inside bounds callback
Example
git clone https://github.com/n4kz/react-native-material-ripple.git
cd react-native-material-ripple/example
npm install
react-native run-ios # or run-android
Copyright and License
BSD License
Copyright 2017 Alexander Nazarov. All rights reserved.