Skip to content
📱☝️React Native Touchable with native look & feel
Branch: master
Clone or download
Latest commit dcc46f5 Jul 11, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
.gitignore Base template Jul 3, 2019
README.md
index.js
package.json Base template Jul 3, 2019

README.md

Native Touchable for React Native

implements a look and feel for Touchables in React Native. It display material design ripples on Android, and Opacity effect on iOS.

this Touchable isn't native, it's a fork of react-native-material-ripple by @n4kz

install

npm i -s native-touchable

implementation

import Touchable from 'native-touchable'

render () {
  return (
    <View>
      
      <Touchable onPress={ ... }>
        <Text>Do something!</Text>
      </Touchable>
      
    </View>
  )
}

props

This component inherits from TouchableOpacity and can use all his props (onPress, onPressIn, activeOpacity, etc.), btw can use all props from @n4kz/react-native-material-ripple too. But I decide to rename some props just for confortability.

prop type default description
waves boolean true in Android, false in iOS force ripple render on iOS
size number 0 (means auto size) wave size, when it's 0 size is calc in auto
hint string #000 wave color
alpha number 0.3 wave opacity
radius number calc from styles borderRadius property or 0 border radius from wave overflow container
centered boolean false ripple always starts from center
duration number 600 ripple duration in ms
You can’t perform that action at this time.