IconToggleButtonOutlined

fun IconToggleButtonOutlined(checked: Boolean, onCheckedChange: (Boolean) -> Unit, icons: IconToggleButtonIcons, modifier: Modifier = Modifier, intent: IconButtonIntent = IconButtonDefaults.DefaultIntent, enabled: Boolean = true, shape: ButtonShape = IconButtonDefaults.DefaultShape, size: IconButtonSize = IconButtonDefaults.DefaultSize, contentDescription: String? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

Icon toggle buttons help people take supplementary actions with a single tap. They’re used when a compact toggle button is required, such as in a toolbar or image list.

Parameters

checked

controls the check state of this icon toggle button. When true, this component will show icons.checked, and false will show icons.unchecked

onCheckedChange

responds to user interaction of checking/unchecking the icon toggle button and changes @param checked by true or false

icons

a content to be drawn inside the IconToggleButton, should show one of IconToggleButtonIcons values that sets checked and unchecked

modifier

the Modifier to be applied to this icon button

intent

one of IconButtonIntent values that will be used to determine IconButtonColors to be applied*

enabled

controls the enabled state of this icon button. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.

shape

to be applied to the IconButton background. It should be one of ButtonShape values

size

one of the IconButtonSize values that sets width and height of the IconButton

contentDescription

text used by accessibility services to describe what this icon button represents. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar

interactionSource

the MutableInteractionSource representing the stream of Interactions for this icon button. You can create and pass in your own remembered instance to observe Interactions and customize the appearance / behavior of this icon button in different states.