# RippleConfiguration

Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/Ripple.kt+class:androidx.compose.material3.RippleConfiguration) Common/AllAndroid/JVM
- Cmn

  ```
  class RippleConfiguration
  ```

*** ** * ** ***

Local per-ripple configuration for the `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)` appearance, provided using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleConfiguration()`. This is useful to override individual instances of ripples that are implemented internally to a specific component. In most cases the default values should be used, as for custom design system use cases you should instead build your own custom ripple using `https://developer.android.com/reference/kotlin/androidx/compose/material3/ripple/package-summary#createRippleModifierNode(androidx.compose.foundation.interaction.InteractionSource,kotlin.Function0)`. To disable the ripple completely, provide `null` using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleConfiguration()`.

The ripple configuration is resolved as follows:

- `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleThemeConfiguration()` provides the highest-level theming configuration for ripples, including whether the focus indication is drawn by inset focus rings.

- `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleConfiguration()` provides hierarchical per-ripple configuration for `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)`, including disabling ripples and their indications. This takes next highest priority.

- `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)` parameters allow specifying configuration for individual indication callsites in components.

## Summary

| ### Nested types |
|---|
| `sealed class https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration.Focus` The configuration options for the focus indication for `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration`. |
| `class https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration.Focus.InsetRing : https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration.Focus` An inset ring focus indication. |
| `object https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration.Focus.Opacity : https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration.Focus` An opacity-based focus indication. |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#RippleConfiguration(androidx.compose.ui.graphics.Color)(color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` Local per-ripple configuration for `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)` appearance, provided using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleConfiguration()`. | Cmn |
| `[RippleConfiguration](https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#RippleConfiguration(androidx.compose.ui.graphics.Color,androidx.compose.material.ripple.RippleAlpha))(color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, rippleAlpha: https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha?)` **This function is deprecated.** Use other configuration options in RippleThemeConfiguration, RippleConfiguration and ripple. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#RippleConfiguration(androidx.compose.material3.RippleConfiguration.Focus,androidx.compose.ui.graphics.Color)(focus: https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration.Focus?, color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color)` Local per-ripple configuration for `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)` appearance, provided using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleConfiguration()`. | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#color()` the color override for the ripple. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration.Focus?` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#focus()` the focus indication override for this ripple. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha?` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#rippleAlpha()` **This property is deprecated.** Use other configuration options in RippleThemeConfiguration, RippleConfiguration and ripple. | Cmn |

## Public constructors

### RippleConfiguration

Cmn

```
RippleConfiguration(color: Color = Color.Unspecified)
```

Local per-ripple configuration for `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)` appearance, provided using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/ripple/package-summary#createRippleModifierNode(androidx.compose.foundation.interaction.InteractionSource,kotlin.Function0)`. To disable the ripple completely, provide `null` using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleConfiguration()`.

| Parameters |
|---|---|
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the color override for the ripple. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)`, that will always be used instead of this value. |

### RippleConfiguration

Cmn

```
[RippleConfiguration](https://developer.android.com/reference/kotlin/androidx/compose/material3/RippleConfiguration#RippleConfiguration(androidx.compose.ui.graphics.Color,androidx.compose.material.ripple.RippleAlpha))(
    color: Color = Color.Unspecified,
    rippleAlpha: RippleAlpha? = null
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Use other configuration options in RippleThemeConfiguration, RippleConfiguration and ripple. Changing whether focus is displayed by opacity or inset focus rings is changed by providing different values with LocalRippleThemeConfiguration. Disabling individual types of interactions are displayed by a specific ripple can be done with the boolean parameters on ripple.

Configuration for `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)` appearance, provided using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/ripple/package-summary#createRippleModifierNode(androidx.compose.foundation.interaction.InteractionSource,kotlin.Function0)`. To disable the ripple completely, provide `null` using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleConfiguration()`.

| Parameters |
|---|---|
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the color override for the ripple. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)`, that will always be used instead of this value. |
| `rippleAlpha: https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha? = null` | the `https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha` override for this ripple. If null, then the default alpha will be used instead. |

### RippleConfiguration

Cmn

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

Local per-ripple configuration for `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)` appearance, provided using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/ripple/package-summary#createRippleModifierNode(androidx.compose.foundation.interaction.InteractionSource,kotlin.Function0)`. To disable the ripple completely, provide `null` using `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleConfiguration()`.

| Parameters |
|---|---|
| `focus: https://developer.android.com/reference/kotlin/androidx/compose/material3/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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleThemeConfiguration()` (opacity vs inset focus ring) |
| `color: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the color override for the ripple. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)`, that will always be used instead of this value. |

## Public functions

### equals

Cmn

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

### hashCode

Cmn

```
open fun hashCode(): Int
```

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### color

Cmn

```
val color: Color
```

the color override for the ripple. If `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ripple(kotlin.Boolean,androidx.compose.ui.unit.Dp,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Shape,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)`, that will always be used instead of this value.

### focus

Cmn

```
val 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 `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LocalRippleThemeConfiguration()` (opacity vs inset focus ring). If the style doesn't match, then this configuration will be ignored and the default indication style will be used instead.

### rippleAlpha

Cmn

```
val rippleAlpha: RippleAlpha?
```

> [!CAUTION]
> **This property is deprecated.**   
> Use other configuration options in RippleThemeConfiguration, RippleConfiguration and ripple. Changing whether focus is displayed by opacity or inset focus rings is changed by providing different values with LocalRippleThemeConfiguration. Disabling individual types of interactions are displayed by a specific ripple can be done with the boolean parameters on ripple.

The `https://developer.android.com/reference/kotlin/androidx/compose/material/ripple/RippleAlpha` used to configure the opacity levels of the per-ripple configuration.