Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
Pressable is a Core Component wrapper that can detect various stages of press interactions on any of its defined children.

How it works

On an element wrapped by Pressable:
  • onPressIn is called when a press is activated.
  • onPressOut is called when the press gesture is deactivated.
After pressing onPressIn, one of two things will happen:
  1. The person will remove their finger, triggering onPressOut followed by onPress.
  2. If the person leaves their finger longer than 500 milliseconds before removing it, onLongPress is triggered. (onPressOut still fires when they remove their finger.)
Diagram of the onPress events in sequence. Fingers are not the most precise instruments, and it is common for users to accidentally activate the wrong element or miss the activation area. To help, Pressable has an optional HitRect you can use to define how far a touch can register away from the wrapped element. Presses can start anywhere within a HitRect. PressRect allows presses to move beyond the element and its HitRect while maintaining activation and being eligible for a “press”—think of sliding your finger slowly away from a button you’re pressing down on. 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. Diagram of HitRect and PressRect and how they work. Pressable uses React Native’s Pressability API. For more information around the state machine flow of Pressability and how it works, check out the implementation for Pressability.

Example

Props

children

Either children or a function that receives a boolean reflecting whether the component is currently pressed.

unstable_pressDelay

Duration (in milliseconds) to wait after press down before calling onPressIn.

delayLongPress

Duration (in milliseconds) from onPressIn before onLongPress is called.

disabled

Whether the press behavior is disabled.

hitSlop

Sets additional distance outside of element in which a press can be detected.

onHoverIn

Called when the hover is activated to provide visual feedback.

onHoverOut

Called when the hover is deactivated to undo visual feedback.

onLongPress

Called if the time after onPressIn lasts longer than 500 milliseconds. This time period can be customized with delayLongPress.

onPress

Called after onPressOut.

onPressIn

Called immediately when a touch is engaged, before onPressOut and onPress.

onPressOut

Called when a touch is released.

pressRetentionOffset

Additional distance outside of this view in which a touch is considered a press before onPressOut is triggered.

style

Either view styles or a function that receives a boolean reflecting whether the component is currently pressed and returns view styles.

testOnly_pressed

Used only for documentation or testing (e.g. snapshot testing).

alexaEntityType

alexaEntityType represents the value for the type of object that needs to be considered by Alexa UIController Interface. This is an optional prop and specific to Alexa UIController Interface support, it maps to the entity.type field from the Alexa UIController Interface (Alexa UIController API doc)

alexaExternalIds

This is an optional prop and specific to Alexa UIController Interface support, it maps to the entity.ExternalIds field from the Alexa UIController Interface (Alexa UIController API doc) entity.ExternalIds are the identifiers for this entity unique within the scope of this endpoint. The entity.externalIds field are opaque to Alexa and are only used to include in directives from Alexa. The identifiers reported in entity.externalIds are required to be understood by the endpoint on all directive commands that accept an entity structure.

ariaPosInSet

The value for ariaPosInSet refers to the number of the element when the user can refer to the element by number, such as “Alexa, select number one.” This prop is required if the app wants to allow user to perform voice selection based on the number. Note that providing the prop with a value does not result in the value being rendered automatically from the component, for a consistent user behavior, app needs to render the same ordinal value for the item.

aria-label

aria-label is an accessibility prop. You can use it to specify the name of the item in voice selection, such as “Alexa, select Prime Video”. This prop is required if the app needs to allow the user to perform voice selection based on the name. Note: Providing the prop with a value does not result in the value being rendered as the title of the component, the app must explictly render the same text value for the item.

ariaLabel

Deprecated. Use aria-label instead. The value for ariaLabel refers to the name of the item, such as “Alexa, select Prime Video”. This prop is required if the app wants to allow user to perform voice selection based on the name. Note: Providing the prop with a value does not result in the value being rendered as the title of the component, the app must explictly render the same text value for the item.

keplerAltLabels - Vega Only

The value for keplerAltLabels refers to the list of alternate names for the item. Note: This property replaces keplerAtlLabels. keplerAtlLabels is deprecated and will be removed in a future release. This prop is required if the app wants to allow user to perform voice selection on the same item with different names.
Last modified on December 10, 2025