Skip to main content

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​

Live Editor
<TouchableOpacity onPress={() => console.log('pressed')}><Text text40>Click Me!</Text></TouchableOpacity>
Result
Loading...

API​

activeBackgroundColor​

Apply background color on TouchableOpacity when active (press is on) string

backgroundColor​

Background color for TouchableOpacity string

customValue​

Custom value of any type to pass on to TouchableOpacity and receive back in onPress callback any

onPress​

On press callback (props?: TouchableOpacityProps & {event: GestureResponderEvent} | any) => void

recorderTag​

Recorder Tag 'mask' | 'unmask'

style​

Custom style ViewStyle

throttleOptions​

Throttle options ThrottleOptions

throttleTime​

Throttle time in MS for onPress callback number

useNative​

Should use an enhanced native implementation with extra features boolean