ButtonStyle

@Immutable data class ButtonStyle
kotlin.Any
   ↳ androidx.ui.material.ButtonStyle

Styling configuration for a Button.

The three basic Material button styles are provided by ContainedButtonStyle, intended for high emphasis buttons, OutlinedButtonStyle, intended for medium emphasis buttons, and TextButtonStyle, intended for low emphasis buttons.

Summary

Public constructors

<init>(color: Color, shape: Shape, border: Border? = null, elevation: Dp = 0.dp, paddings: EdgeInsets = ButtonPaddings, textStyle: TextStyle? = null, rippleColor: Color? = null)

Styling configuration for a Button.

Properties

Border?

Optional border to draw on top of the shape

Color

The background color.

Dp

The z-coordinate at which to place this button.

EdgeInsets

The spacing values to apply internally between the container and the content

Color?

The Ripple color is usually the same color used by the text or iconography in the component.

Shape

Defines the button's shape as well as its shadow

TextStyle?

The text style to apply as a default for any children Text components

Public constructors

<init>

ButtonStyle(
    color: Color,
    shape: Shape,
    border: Border? = null,
    elevation: Dp = 0.dp,
    paddings: EdgeInsets = ButtonPaddings,
    textStyle: TextStyle? = null,
    rippleColor: Color? = null)

Styling configuration for a Button.

The three basic Material button styles are provided by ContainedButtonStyle, intended for high emphasis buttons, OutlinedButtonStyle, intended for medium emphasis buttons, and TextButtonStyle, intended for low emphasis buttons.

Parameters
color: Color The background color. Use Color.Transparent to have no color
shape: Shape Defines the button's shape as well as its shadow
border: Border? = null Optional border to draw on top of the shape
elevation: Dp = 0.dp The z-coordinate at which to place this button. This controls the size of the shadow below the button
paddings: EdgeInsets = ButtonPaddings The spacing values to apply internally between the container and the content
textStyle: TextStyle? = null The text style to apply as a default for any children Text components
rippleColor: Color? = null The Ripple color is usually the same color used by the text or iconography in the component. If null is provided the color will be calculated by RippleTheme.defaultColor.

Properties

border

val border: Border?

Optional border to draw on top of the shape

color

val color: Color

The background color. Use Color.Transparent to have no color

elevation

val elevation: Dp

The z-coordinate at which to place this button. This controls the size of the shadow below the button

paddings

val paddings: EdgeInsets

The spacing values to apply internally between the container and the content

rippleColor

val rippleColor: Color?

The Ripple color is usually the same color used by the text or iconography in the component. If null is provided the color will be calculated by RippleTheme.defaultColor.

shape

val shape: Shape

Defines the button's shape as well as its shadow

textStyle

val textStyle: TextStyle?

The text style to apply as a default for any children Text components