Class MBSnackbarSettings
Settings for an individual snackbar notification determining all aspects controlling it's markup and behaviour. All parameters are optional with defaults defined in the MBSnackbarServiceConfiguration that you define when creating the snackbar service.
Inherited Members
Namespace: Material.Blazor
Assembly: Material.Blazor.dll
Syntax
public class MBSnackbarSettings
Properties
| Improve this Doc View SourceAction
The action that is performed when the button in the snackbar is clicked (optional. if set, ActionText must also be set).
Declaration
public Action Action { get; set; }
Property Value
Type | Description |
---|---|
Action |
ActionText
The text to display in the action button in the snackbar (optional. if set, Action must also be set).
Declaration
public string ActionText { get; set; }
Property Value
Type | Description |
---|---|
String |
AdditionalClass
The optional additional class to apply to the snackbar surface
Declaration
public string AdditionalClass { get; set; }
Property Value
Type | Description |
---|---|
String |
CloseMethod
Snackbars are intended to dismiss on their own after a few seconds, but a dedicated dismiss icon may be optionally included as well for accessibility purposes. By default, a dismiss icon is displayed. This can be disabled by setting this property to false.
Declaration
public MBNotifierCloseMethod? CloseMethod { get; set; }
Property Value
Type | Description |
---|---|
Nullable<MBNotifierCloseMethod> |
Leading
By default, snackbars are centered horizontally within the viewport. On larger screens, they can optionally be displayed on the leading edge of the screen (the left side in LTR, or the right side in RTL) by setting this property to true. Default: false.
Declaration
public bool? Leading { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
Message
The message to be displayed in the snackbar.
Declaration
public string Message { get; set; }
Property Value
Type | Description |
---|---|
String |
Stacked
Action buttons with long text should be positioned below the label instead of alongside it. This can be accomplished by setting this property to true. Default: false.
Declaration
public bool? Stacked { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
Timeout
The snackbar's timeout in milliseconds. Minimum value is 4000 (4 seconds), maximum value is 10000 (10s). Use -1 to disable.
Declaration
public int? Timeout { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Int32> |