[General] Change Touchable default underlay props - #4164
Merged
j-piasecki merged 8 commits intoMay 11, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes the default underlay behavior of the v3 Touchable component to make “RectButton-like” usage more intuitive, and updates migration/docs/examples accordingly.
Changes:
- Updates
Touchabledefaults (underlayColorto transparent,activeUnderlayOpacityto0.105) and forwardsactiveUnderlayOpacityto the native button. - Updates migration guidance and docs to recommend
underlayColor="black"forRectButton-like behavior. - Updates the common-app
Touchableexample to reflect the new recommended usage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| skills/gesture-handler-3-migration/SKILL.md | Updates button migration guidance to use underlayColor="black" for RectButton replacement. |
| packages/react-native-gesture-handler/src/v3/components/Touchable/Touchable.tsx | Adjusts default underlay props and passes activeUnderlayOpacity through to GestureHandlerButton. |
| packages/docs-gesture-handler/docs/components/touchable.mdx | Updates RectButton migration snippet to use underlayColor="black". |
| apps/common-app/src/new_api/components/touchable/index.tsx | Updates the example usage to match the new recommended props. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
m-bert
approved these changes
May 11, 2026
m-bert
left a comment
Collaborator
There was a problem hiding this comment.
I've mixed feelings about it, currently it's like having animation, but not really since it is transparent. But on the other hand I guess the same can be said about default underlayColor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changes the default props of
Touchablecomponent:underlayColor: black -> transparentRectButton)This way, in order to replicate the
RectButton, the usage is:instead of
which seems more intuitive.
Test plan
Updated
Touchableexample