@Deprecated(RippleThemeDeprecationMessage, level = DeprecationLevel.ERROR)
public interface RippleTheme
Defines the appearance for Ripples. You can define a new theme and apply it using LocalRippleTheme. See defaultRippleColor and defaultRippleAlpha for default values that can be used when creating your own RippleTheme.
Functions
defaultColor
@Deprecated(RippleThemeDeprecationMessage, level = DeprecationLevel.ERROR)
@Composable
public fun defaultColor(): Color
Return
the default ripple color at the call site's position in the hierarchy. This color will be used when a color is not explicitly set in the ripple itself.
rippleAlpha
@Deprecated(RippleThemeDeprecationMessage, level = DeprecationLevel.ERROR)
@Composable
public fun rippleAlpha(): RippleAlpha
Return
the RippleAlpha used to calculate the alpha for the ripple depending on the Interaction for a given component. This will be set as the alpha channel for defaultColor or the color explicitly provided to the ripple.
Members
Companion
public companion object
Functions
defaultRippleColor
@Deprecated(
"The default ripple color varies between design system versions: this " +
"function technically implements the default used by the material library, but " +
"is not used by the material3 library. To remove confusion and link the " +
"defaults more strongly to the design system library, these default values have " +
"been moved to the material and material3 libraries. For material, use " +
"RippleDefaults#rippleColor. For material3, use content color " +
"directly.",
level = DeprecationLevel.WARNING,
)
public fun defaultRippleColor(contentColor: Color, lightTheme: Boolean): Color
Represents the default color that will be used for a ripple if a color has not been explicitly set on the ripple instance.
Parameters
| contentColor | the color of content (text or iconography) in the component that contains the ripple. |
| lightTheme | whether the theme is light or not |
defaultRippleAlpha
@Deprecated(
"The default ripple alpha varies between design system versions: this " +
"function technically implements the default used by the material library, but " +
"is not used by the material3 library. To remove confusion and link the " +
"defaults more strongly to the design system library, these default values have " +
"been moved to the material and material3 libraries. For material, use " +
"RippleDefaults#rippleAlpha. For material3, use " +
"RippleDefaults#RippleAlpha.",
level = DeprecationLevel.WARNING,
)
public fun defaultRippleAlpha(contentColor: Color, lightTheme: Boolean): RippleAlpha
Represents the default RippleAlpha that will be used for a ripple to indicate different states.
Parameters
| contentColor | the color of content (text or iconography) in the component that contains the ripple. |
| lightTheme | whether the theme is light or not |