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

LocalSoundEffect

The CompositionLocal to provide platform sound effects.

InteractionSoundSamples

@Composable
fun InteractionSoundSamples() {
    Column(modifier = Modifier.padding(16.dp)) {
        Text("Standard Clickable (Has Sound):")
        Button(onClick = {}) { Text("Click me") }
        Text("\nDisabled Sound Feedback:")
        SoundEffectOnInteraction(enabled = false) { Button(onClick = {}) { Text("Silent Button") } }
    }
}

Last updated: