# LocalRippleThemeConfiguration

> The overall [RippleThemeConfiguration] in use by all built-in components and [ripple].

## API Reference

> Source set: Android

```kotlin
public val LocalRippleThemeConfiguration: ProvidableCompositionLocal<RippleThemeConfiguration> =
    compositionLocalOf {
        RippleDefaults.ThemeConfiguration
    }
```

The overall [RippleThemeConfiguration](https://composables.com/jetpack-compose/androidx.wear.compose/compose-material3/classes/RippleThemeConfiguration/api.md) in use by all built-in components and [ripple](https://composables.com/jetpack-compose/androidx.wear.compose/compose-material3/functions/ripple/api.md).

By default, this will be `RippleDefaults.ThemeConfiguration`.

The ripple configuration is resolved as follows:
- [LocalRippleThemeConfiguration](https://composables.com/jetpack-compose/androidx.wear.compose/compose-material3/properties/LocalRippleThemeConfiguration/api.md) provides the highest-level theming configuration for ripples,
including whether the focus indication is drawn by inset focus rings.
- [LocalRippleConfiguration](https://composables.com/jetpack-compose/androidx.wear.compose/compose-material3/properties/LocalRippleConfiguration/api.md) provides hierarchical per-ripple configuration for [ripple](https://composables.com/jetpack-compose/androidx.wear.compose/compose-material3/functions/ripple/api.md),
including disabling ripples and their indications. This takes next highest priority.
- [ripple](https://composables.com/jetpack-compose/androidx.wear.compose/compose-material3/functions/ripple/api.md) parameters allow specifying configuration for individual indication callsites in
components.

## Code Examples

### EnableInsetFocusRingSample

```kotlin
@Sampled
@Composable
fun EnableInsetFocusRingSample() {
    // Enable inset focus rings through the theme configuration.
    CompositionLocalProvider(
        LocalRippleThemeConfiguration provides RippleDefaults.InsetFocusRingThemeConfiguration
    ) {
        // Button is a standard Wear Material3 component that supports focus rings internally.
        Button(onClick = { /* Do something */ }, label = { Text("Button") })
    }
}
```

### CustomizeInsetFocusRingSample

```kotlin
@Sampled
@Composable
fun CustomizeInsetFocusRingSample() {
    // Customize the focus ring stroke sizes through the theme configuration.
    CompositionLocalProvider(
        LocalRippleThemeConfiguration provides
            RippleThemeConfiguration(
                RippleThemeConfiguration.Focus.InsetRing(
                    outerStrokeInset = 0.dp,
                    outerStrokeWidth = 3.dp,
                    innerStrokeInset = 0.dp,
                    innerStrokeWidth = 6.dp,
                )
            )
    ) {
        Column(
            modifier = Modifier.fillMaxSize(),
            verticalArrangement = Arrangement.spacedBy(4.dp, Alignment.CenterVertically),
            horizontalAlignment = Alignment.CenterHorizontally,
        ) {
            // Button is a standard Wear Material3 component that supports focus rings internally.
            Button(onClick = { /* Do something */ }, label = { Text("Button") })

            // SwitchButton is also a standard component that supports focus rings internally.
            // We override its focus ring colors here.
            CompositionLocalProvider(
                LocalRippleConfiguration provides
                    RippleConfiguration(
                        focus =
                            RippleConfiguration.Focus.InsetRing(
                                outerStrokeColor = MaterialTheme.colorScheme.tertiary,
                                innerStrokeColor = MaterialTheme.colorScheme.onTertiary,
                            )
                    )
            ) {
                SwitchButton(
                    checked = true,
                    onCheckedChange = { /* Do something */ },
                    label = { Text("SwitchButton") },
                )
            }
        }
    }
}
```
