TouchableOpacity
A wrapper for TouchableOpacity component. Support onPress, throttling and activeBackgroundColor
(code example)
info
This component extends TouchableOpacity props.
tip
This component support margins, paddings, alignments, background, borderRadius modifiers.
#
Usage<TouchableOpacity onPress={() => console.log('pressed')}/>
#
API#
activeBackgroundColorApply background color on TouchableOpacity when active (press is on)
string
#
backgroundColorBackground color for TouchableOpacity
string
#
customValueCustom value of any type to pass on to TouchableOpacity and receive back in onPress callback
any
#
onPressOn press callback
(props?: TouchableOpacityProps & {event: GestureResponderEvent} | any) => void
#
recorderTagRecorder Tag
'mask' | 'unmask'
#
styleCustom style
ViewStyle
#
throttleOptionsThrottle options
ThrottleOptions
#
throttleTimeThrottle time in MS for onPress callback
number
#
useNativeShould use an enhanced native implementation with extra features
boolean