JetpackTextButton

fun JetpackTextButton(onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, content: @Composable RowScope.() -> Unit)

Jetpack text button with generic content slot. Wraps Material 3 TextButton.

Parameters

onClick

Will be called when the user clicks the button.

modifier

Modifier to be applied to the button.

enabled

Controls the enabled state of the button. When false, this button will not be clickable and will appear disabled to accessibility services.

content

The button content.


fun JetpackTextButton(onClick: () -> Unit, text: @Composable () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, leadingIcon: @Composable () -> Unit? = null)

Jetpack text button with text and icon content slots.

Parameters

onClick

Will be called when the user clicks the button.

modifier

Modifier to be applied to the button.

enabled

Controls the enabled state of the button. When false, this button will not be clickable and will appear disabled to accessibility services.

text

The button text label content.

leadingIcon

The button leading icon content. Pass null here for no leading icon.