react-native-pressable-opacity
v1.0.10
Published
A <PressableOpacity> and a supercharged <NativePressableOpacity> components for React Native
Downloads
17,595
Maintainers
Readme
<PressableOpacity>
A component for responding to touches using the new JS Pressability
API.
<PressableOpacity onPress={onBuyPressed} style={styles.buyButton}>
<Text>Buy this Product</Text>
</PressableOpacity>
The following props are supported:
<NativePressableOpacity>
A supercharged <PressableOpacity>
.
Requires
react-native-gesture-handler
andreact-native-reanimated
(v2)
A component for responding to touches using the native TapGestureHandler
without ever going over the JS Bridge. Use this component if you want your Pressables to be able to receive touches, respond to touches, show visual animated feedback (opacity change) and dispatch a callback to JS without using the React Native Thread at all. This component will always be pressable, even when the React Native (JS) Thread freezes because of a heavy JS computation.
⚠️ Warning: This does not work in Modals on Android devices. See software-mansion/react-native-gesture-handler issue #139
<NativePressableOpacity onPress={onBuyPressed} style={styles.buyButton}>
<Text>Buy this Product</Text>
</NativePressableOpacity>
The following props are supported: