---
title: "SoundEffectOnInteraction"
description: "Configure whether sound effects are played for interactions (clicks) in the provided content."
type: "composable"
lastmod: "2026-05-20T01:13:53.294197Z"
---
## API Reference

### SoundEffectOnInteraction

> Source set: Android

```kotlin
@Composable
fun SoundEffectOnInteraction(enabled: Boolean, content: @Composable () -> Unit)
```

Configure whether sound effects are played for interactions (clicks) in the provided `content`.
This acts as a configuration wrapper that intercepts the [LocalSoundEffect](/jetpack-compose/androidx.compose.ui/ui/properties/LocalSoundEffect) and conditionally
delegates or drops invocations of [SoundEffect.playClickSound](/jetpack-compose/androidx.compose.ui/ui/interfaces/SoundEffect).

#### Parameters

| | |
| --- | --- |
| enabled | true if sound effects should be played on user interactions, false to silence them. |
| content | The composable subtree to wrap. |
