Skip to content

fix(touchable-ripple): use the MD3 hover opacity on web - #5320

Open
Priyanshu0007 wants to merge 1 commit into
callstack:mainfrom
Priyanshu0007:fix/touchable-ripple-hover-opacity
Open

Priyanshu0007 wants to merge 1 commit into
callstack:mainfrom
Priyanshu0007:fix/touchable-ripple-hover-opacity

Conversation

@Priyanshu0007

Copy link
Copy Markdown

Motivation

On web, TouchableRipple's hover layer halved the ripple opacity, so IconButton, Button and the default TouchableRipple hovered at 0.05, not MD3's 0.08. It now scales by the hovered/pressed tokens (0.08/0.1). A custom rippleColor hovers at 0.8× its opacity. Native is unchanged.

Related issue

Fixes #5308

Screenshots / Videos

Web (before 0.05 → after 0.08)
https://github.com/user-attachments/assets/47bc50af-40ef-460c-8114-3b625fe858aa
https://github.com/user-attachments/assets/f2e96243-76b0-4b20-92a7-40806f8f43e6

iOS (unchanged)
https://github.com/user-attachments/assets/052aa683-b5fe-4063-9809-d427335db392
https://github.com/user-attachments/assets/810e7f2f-a05d-40b6-ae50-b59ac31343e5

Android (unchanged)
https://github.com/user-attachments/assets/274bb503-2868-41ed-8659-2b0bc5169183
https://github.com/user-attachments/assets/76c580dd-5a80-49c8-8e06-be574cbb0890

Test plan

On web, hover a tonal IconButton: its background is the icon color at 0.08.

The web hover layer halved the ripple's alpha, so a content ripple at
the pressed opacity (0.1) hovered at 0.05. Scale it by the hovered to
pressed ratio instead, giving the content color at 0.08.

Fixes callstack#5308
@Doberjohn Doberjohn added this to the 6.1.0 milestone Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TouchableRipple: on web the hover layer is the content color at 0.05 instead of the M3 0.08

2 participants