Jenga Snackbar
fun JengaSnackbar(message: String, modifier: Modifier = Modifier, tone: JengaSnackbarTone = JengaSnackbarTone.Neutral, actionLabel: String? = null, onAction: () -> Unit? = null, shape: Shape = JengaSnackbarDefaults.shape, colors: JengaSnackbarColors = JengaSnackbarDefaults.colors(), contentPadding: PaddingValues = JengaSnackbarDefaults.contentPadding, messageStyle: TextStyle = JengaSnackbarDefaults.messageStyle, actionStyle: TextStyle = JengaSnackbarDefaults.actionStyle)(source)
A transient message surface with an optional action.
This is the visual component; host it yourself (e.g. in a Box overlay or via your navigation shell). It does not manage its own visibility or timing.
Parameters
message
the message to show.
modifier
the Modifier for this snackbar.
tone
the semantic tone; see JengaSnackbarTone.
action Label
optional action label; when set with onAction, shows a trailing action.
on Action
called when the action is tapped.
shape
the snackbar shape; defaults to JengaSnackbarDefaults.shape.
colors
the color set; defaults to JengaSnackbarDefaults.colors.
content Padding
padding inside the snackbar.
message Style
the message text style.
action Style
the action label text style.
Samples
JengaSnackbar(
message = "Saved offline",
tone = JengaSnackbarTone.Neutral,
actionLabel = "Undo",
onAction = { },
)Content copied to clipboard