Compose Unstyled 2.0 is out! Check the official announcement blog ->
Composable Function

SoundEffectOnInteraction

Configure whether sound effects are played for interactions (clicks) in the provided content.

SoundEffectOnInteraction

Source set: Android
@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 and conditionally delegates or drops invocations of SoundEffect.playClickSound.

Parameters

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

Last updated: