TonalLeadingButton

@Composable
fun TonalLeadingButton(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, shapes: SplitButtonShapes = leadingButtonShapesFor(SmallContainerHeight), colors: ButtonColors = ButtonDefaults.filledTonalButtonColors(), elevation: ButtonElevation? = ButtonDefaults.filledTonalButtonElevation(), border: BorderStroke? = null, contentPadding: PaddingValues = leadingButtonContentPaddingFor(SmallContainerHeight), interactionSource: MutableInteractionSource? = null, content: @Composable RowScope.() -> Unit)

Create a tonal leading button that has the same visual as a TonalButton. To create a filled, outlined, or elevated version, the default value of Button params can be passed in. For example, ElevatedButton.

The default text style for internal Text components will be set to Typography.labelLarge.

Parameters

onClick

called when the button is clicked

modifier

the Modifier to be applied to this button.

enabled

controls the enabled state of the split button. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.

shapes

the SplitButtonShapes that the trailing button will morph between depending on the user's interaction with the button.

colors

ButtonColors that will be used to resolve the colors for this button in different states. See ButtonDefaults.buttonColors.

elevation

ButtonElevation used to resolve the elevation for this button in different states. This controls the size of the shadow below the button. See ButtonElevation.shadowElevation.

border

the border to draw around the container of this button contentPadding the spacing values to apply internally between the container and the content

contentPadding

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

interactionSource

an optional hoisted MutableInteractionSource for observing and emitting Interactions for this button. You can use this to change the button's appearance or preview the button in different states. Note that if null is provided, interactions will still happen internally.

content

the content for the button.