ClickableSample
@Composable
fun ClickableSample() {
val count = remember { mutableStateOf(0) }
// content that you want to make clickable
Text(text = count.value.toString(), modifier = Modifier.clickable { count.value += 1 })
}Configure component to receive clicks, double clicks and long clicks via input or accessibility "click" event.
Compose Multiplatform
Ship iOS, desktop, and web apps with Compose
RevenueCat
Add subscriptions to your apps in minutes
@Composable
fun ClickableSample() {
val count = remember { mutableStateOf(0) }
// content that you want to make clickable
Text(text = count.value.toString(), modifier = Modifier.clickable { count.value += 1 })
}Last updated: