ButtonDefaults

Properties

Link copied to clipboard

The default corner radius applied for all buttons (COUI height-derived capsule: radius = MinHeight / 2).

Link copied to clipboard

The corner radius of the small size tier (COUI height-derived capsule: radius = MinHeightSmall / 2).

Link copied to clipboard

The default inside margin applied for all buttons.

Link copied to clipboard

The inside margin of the small size tier (COUI Widget.COUI.Button.Small padding 12dp/4dp).

Link copied to clipboard

The default min height applied for all buttons. Note that you can override it by applying Modifier.heightIn directly on the button composable.

Link copied to clipboard

The min height of the small size tier (COUI coui_btn_small_height_min).

Link copied to clipboard

The default min width applied for all buttons. Note that you can override it by applying Modifier.widthIn directly on the button composable.

Link copied to clipboard

The min width of the small size tier (COUI coui_btn_small_width_min).

Link copied to clipboard

The legacy COUIButton brightness attribute value. Retained for source compatibility only and no longer used by Button.

Link copied to clipboard
val PressedScale: Float = 0.92f

The smallest scale a button shrinks to while pressed (COUIPressFeedbackHelper end ratio for surfaces up to 48 x 48dp).

Functions

Link copied to clipboard
fun buttonColors(color: Color = COUITheme.colorScheme.secondaryVariant, disabledColor: Color = COUITheme.colorScheme.disabledSecondaryVariant, contentColor: Color = COUITheme.colorScheme.onSecondaryVariant, disabledContentColor: Color = COUITheme.colorScheme.disabledOnSecondaryVariant): ButtonColors

The default ButtonColors for all buttons.

Link copied to clipboard
fun buttonColorsPrimary(color: Color = COUITheme.colorScheme.primary, disabledColor: Color = COUITheme.colorScheme.disabledPrimaryButton, contentColor: Color = COUITheme.colorScheme.onPrimary, disabledContentColor: Color = COUITheme.colorScheme.disabledOnPrimaryButton): ButtonColors

The ButtonColors for primary buttons.

Link copied to clipboard
fun textButtonColors(color: Color = COUITheme.colorScheme.secondaryVariant, disabledColor: Color = COUITheme.colorScheme.disabledSecondaryVariant, textColor: Color = COUITheme.colorScheme.onSecondaryVariant, disabledTextColor: Color = COUITheme.colorScheme.disabledOnSecondaryVariant): TextButtonColors

The default TextButtonColors for all text buttons.

Link copied to clipboard
fun textButtonColorsBorderless(color: Color = Color.Transparent, disabledColor: Color = Color.Transparent, textColor: Color = COUITheme.colorScheme.primary, disabledTextColor: Color = COUITheme.colorScheme.disabledPrimary): TextButtonColors

The TextButtonColors for borderless / translate text buttons (COUI Widget.COUI.Button.Large.Borderless / Translate): no fill, primary-tinted label.

Link copied to clipboard
fun textButtonColorsPrimary(color: Color = COUITheme.colorScheme.primary, disabledColor: Color = COUITheme.colorScheme.disabledPrimaryButton, textColor: Color = COUITheme.colorScheme.onPrimary, disabledTextColor: Color = COUITheme.colorScheme.disabledOnPrimaryButton): TextButtonColors

The TextButtonColors for primary text buttons.