JengaIconButton

fun JengaIconButton(onClick: () -> Unit, modifier: Modifier = Modifier, variant: JengaIconButtonVariant = JengaIconButtonVariant.Standard, enabled: Boolean = true, shape: Shape = JengaTheme.components.iconButton?.variant(variant)?.shape ?: JengaIconButtonDefaults.shape, colors: JengaIconButtonColors = JengaIconButtonDefaults.colors(variant), size: Dp = JengaTheme.components.iconButton?.variant(variant)?.size ?: JengaIconButtonDefaults.Size, content: @Composable () -> Unit)(source)

A compact, icon-only button, for app-bar actions, toolbars, and inline controls where a labelled JengaButton would be too heavy.

The visible surface is size, but the touch target is always expanded to the 48dp accessibility minimum. The icon inherits the resolved content color via LocalJengaContentColor.

Parameters

onClick

called when tapped (ignored while disabled).

modifier

the Modifier for this button.

variant

the visual style; see JengaIconButtonVariant.

enabled

whether the button is interactive.

shape

the button shape; defaults to the theme's JengaIconButtonVariantStyle.shape for variant, else JengaIconButtonDefaults.shape.

colors

the color set; defaults to JengaIconButtonDefaults.colors for variant.

size

the visible button size; the touch target is never smaller than 48dp. Defaults to the theme's JengaIconButtonVariantStyle.size for variant, else JengaIconButtonDefaults.Size.

content

the icon (typically a single JengaIcon); inherits content color.

Samples

JengaIconButton(
    onClick = { },
    variant = JengaIconButtonVariant.Standard,
    content = {
        JengaIcon(
            imageVector = JengaIcons.Search,
            contentDescription = "Search",
        )
    },
)