JetpackButton
Jetpack filled button with generic content slot. Wraps Material 3 Button.
Parameters
Will be called when the user clicks the button.
Modifier to be applied to the button.
Controls the enabled state of the button. When false, this button will not be clickable and will appear disabled to accessibility services.
The spacing values to apply internally between the container and the content.
The button content.
Jetpack filled button with text and icon content slots.
This is the most commonly used button variant for primary actions. Uses MaterialTheme.colorScheme.onBackground as the container color.
Usage example:
JetpackButton(
onClick = { viewModel.submitForm() },
text = { Text("Submit") },
leadingIcon = { Icon(Icons.Default.Send, contentDescription = null) },
modifier = Modifier.fillMaxWidth(),
)See also:
JetpackOutlinedButton for secondary actions
JetpackTextButton for tertiary actions
Parameters
Will be called when the user clicks the button.
The button text label content.
Modifier to be applied to the button.
Controls the enabled state of the button. When false, this button will not be clickable and will appear disabled to accessibility services.
The button leading icon content. Pass null here for no leading icon.