Stylish Button
A standalone Stylish button with the same visual language as the connected-button family — grouped-container colors, interactive elevation, a hairline outline, and a 52 dp minimum height — but without any connected-group geometry. Use this when a single button is needed outside a StylishConnectedButtonRow, StylishConnectedButtonColumn, or StylishConnectedButtonGrid.
The leadingContent and trailingContent slots are laid out in a three-part row (leading | content | trailing) so icons align consistently with the connected-button family.
When isLoading is true and the button is enabled, the label row is replaced by a small spinner and clicks are ignored until loading completes.
Testing
The root carries the default test tag stylish_button for UI tests. Callers can override it by passing their own Modifier.testTag(...) in modifier.
Parameters
Called when the button is tapped.
Modifier applied to the Button root.
The visual style of the button, controlling the default colors, border, and elevation (see StylishButtonVariant).
When false, the button ignores pointer input and renders at zero elevation.
ButtonColors for the button. When null (default), resolved from variant: grouped-container colors for StylishButtonVariant.Filled and StylishButtonVariant.Elevated, secondary-container colors for StylishButtonVariant.Tonal, a transparent container with on-surface content for StylishButtonVariant.Outlined, and a transparent container with primary content for StylishButtonVariant.Text.
Corner shape. Defaults to RoundedCornerShape with StylishTheme.dimensions.connectedCornerRadius.
Border stroke drawn around the button. When null (default), resolved from variant: a hairline of StylishTheme.dimensions.outlineWidth using MaterialTheme.colorScheme.outlineVariant for StylishButtonVariant.Filled and StylishButtonVariant.Outlined, and no border for the other variants. Pass an explicit BorderStroke to override, or pass a non-null transparent stroke to remove it.
Shadow elevation for the button. When null (default), resolved from variant: interactive elevation for StylishButtonVariant.Filled, floating elevation (StylishTheme.dimensions.floatingElevation) pressed to 0 dp for StylishButtonVariant.Elevated, and zero for the other variants.
The MutableInteractionSource for the button, used to observe press/focus/hover interactions. When null, an internal one is remembered.
Inner padding of the button. Defaults to the control padding tokens (DefaultStylishDimensions.controlPadding / DefaultStylishDimensions.controlVerticalPadding).
Minimum height of the button. Defaults to DefaultStylishDimensions.buttonMinHeight.
Horizontal arrangement of the label row between the leading and trailing slots. Defaults to Arrangement.Center.
When true and enabled, the label row is replaced by a 20 dp spinner and clicks are blocked (no-op) until loading finishes. When the button is disabled, the spinner is not shown.
Optional content before the label (e.g. an icon). Rendered in a fixed-alignment slot.
Optional content after the label (e.g. a badge). Rendered in a fixed-alignment slot.
The button label, typically a Text composable.