Snackbar
fun Snackbar(data: SnackbarData, modifier: Modifier = Modifier, icon: @Composable () -> Unit? = null, cornerRadius: Dp = SnackbarDefaults.CornerRadius, singleLineCornerRadius: Dp = SnackbarDefaults.SingleLineCornerRadius, colors: SnackbarColors = SnackbarDefaults.snackbarColors(), insideMargin: PaddingValues = SnackbarDefaults.InsideMargin)
A Snackbar is a temporary message that appears at the bottom of the screen.
Parameters
data
data of the Snackbar
modifier
modifier to be applied to the Snackbar
icon
optional leading icon, mirroring COUISnackBar's iv_snack_bar_icon slot. Pass it through SnackbarHost's content lambda: SnackbarHost(state) { Snackbar(it, icon = { ... }) }.
corner Radius
corner radius of the Snackbar when the message spans multiple lines
single Line Corner Radius
corner radius of the Snackbar when the message fits on a single line
colors
colors of the Snackbar
inside Margin
margin inside the Snackbar; the end margin is replaced by a 4dp action margin when the action button is the trailing element