androidx.compose.material3

FilledIconButton

Composable function

One of the icon button types. It works like IconButton. Only the parameters that differ are described here.

An icon button with a strong fill. Use it for the main action among icon buttons.

A filled icon button
A filled icon button
FilledIconButton(onClick = {}) { Icon(Icons.Filled.Add, contentDescription = "Add") }

Basic

Takes one shape.

@Composable
fun FilledIconButton(
    onClick: () -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    shape: Shape = IconButtonDefaults.filledShape,
    colors: IconButtonColors = IconButtonDefaults.filledIconButtonColors(),
    interactionSource: MutableInteractionSource? = null,
    content: @Composable () -> Unit,
)

Defaults that differ from IconButton:

Same as in IconButton: onClick, modifier, enabled, shape, colors, interactionSource, content.

ExpressiveSince 1.10

Takes shapes: one shape at rest and one while pressed.

@Composable
fun FilledIconButton(
    onClick: () -> Unit,
    shapes: IconButtonShapes,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    colors: IconButtonColors = IconButtonDefaults.filledIconButtonColors(),
    interactionSource: MutableInteractionSource? = null,
    content: @Composable () -> Unit,
)

Defaults that differ from IconButton:

Same as in IconButton: onClick, shapes, modifier, enabled, colors, interactionSource, content.

Icon button types

See also