Compose Playground

IconButton

A clickable icon, used for actions.

Properties
Preview
Generated Code
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.runtime.Composable

@Composable
fun MyIconButton() {
    IconButton(
        onClick = { /*TODO*/ },
        enabled = true
    ) {
        Icon(
            Icons.Filled.Favorite,
            contentDescription = "Favorite"
        )
    }
}