RippleConfiguration


Local per-ripple configuration for the ripple appearance, provided using LocalRippleConfiguration. In most cases the default values should be used, for custom design system use cases you should instead build your own custom ripple using createRippleModifierNode. To disable the ripple completely, provide null using LocalRippleConfiguration.

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.

Summary

Nested types

The configuration options for the focus indication for RippleConfiguration.

An inset ring focus indication.

An opacity-based focus indication.

Public constructors

Local per-ripple configuration for ripple appearance, provided using LocalRippleConfiguration.

Cmn
RippleConfiguration(color: Color, rippleAlpha: RippleAlpha?)

This function is deprecated. Use other configuration options in RippleThemeConfiguration and RippleConfiguration

Cmn

Local per-ripple configuration for ripple appearance, provided using LocalRippleConfiguration.

Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public constructors

RippleConfiguration

RippleConfiguration(color: Color = Color.Unspecified)

Local per-ripple configuration for ripple appearance, provided using LocalRippleConfiguration. In most cases the default values should be used, for custom design system use cases you should instead build your own custom ripple using createRippleModifierNode. To disable the ripple completely, provide null using LocalRippleConfiguration.

Parameters
color: Color = Color.Unspecified

the color override for the ripple. If Color.Unspecified, then the default color from the theme will be used instead. Note that if the ripple has a color explicitly set with the parameter on ripple, that will always be used instead of this value.

RippleConfiguration

RippleConfiguration(
    color: Color = Color.Unspecified,
    rippleAlpha: RippleAlpha? = null
)

Configuration for ripple appearance, provided using LocalRippleConfiguration. In most cases the default values should be used, for custom design system use cases you should instead build your own custom ripple using createRippleModifierNode. To disable the ripple completely, provide null using LocalRippleConfiguration.

Parameters
color: Color = Color.Unspecified

the color override for the ripple. If Color.Unspecified, then the default color from the theme will be used instead. Note that if the ripple has a color explicitly set with the parameter on ripple, that will always be used instead of this value.

rippleAlpha: RippleAlpha? = null

the RippleAlpha override for this ripple. If null, then the default alpha will be used instead.

RippleConfiguration

RippleConfiguration(
    focus: RippleConfiguration.Focus?,
    color: Color = Color.Unspecified
)

Local per-ripple configuration for ripple appearance, provided using LocalRippleConfiguration. In most cases the default values should be used, for custom design system use cases you should instead build your own custom ripple using createRippleModifierNode. To disable the ripple completely, provide null using LocalRippleConfiguration.

Parameters
focus: RippleConfiguration.Focus?

the focus indication override for this ripple. If null, then the default indication style will be used instead. This will only be applied if the style of focus indication matches the one set by LocalRippleThemeConfiguration (opacity vs inset focus ring)

color: Color = Color.Unspecified

the color override for the ripple. If Color.Unspecified, then the default color from the theme will be used instead. Note that if the ripple has a color explicitly set with the parameter on ripple, that will always be used instead of this value.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

color

val colorColor

focus

val focusRippleConfiguration.Focus?

rippleAlpha

val rippleAlphaRippleAlpha?