[apple] Handle hover in Touchable #4283
Open
m-bert wants to merge 14 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds native hover-driven visual state support to the Touchable/RNGestureHandlerButton implementation on Apple platforms (iOS + macOS), aligning behavior with the existing web hover model and avoiding flicker during hover→press transitions.
Changes:
- Extends the native button codegen spec with hover-related props (opacity/scale/underlay + hover in/out durations).
- Implements hover tracking + animation orchestration in the Apple native button (iOS hover recognizer; macOS tracking area).
- Updates public TS/JSDoc and docs to reflect hover availability (partial).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/react-native-gesture-handler/src/specs/RNGestureHandlerButtonNativeComponent.ts | Adds hover-related native props to the shared codegen spec. |
| packages/react-native-gesture-handler/src/components/GestureHandlerButton.tsx | Updates JSDoc platform notes for hover props. |
| packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm | Wires new hover props from Fabric props into the native button view. |
| packages/react-native-gesture-handler/apple/RNGestureHandlerButton.mm | Implements hover state tracking + hover/press animation coordination for iOS/macOS. |
| packages/react-native-gesture-handler/apple/RNGestureHandlerButton.h | Exposes hover properties/durations on the native button. |
| packages/docs-gesture-handler/docs/components/touchable.mdx | Updates docs to mention hover on iOS (and hover timing text). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
j-piasecki
reviewed
Jun 26, 2026
## Description This PR removes obsolete version checks from our `iOS` codebase. Minimal targets for iOS and macOS were chosen based on supported versions. tvOS was changed to match iOS ## Test plan Checked that example apps (basic and macos) are built correctly,
…ion/react-native-gesture-handler into @mbert/touchable-hover-ios
Touchable Touchable
j-piasecki
reviewed
Jun 30, 2026
Collaborator
Author
|
I've also trimmed comments, following android PR. |
j-piasecki
approved these changes
Jul 1, 2026
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
Follow up for Android PR which brings hover animations to iOS, macOS and tvOS platforms.
Of course docs/jsdoc will have to be unified between them, it will be done after merging either of these.
Test plan
Tested on existing Touchable example and the code below: