JetpackIconToggleButton

fun JetpackIconToggleButton(checked: Boolean, onCheckedChange: (Boolean) -> Unit, icon: @Composable () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, checkedIcon: @Composable () -> Unit = icon)

Jetpack toggle button with icon and checked icon content slots. Wraps Material 3 IconButton.

Parameters

checked

Whether the toggle button is currently checked.

onCheckedChange

Called when the user clicks the toggle button and toggles checked.

modifier

Modifier to be applied to the toggle button.

enabled

Controls the enabled state of the toggle button. When false, this toggle button will not be clickable and will appear disabled to accessibility services.

icon

The icon content to show when unchecked.

checkedIcon

The icon content to show when checked.