<h2 id="iconbutton-onclick-modifier-enabled-shape-color-contentcolor-border-contentpadding-interactionsource-content">IconButton</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@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](/jetpack-compose/androidx.compose.ui/ui/interfaces/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](/jetpack-compose/androidx.compose.ui/ui-graphics/interfaces/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](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/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](/jetpack-compose/androidx.xr.glimmer/glimmer/components/Icon) |