Property

LocalSoundEffect

The CompositionLocal to provide platform sound effects.

InteractionSoundSamples

@Sampled
@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") } }
    }
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: