KPContainedIconToggleButton

fun KPContainedIconToggleButton(checked: Boolean, checkedIcon: ImageVector, unCheckedIcon: ImageVector, size: ContainedIconButtonSize, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, colors: ContainedIconButtonColors = IconButtonDefaults.containedButtonColors(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

A composable function that displays a contained icon toggle button with customizable size, colors, and behavior for checked and unchecked states.

Parameters

checked

Whether the button is in the checked state.

checkedIcon

The ImageVector representing the icon to display when the button is checked.

unCheckedIcon

The ImageVector representing the icon to display when the button is unchecked.

size

The ContainedIconButtonSize defining the sizes for the button and its container.

onCheckedChange

The lambda to invoke when the checked state changes.

modifier

The Modifier to apply to the button. Defaults to Modifier.

enabled

Whether the button is enabled. Defaults to true.

colors

The ContainedIconButtonColors to use for styling the button's background, content, and container colors. Defaults to IconButtonDefaults.containedButtonColors.

interactionSource

The MutableInteractionSource to track interaction events. Defaults to a new instance.