# rememberRipple

Common/All

## Functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/Indication` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable [rememberRipple](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/rememberRipple.composable#rememberRipple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color))(bounded: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, radius: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` **This function is deprecated.** rememberRipple has been deprecated - it returns an old Indication implementation that is not compatible with the new Indication APIs that provide notable performance improvements. | Cmn |

## Functions

### rememberRipple

Cmn 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/Ripple.kt+function:rememberRipple) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.10.0) Deprecated in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.10.0)

```
@Composable
fun [rememberRipple](https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/rememberRipple.composable#rememberRipple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color))(
    bounded: Boolean = true,
    radius: Dp = Dp.Unspecified,
    color: Color = Color.Unspecified
): Indication
```

> [!CAUTION]
> **This function is deprecated.**   
> rememberRipple has been deprecated - it returns an old Indication implementation that is not compatible with the new Indication APIs that provide notable performance improvements. Instead, use the new ripple APIs provided by design system libraries, such as material and material3. If you are implementing your own design system library, use createRippleNode to create your own custom ripple implementation that queries your own theme values. For a migration guide and background information, please visit developer.android.com

Creates and `https://developer.android.com/reference/kotlin/androidx/compose/runtime/remember.composable#remember(kotlin.Function0)`s a Ripple using values provided by `https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme`.

A Ripple is a Material implementation of `https://developer.android.com/reference/kotlin/androidx/compose/foundation/Indication` that expresses different `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/Interaction`s by drawing ripple animations and state layers.

A Ripple responds to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/PressInteraction.Press` by starting a new `https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAnimation`, and responds to other `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/Interaction`s by showing a fixed `https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/StateLayer` with varying alpha values depending on the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/interaction/Interaction`.

If you are using MaterialTheme in your hierarchy, a Ripple will be used as the default `https://developer.android.com/reference/kotlin/androidx/compose/foundation/Indication` inside components such as `https://developer.android.com/reference/kotlin/androidx/compose/foundation/clickable.modifier#(androidx.compose.ui.Modifier).clickable(kotlin.Boolean,kotlin.String,androidx.compose.ui.semantics.Role,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function0)` and `https://developer.android.com/reference/kotlin/androidx/compose/foundation/indication.modifier#(androidx.compose.ui.Modifier).indication(androidx.compose.foundation.interaction.InteractionSource,androidx.compose.foundation.Indication)`. You can also manually provide Ripples through `https://developer.android.com/reference/kotlin/androidx/compose/foundation/package-summary#LocalIndication()` for the same effect if you are not using MaterialTheme.

You can also explicitly create a Ripple and provide it to components in order to change the parameters from the default, such as to create an unbounded ripple with a fixed size.

| Parameters |
|---|---|
| `bounded: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | If true, ripples are clipped by the bounds of the target layout. Unbounded ripples always animate from the target layout center, bounded ripples animate from the touch position. |
| `radius: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp = Dp.Unspecified` | the radius for the ripple. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp#Unspecified()` is provided then the size will be calculated based on the target layout size. |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the color of the ripple. This color is usually the same color used by the text or iconography in the component. This color will then have `https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#rippleAlpha()` applied to calculate the final color used to draw the ripple. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color#Unspecified()` is provided the color used will be `https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleTheme#defaultColor()` instead. |