SnackbarSparkVisuals
class SnackbarSparkVisuals(val message: String, val intent: SnackbarIntent = SnackbarDefaults.intent, val title: String? = null, val icon: SparkIcon? = null, val actionLabel: String? = null, val withDismissAction: Boolean = false, val duration: SnackbarDuration = SnackbarDuration.Short) : SnackbarVisuals(source)
SnackbarVisuals interface that defines the visuals for a Snackbar.
Class that contains the necessary information of a particular Snackbar as a piece of the SnackbarData.
Parameters
message
The primary text message to be displayed.
intent
The SnackbarIntent which defines the colour and icon of the Snackbar. Defaults to SnackbarIntent.Info.
title
An optional title to be displayed above the message.
icon
An optional icon to override the default intent icon.
actionLabel
Optional text for the action button.
withDismissAction
a boolean to show a dismiss action in the Snackbar. This is
recommended to be set to true to improve accessibility when a Snackbar is set with a
duration
shown duration of the Snackbar, will adapt for a11y context.
Constructors
Link copied to clipboard
constructor(message: String, intent: SnackbarIntent = SnackbarDefaults.intent, title: String? = null, icon: SparkIcon? = null, actionLabel: String? = null, withDismissAction: Boolean = false, duration: SnackbarDuration = SnackbarDuration.Short)