Basic Pressable
Pressables support an onClick prop for handling click/press interactions. When being pressed, the element will scale down to mimic a real-world button press. If this functionality is not desired, pass the noScaleOnPress prop.
Loading...
Pressable with Transparent Background
Loading...
Block Pressable
Pressables expand to 100% width when the block prop is passed.
Loading...
A11y
On mobile, all AccessibilityProps can be passed, with accessibilityComponentType and accessibilityTraits defaulting to button, and accessibilityState being set based on loading/disabled props.
On web, all ARIA attributes can be passed, with aria-busy being set based on loading/disabled props.
The
asprop allows any component to be used, but be sure you are using semantically correct elements! For example, no clickable divs.