TouchableOpacity
TouchableOpacity is a component in React Native that provides a built-in press feedback by dimming the opacity of its child content when pressed. It is commonly used to make views and content respond visually to user interaction without requiring a custom animation.
As a wrapper component, it responds to touch events such as onPress, onLongPress, onPressIn, and onPressOut.
Key props include onPress, onLongPress, onPressIn, onPressOut, activeOpacity, delayPressIn, delayLongPress, delayPressOut, disabled, style, and various accessibility-related
Usage notes: TouchableOpacity can wrap any single child element, such as text, an image, or a composite
Related components include TouchableHighlight, which provides a highlight color on press, and TouchableWithoutFeedback, which handles presses