Skip to content

feat: remove customRippleColor from components#4899

Open
adrcotfas wants to merge 1 commit into@adrcotfas/fix/ripplefrom
@adrcotfas/feat/remove_custom_ripple_color
Open

feat: remove customRippleColor from components#4899
adrcotfas wants to merge 1 commit into@adrcotfas/fix/ripplefrom
@adrcotfas/feat/remove_custom_ripple_color

Conversation

@adrcotfas
Copy link
Copy Markdown
Collaborator

@adrcotfas adrcotfas commented Apr 15, 2026

Motivation

  • We're modernizing Paper to support PlatformColor for Dynamic Themes without native modules which does not support applying an alpha to it, something required for the current implementation of ripple color.
  • Dynamic Themes using PlatformColor and custom ripple color is not compatible.
  • MD3 guidelines specify that ripple color is derived from the content color, not a custom color so the question "why do we need to support that" comes to mind.
  • The current ripple implementation in components like Button, IconButton, SearchBar, Chip etc does not follow the MD3 guidelines.
  • The native Jetpack Compose library does not support adding a custom ripple color without some special CompositionLocalProvider config so custom ripples are not encouraged.
  • In MD3, the default ripple color is using a 0.1 alpha applied to a neutral color. Per specs, some components like Button need a 0.1 alpha applied to a primary/tertiary color. At this opacity it's hard to distinguish the neutral from the primary ripple and we don't have a choice when using PlatformColor anyway.
  • I've proposed extending android_ripple to support PlatformColor and an alpha that will allow Paper to follow the MD3 ripple specs for all components: feat(Pressable): add support for PlatformColor and alpha facebook/react-native#56395.
  • These are the reasons I'm proposing we drop the custom ripple color and make our life easier for the next steps.

Order of merging:

Related issue

Test plan

Run the example app and observe the ripple color for components; Button for example will have a slightly different tint.

@github-actions
Copy link
Copy Markdown

The mobile version of example app from this branch is ready! You can see it here.

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.

1 participant