StylishSnackbar

fun StylishSnackbar(snackbarData: SnackbarData, modifier: Modifier = Modifier, shape: Shape = RoundedCornerShape(StylishTheme.dimensions.connectedCornerRadius), containerColor: Color = MaterialTheme.colorScheme.inverseSurface, contentColor: Color = MaterialTheme.colorScheme.inverseOnSurface, actionColor: Color = MaterialTheme.colorScheme.inversePrimary)

A snackbar styled with the Stylish design language — rounded corners from StylishTheme.dimensions.connectedCornerRadius and theme-aware container/content colors.

Use together with StylishSnackbarHost to display transient messages at the bottom of the screen.

Parameters

snackbarData

The data driving this snackbar's message, action label, and duration.

modifier

Modifier applied to the Snackbar root.

shape

Corner shape. Defaults to RoundedCornerShape with StylishTheme.dimensions.connectedCornerRadius.

containerColor

Background color.

contentColor

Text color for the message.

actionColor

Text color for the action button.

See also


fun StylishSnackbar(modifier: Modifier = Modifier, action: @Composable () -> Unit? = null, dismissAction: @Composable () -> Unit? = null, actionOnNewLine: Boolean = false, shape: Shape = RoundedCornerShape(StylishTheme.dimensions.connectedCornerRadius), containerColor: Color = MaterialTheme.colorScheme.inverseSurface, contentColor: Color = MaterialTheme.colorScheme.inverseOnSurface, actionColor: Color = MaterialTheme.colorScheme.inversePrimary, content: @Composable () -> Unit)

A slot-based snackbar styled with the Stylish design language, for composing the message and action content directly instead of driving the snackbar from a SnackbarData. Carries the same styling as the SnackbarData overload: rounded corners from StylishTheme.dimensions.connectedCornerRadius and theme-aware container/content colors.

Parameters

modifier

Modifier applied to the Snackbar root.

action

Optional composable shown as the snackbar's action area, typically a TextButton. When null, no action is displayed.

dismissAction

Optional composable shown as the dismiss affordance, typically an icon button. When null, no dismiss affordance is displayed.

actionOnNewLine

When true, action is placed on a separate line below the message. Defaults to false.

shape

Corner shape. Defaults to RoundedCornerShape with StylishTheme.dimensions.connectedCornerRadius.

containerColor

Background color.

contentColor

Text color for the message.

actionColor

Text color applied to action.

content

The snackbar message content.

See also