Button

fun Button(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, pressScaleEnabled: Boolean = true, cornerRadius: Dp = ButtonDefaults.CornerRadius, minWidth: Dp = ButtonDefaults.MinWidth, minHeight: Dp = ButtonDefaults.MinHeight, colors: ButtonColors = ButtonDefaults.buttonColors(), insideMargin: PaddingValues = ButtonDefaults.InsideMargin, interactionSource: MutableInteractionSource? = null, indication: Indication? = null, content: @Composable RowScope.() -> Unit)

A Button component with COUI style.

Parameters

onClick

The callback when the Button is clicked.

modifier

The modifier to be applied to the Button.

enabled

Whether the Button is enabled.

pressScaleEnabled

Whether the Button shrinks while pressed (COUIButton scaleEnable). Set to false for buttons that fill a container cell, such as the alert dialog button bar, leaving the full-cell press tint as the only feedback.

cornerRadius

The corner radius of the Button.

minWidth

The minimum width of the Button.

minHeight

The minimum height of the Button.

colors

The ButtonColors of the Button.

insideMargin

The margin inside the Button.

interactionSource

The MutableInteractionSource to be used for the Button.

indication

The Indication to be used for the Button. Defaults to null because the COUI press feedback (scale + press tint) is built into the button itself.

content

The Composable content of the Button.