TouchableWithoutFeedback

Do not use unless you have a very good reason. All elements that respond to press should have a visual feedback when touched.

TouchableWithoutFeedback supports only one child. If you wish to have several child components, wrap them in a View.

Props

Type Definitions


Reference

Props

hitSlop

This defines how far your touch can start away from the button. This is added to pressRetentionOffset when moving off of the button. ** NOTE ** The touch area never extends past the parent view bounds and the Z-index of sibling views always takes precedence if a touch hits two overlapping views.

TypeRequired
object: {top: number, left: number, bottom: number, right: number}No

accessibilityComponentType

> Note: accessibilityComponentTypewill soon be deprecated. When possible, use accessibilityRole and accessibilityStates instead.

TypeRequired
AccessibilityComponentTypesNo

accessibilityHint

An accessibility hint helps users understand what will happen when they perform an action on the accessibility element when that result is not obvious from the accessibility label.

TypeRequired
stringNo

accessibilityLabel

Overrides the text that's read by the screen reader when the user interacts with the element. By default, the label is constructed by traversing all the children and accumulating all the Text nodes separated by space.

TypeRequired
nodeNo

accessibilityRole

TypeRequired
AccessibilityRolesNo

accessibilityStates

TypeRequired
array of AccessibilityStatesNo

accessibilityTraits

> Note: accessibilityTraitswill soon be deprecated. When possible, use accessibilityRole and accessibilityStates instead.

TypeRequired
AccessibilityTraits, ,array of AccessibilityTraitsNo

accessible

TypeRequired
boolNo

delayLongPress

Delay in ms, from onPressIn, before onLongPress is called.

TypeRequired
numberNo

delayPressIn

Delay in ms, from the start of the touch, before onPressIn is called.

TypeRequired
numberNo

delayPressOut

Delay in ms, from the release of the touch, before onPressOut is called.

TypeRequired
numberNo

disabled

If true, disable all interactions for this component.

TypeRequired
boolNo

onBlur

Invoked when the item loses focus.

TypeRequired
functionNo

onFocus

Invoked when the item receives focus.

TypeRequired
functionNo

onLayout

Invoked on mount and layout changes with

{nativeEvent: {layout: {x, y, width, height}}}

TypeRequired
functionNo

onLongPress

TypeRequired
functionNo

onPress

Called when the touch is released, but not if cancelled (e.g. by a scroll that steals the responder lock).

TypeRequired
functionNo

onPressIn

Called as soon as the touchable element is pressed and invoked even before onPress. This can be useful when making network requests.

TypeRequired
functionNo

onPressOut

Called as soon as the touch is released even before onPress.

TypeRequired
functionNo

pressRetentionOffset

When the scroll view is disabled, this defines how far your touch may move off of the button, before deactivating the button. Once deactivated, try moving it back and you'll see that the button is once again reactivated! Move it back and forth several times while the scroll view is disabled. Ensure you pass in a constant to reduce memory allocations.

TypeRequired
object: {top: number, left: number, bottom: number, right: number}No

Type Definitions

Event

Type
Object