# RippleTheme

# RippleTheme

Artifact:[androidx.compose.material:material-ripple](https://developer.android.com/jetpack/androidx/releases/compose-material)  
[View Source](https://cs.android.com/search?q=file:androidx/compose/material/ripple/RippleTheme.kt+class:androidx.compose.material.ripple.RippleTheme)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)  
Deprecated in[1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.7.0)
Common/All
  - Cmn  

  ```
  interface RippleTheme
  ```

*** ** * ** ***

| **This interface is deprecated.**   
| RippleTheme and LocalRippleTheme have been deprecated - they are not compatible with the new ripple implementation using the new Indication APIs that provide notable performance improvements. For a migration guide and background information, please visit developer.android.com

Defines the appearance for Ripples. You can define a new theme and apply it using[LocalRippleTheme](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/package-summary#LocalRippleTheme()). See[defaultRippleColor](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultRippleColor(androidx.compose.ui.graphics.Color,kotlin.Boolean))and[defaultRippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultRippleAlpha(androidx.compose.ui.graphics.Color,kotlin.Boolean))for default values that can be used when creating your own[RippleTheme](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme).  

|                                                                                                    See also                                                                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [rememberRipple](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/package-summary#rememberRipple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color)) |   |

## Summary

|                                       ### Public companion functions                                       |
|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| [RippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha) | ~~[defaultRippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultRippleAlpha(androidx.compose.ui.graphics.Color,kotlin.Boolean))~~`(contentColor: `[Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)`, lightTheme: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` **This function is 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. | Cmn |
| [Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)                 | ~~[defaultRippleColor](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultRippleColor(androidx.compose.ui.graphics.Color,kotlin.Boolean))~~`(contentColor: `[Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)`, lightTheme: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` **This function is 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. | Cmn |

|                                            ### Public functions                                            |
|------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| [Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)                 | `@`[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable) ~~[defaultColor](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultColor())~~`()` **This function is deprecated.**RippleTheme and LocalRippleTheme have been deprecated - they are not compatible with the new ripple implementation using the new Indication APIs that provide notable performance improvements. | Cmn |
| [RippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha) | `@`[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable) ~~[rippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#rippleAlpha())~~`()` **This function is deprecated.**RippleTheme and LocalRippleTheme have been deprecated - they are not compatible with the new ripple implementation using the new Indication APIs that provide notable performance improvements.   | Cmn |

## Public companion functions

### defaultRippleAlpha

Cmn  
Added in[1.10.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-material#1.10.0-rc01)  
Deprecated in[1.10.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-material#1.10.0-rc01)  

```
fun [defaultRippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultRippleAlpha(androidx.compose.ui.graphics.Color,kotlin.Boolean))(contentColor: Color, lightTheme: Boolean): RippleAlpha
```
| **This function is 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.

Represents the default[RippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha)that will be used for a ripple to indicate different states.  

|                                                 Parameters                                                 |
|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
| `contentColor: `[Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color) | the color of content (text or iconography) in the component that contains the ripple. |
| `lightTheme: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)          | whether the theme is light or not                                                     |

### defaultRippleColor

Cmn  
Added in[1.10.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-material#1.10.0-rc01)  
Deprecated in[1.10.0-rc01](https://developer.android.com/jetpack/androidx/releases/compose-material#1.10.0-rc01)  

```
fun [defaultRippleColor](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultRippleColor(androidx.compose.ui.graphics.Color,kotlin.Boolean))(contentColor: Color, lightTheme: Boolean): Color
```
| **This function is 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.

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: `[Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color) | the color of content (text or iconography) in the component that contains the ripple. |
| `lightTheme: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)          | whether the theme is light or not                                                     |

## Public functions

### defaultColor

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)  
Deprecated in[1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.7.0)  

```
@Composable
fun [defaultColor](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultColor())(): Color
```
| **This function is deprecated.**   
RippleTheme and LocalRippleTheme have been deprecated - they are not compatible with the new ripple implementation using the new Indication APIs that provide notable performance improvements. For a migration guide and background information, please visit developer.android.com  

|                                          Returns                                           |
|--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Color](https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color) | 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. |

|                                                                                        See also                                                                                         |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [defaultRippleColor](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultRippleColor(androidx.compose.ui.graphics.Color,kotlin.Boolean)) |   |

### rippleAlpha

Cmn  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0)  
Deprecated in[1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.7.0)  

```
@Composable
fun [rippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#rippleAlpha())(): RippleAlpha
```
| **This function is deprecated.**   
RippleTheme and LocalRippleTheme have been deprecated - they are not compatible with the new ripple implementation using the new Indication APIs that provide notable performance improvements. For a migration guide and background information, please visit developer.android.com  

|                                                  Returns                                                   |
|------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha) | the[RippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha)used to calculate the alpha for the ripple depending on the[Interaction](https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/Interaction)for a given component. This will be set as the alpha channel for[defaultColor](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultColor())or the color explicitly provided to the ripple. |

|                                                                                        See also                                                                                         |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [defaultRippleAlpha](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultRippleAlpha(androidx.compose.ui.graphics.Color,kotlin.Boolean)) |   |