IconButtonFilled

fun IconButtonFilled(icon: SparkIcon, onClick: () -> Unit, modifier: Modifier = Modifier, intent: IconButtonIntent = IconButtonDefaults.DefaultIntent, enabled: Boolean = true, isLoading: Boolean = false, shape: ButtonShape = IconButtonDefaults.DefaultShape, size: IconButtonSize = IconButtonDefaults.DefaultSize, contentDescription: String? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

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

Parameters

icon

a content to be drawn inside the IconButton

onClick

called when this icon button is clicked

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.

isLoading

show or hide a Spinner instead of the icon to indicate a loading state

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.