IconButton
Android
@Composable
public fun IconButton(
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
shape: Shape = GlimmerTheme.shapes.large,
color: Color = GlimmerTheme.colors.surface,
contentColor: Color = calculateContentColor(color),
border: BorderStroke? = SurfaceDefaults.border(),
contentPadding: PaddingValues = PaddingValues(GlimmerTheme.componentSpacingValues.small),
interactionSource: MutableInteractionSource? = null,
content: @Composable () -> Unit,
)
Parameters
| onClick | called when this icon button is clicked |
| modifier | the Modifier to be applied to this icon button |
| enabled | controls the enabled state of this icon button. When false, this icon button will not respond to user input |
| shape | the Shape used to clip this icon button |
| color | background color of this icon button |
| contentColor | content color used by components inside content |
| border | the border to draw around this icon button |
| contentPadding | the spacing values to apply internally between the container and the content |
| interactionSource | an optional hoisted MutableInteractionSource for observing and emitting Interactions for this icon button. You can use this to change the icon button's appearance or preview the icon button in different states. Note that if null is provided, interactions will still happen internally. |
| content | the content of this icon button, typically an Icon |