Property

LocalRippleConfiguration

CompositionLocal used for providing RippleConfiguration down the tree.

Source set: Common
val LocalRippleConfiguration: ProvidableCompositionLocal<RippleConfiguration?>

CompositionLocal used for providing RippleConfiguration down the tree. This acts as a tree-local 'override' for ripples used inside components that you cannot directly control, such as to change the color of a specific component's ripple, or disable it entirely by providing null.

In most cases you should rely on the default theme behavior for consistency with other components. This exists as an escape hatch for individual components and is not intended to be used for full theme customization across an application. For this use case you should instead build your own custom ripple that queries your design system theme values directly using createRippleModifierNode.

The ripple configuration is resolved as follows:

  • LocalRippleThemeConfiguration provides the highest-level theming configuration for ripples, including whether the focus indication is drawn by inset focus rings.
  • LocalRippleConfiguration provides hierarchical per-ripple configuration for ripple, including disabling ripples and their indications. This takes next highest priority.
  • ripple parameters allow specifying configuration for individual indication callsites in components.

Last updated: