Skip to main content

TouchableWithoutFeedback

Adds press handling to its only child. It renders no element of its own and shows no feedback. The press handling is the same as on Pressable.

import { Text, TouchableWithoutFeedback, View } from 'react-native'

export function Card({ onOpen }) {
return (
<TouchableWithoutFeedback role="button" onPress={onOpen}>
<View>
<Text>Open</Text>
</View>
</TouchableWithoutFeedback>
)
}

The child must be one element that passes its props to the DOM, for example a View or a Text. Your own component works when it passes the props on to a View.

What the child gets​

  • The press handlers. The child's own DOM handlers run first, for example its onPointerDown.
  • The accessibility props, role, testID, nativeID, id, and onLayout of the TouchableWithoutFeedback. style stays out, as on native.
  • onFocus and onBlur of the TouchableWithoutFeedback. Without them, the child keeps its own.
  • focusable: as on native, the child is in the tab order only with onPress, and not when disabled.

Props​

PropOn the web
onPress, onPressIn, onPressOut, onLongPressAs on Pressable. There's no minimum press duration, as on native.
delayPressIn, delayPressOut, delayLongPressThe press delays, in milliseconds.
disabledSets aria-disabled on the child, takes it out of the tab order, and stops every press.
pressRetentionOffsetAs on Pressable.
hitSlopThe child gets it. A View doesn't grow its hit area yet, so it only extends the press area.
rejectResponderTerminationThe web ignores it: there's no element of its own to set touch-action on.
touchSoundDisabledNative only. Accepted and ignored.