StylishIconToggleButton

fun StylishIconToggleButton(checked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, colors: IconToggleButtonColors = IconButtonDefaults.iconToggleButtonColors(), interactionSource: MutableInteractionSource? = null, shape: Shape = IconButtonDefaults.standardShape, content: @Composable () -> Unit)

A standard icon toggle button that switches between a checked and an unchecked state, wrapping the Material 3 IconToggleButton with the theme's default colors.

Use this for single-select actions that stay active, such as a favorite or bookmark toggle. content should typically be an Icon that changes with checked (e.g. filled vs. outlined); the button enforces a 48 x 48 dp minimum touch target.

Parameters

checked

Whether the button is currently toggled on.

onCheckedChange

Called with the new state when the button is tapped.

modifier

Modifier applied to the button root.

enabled

When false, the button ignores pointer input and renders in the disabled color scheme.

colors

Colors used in each state. Defaults to IconButtonDefaults.iconToggleButtonColors.

interactionSource

The MutableInteractionSource for the button, used to observe press/focus/hover interactions. When null, an internal one is remembered.

shape

Shape of the button's container. Defaults to IconButtonDefaults.standardShape.

content

The content of the button, typically an Icon.

See also